From 3b3486c476dea249bcb5c1dcd88b97253a1dbcf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20K=C3=BCthe?= Date: Wed, 17 Jul 2024 17:38:02 +0000 Subject: [PATCH] Add information for rtt in bird --- docs/routing/babeld/babeld.md | 3 +-- docs/routing/bird/bird.md | 10 +++++----- docs/routing/bird/rtt.md | 29 +++++++++++++++++++++++++++++ mkdocs.yml | 1 + 4 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 docs/routing/bird/rtt.md diff --git a/docs/routing/babeld/babeld.md b/docs/routing/babeld/babeld.md index 8476bb3..a13afdc 100644 --- a/docs/routing/babeld/babeld.md +++ b/docs/routing/babeld/babeld.md @@ -32,7 +32,7 @@ random-id true link-detect true -default hello-interval 4 type tunnel rtt-min 10 rtt-max 100 enable-timestamps true +default hello-interval 4 type tunnel rtt-min 10 rtt-max 1000 enable-timestamps true interface type tunnel @@ -214,4 +214,3 @@ The routes learned from the babel neighbors are displayed here. Here `` is - [RFC8966](https://www.rfc-editor.org/rfc/rfc8966) - [Babel configuration by Réseau Libre](https://wiki.reseaulibre.ca/documentation/babel/) - [Babel in Freifunk Franken (German)](https://wiki.freifunk-franken.de/w/Freifunk-Gateway_aufsetzen/babeld) - diff --git a/docs/routing/bird/bird.md b/docs/routing/bird/bird.md index e96cd48..b3b7851 100644 --- a/docs/routing/bird/bird.md +++ b/docs/routing/bird/bird.md @@ -102,7 +102,7 @@ protocol babel crxn_net { interface "crxn_peer1" { type wired; - rxcost 30; + rxcost 200; }; ipv6 { @@ -210,8 +210,8 @@ protocol babel crxn_net { randomize router id on; interface "crxn_peer1" { - type wired; - rxcost 30; + type tunnel; + rxcost 200; }; ipv6 { @@ -226,8 +226,8 @@ Here we create the Babel protocol, which is used to communicate with other CRXN In `ipv6` our import/export filters and our routing table `crxn` are defined accordingly. Furthermore an import limit of 2000 routes is set. If a malicious actor now tries to crash a router, for example by propagating a lot of routes, we protect ourselves with this. If 2000 routes are imported via CRXN, every further route is blocked. Although we protect our memory with this, a high rejection of routes can lead to an increased CPU load. With `interface "crxn*";` you can mark any interface starting with `crxn` as a peer, but then you cannot fine-tune a peer. -Therefore it makes sense to define a separate interface for each peer. As `type` there are `wired` and `wireless`. In general `wired` is always used. According to the `type` parameter babel is adjusted. With `rxcost` we define the "cost", which a peer needs to us. Without specification this is 96. Here it is recommended to take the latency as cost. If you want to avoid that packets are routed through you, you can increase the cost. -In this example, there is a connection to our peer via the interface `crxn_peer1`. This is a wired connection with a latency of 30ms. +Therefore it makes sense to define a separate interface for each peer. As `type` there are `wired`, `wireless` and `tunnel`. In general `tunnel` is always used. According to the `type` parameter babel is adjusted. With `rxcost` we define the "cost", which a peer needs to us. Without specification this is 96. If you want to avoid that packets are routed through you, you can increase the cost. +In this example, there is a connection to our peer via the interface `crxn_peer1`. This is a tunnel connection. `randomize router id on;` If a Babel peer is restarted in a short time, other peers may reject its routes. To prevent this, you can randomize the first 32 bits of your router ID at each startup, which will cause other Babel peers to think you are a "new" peer and therefore accept your routes. diff --git a/docs/routing/bird/rtt.md b/docs/routing/bird/rtt.md new file mode 100644 index 0000000..ad999a8 --- /dev/null +++ b/docs/routing/bird/rtt.md @@ -0,0 +1,29 @@ +# Configuring RTT + +The Babel RTT feature was [added](https://bird.network.cz/pipermail/bird-users/2023-October/017164.html) in bird 2.14. RTT stands for “Round Trip Time”. The feature makes it possible to set the rxcost based on the RTT. + +With manually set rxcost and without rtt, a peering is as follows: +``` +interface "crxn_peer2" { + type tunnel; + rxcost 130; +}; +``` + +To add a peering with RTT, the attributes `rtt min`, `rtt max` and `rtt cost` are set: +``` +interface "crxn_peer2" { + type tunnel; + rtt cost 96; + rtt min 10 ms; + rtt max 1000 ms; +}; +``` +The `rxcost` is set to the default value for the interface type. However, this is less relevant as the rxcost is also influenced by the RTT. If the RTT is less than 10 ms, no RTT-specific change is made; if the RTT is over 1000 ms or 1 s, the maximum RTT-specific cost is added. You can also use `rtt cost` to specify how high the maximum RTT specific costs may be. These are 96 for tunnel interfaces and 0 otherwise. +There is also the `max-rtt-penalty` setting, which specifies how quickly old RTT measurements should be discarded and therefore no longer included in the calculation (higher values mean that old measurements are discarded more quickly). The default value is 42, but if you have the feeling or observation that this is not suitable for the link between the routers you can increase the value, for example to `125` or similar. + +## Links + +- [Explanation of the default values](https://bird.network.cz/pipermail/bird-users/2024-July/017764.html) [[Alternative service](https://www.mail-archive.com/bird-users@network.cz/msg07657.html)] +- [Explanation of `rtt-min` and `rtt-max`]() [[Alternative service](https://www.mail-archive.com/bird-users@network.cz/msg08194.html)] +- [rtt at the re6st mesh network](https://alioth-lists.debian.net/pipermail/babel-users/2024-July/004176.html) diff --git a/mkdocs.yml b/mkdocs.yml index 134e7eb..be990b8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -24,6 +24,7 @@ nav: - bird: - Setting up Bird: routing/bird/bird - max-len filter in bird: routing/bird/maxlen-filter + - RTT: routing/bird/rtt - babeld: - Setting up Babeld: routing/babeld/babeld - Compile and install babeld: routing/babeld/compile-install