howto/Bird-communities.md
... ...
@@ -104,10 +104,7 @@ latency = update_latency(link_latency);
104 104
bandwidth = update_bandwidth(link_bandwidth) - 20;
105 105
crypto = update_crypto(link_crypto) - 30;
106 106
if bandwidth > 4 then bandwidth = 4;
107
-<<<<<<< HEAD
108 107
bgp_local_pref = 100*bandwidth + 100*(10-latency)-100*bgp_path.len+50*crypto;
109
-=======
110
->>>>>>> 8228e6e222fe084fe7b8fff23fddf55e68668d3d
111 108
return true;
112 109
}
113 110
```
... ...
@@ -117,18 +114,12 @@ Please remember to include /etc/bird/community_filters.conf in your bird.conf/bi
117 114
#################
118 115
119 116
include "/etc/bird/filter4.conf";
120
-<<<<<<< HEAD
121
-**include "/etc/bird/community_filters.conf";**
122
-=======
123 117
include "/etc/bird/community_filters.conf";
124
->>>>>>> 8228e6e222fe084fe7b8fff23fddf55e68668d3d
125 118
```
126 119
127 120
128 121
***
129 122
130
-<<<<<<< HEAD
131
-=======
132 123
### Bird bgp_local_pref calculation
133 124
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:
134 125
```
... ...
@@ -137,7 +128,6 @@ bgp_local_pref = 1000*bandwidth - 10*latency; if crypto < 2 then bgp_local_pref
137 128
```
138 129
This calculation goes into the /etc/bird/community_filters.conf just above the return true; line. However for starters I recommend to skip the bgp_local_pref calculation part until you fully unterstand BGP routing and how this will affect not only you but the whole network. Assigning community flags to your peerings will hoever have an impact on dn42 in total. Remember, probably none of these alternatives are a good fit for your network, you will need to apply one and see how it affects your traffic and then going back and tweaking the formula and checking again.
139 130
140
->>>>>>> 8228e6e222fe084fe7b8fff23fddf55e68668d3d
141 131
Original implementation by Jplitza: https://gist.github.com/welterde/524cc9b37a618e29093d
142 132
143 133
All props to him for the bird code based on the suggestion from welterde.