mirror of
https://git.dn42.dev/wiki/wiki.git
synced 2024-11-23 07:43:29 +01:00
Updated Bird communities (markdown)
This commit is contained in:
parent
b2f31f92f2
commit
f04fcee7f4
@ -4,9 +4,9 @@ Communities can be used to prioritize traffic based on different flags, in DN42
|
||||
|
||||
The community is applied to the route when it is imported and exported, therefore you need to change your bird configuration, in /etc/bird/peers4 if you followed the [Bird](/howto/Bird) guide.
|
||||
|
||||
The calculations for finding the best route can be stored in a separate file, for example /etc/bird/community_filters.conf.
|
||||
The filter helpers can be stored in a separate file, for example /etc/bird/community_filters.conf.
|
||||
|
||||
Below, you will see an example config for peers4 as well as the and the suggested improvement by tombii (prefers low latency) to original filter implementation by Jplitza (prefers high BW over low latency).
|
||||
Below, you will see an example config for peers4 based on the original filter implementation by Jplitza without any bgp_local_pref calculation. An example with bgp_local_pref calculation can also be found below.
|
||||
|
||||
To properly assign the right community to your peer, please reference the table below. If you are running your own network and peering internally, please also apply the communities inside your network.
|
||||
|
||||
@ -104,7 +104,6 @@ latency = update_latency(link_latency);
|
||||
bandwidth = update_bandwidth(link_bandwidth) - 20;
|
||||
crypto = update_crypto(link_crypto) - 30;
|
||||
if bandwidth > 4 then bandwidth = 4;
|
||||
bgp_local_pref = 10000+100*bandwidth + 50*(10-latency)-200*bgp_path.len+100*crypto;
|
||||
return true;
|
||||
}
|
||||
```
|
||||
@ -120,6 +119,14 @@ include "/etc/bird/community_filters.conf";
|
||||
|
||||
***
|
||||
|
||||
### Bird bgp_local_pref calculation
|
||||
If you are running a bigger network and also want to prioritize your traffic based on the communities, then you can look at the following below:
|
||||
bgp_local_pref = 10000+100*bandwidth + 50*(10-latency)-200*bgp_path.len+100*crypto; (as suggested by tombii)
|
||||
|
||||
bgp_local_pref = 1000*bandwidth - 10*latency; if crypto < 2 then bgp_local_pref = 0; (as suggested by Jplitza)
|
||||
|
||||
These go into the /etc/bird/community_filters.conf just above the return true; line. However for starters I recommend to stick with the above, simpler implementation with assigning community flags to your peerings to have a smarter routing in dn42 in total.
|
||||
|
||||
Original implementation by Jplitza: https://gist.github.com/welterde/524cc9b37a618e29093d
|
||||
|
||||
All props to him for the bird code based on the suggestion from welterde.
|
||||
|
Loading…
Reference in New Issue
Block a user