diff --git a/community_filters.conf b/community_filters.conf index c86ed11..39bf7f3 100644 --- a/community_filters.conf +++ b/community_filters.conf @@ -43,6 +43,11 @@ int dn42_crypto; dn42_crypto = update_crypto(link_crypto) - 30; # replace 4 with your calculated bandwidth value if dn42_bandwidth > 4 then dn42_bandwidth = 4; + + bgp_local_pref = 10000+100*dn42_bandwidth + 50*(10-dn42_latency)-200*bgp_path.len+100*dn42_crypto; #(as suggested by tombii) + bgp_local_pref = 1000*dn42_bandwidth - 10*dn42_latency; if dn42_crypto < 2 then bgp_local_pref = 0; #(as suggested by Jplitza) + bgp_local_pref = 10000+100*dn42_bandwidth + 50*(10-dn42_latency)-400*(bgp_path.len-1)+100*dn42_crypto; #(as suggested by Mic92 - prefer direct tunnel) + return true; }