# this is automatically generated from borderbird4.j2, version 0.3 protocol kernel { # learn; # Learn all alien routes from the kernel persist; # Don't remove routes on bird shutdown scan time 20; # Scan kernel routing table every 20 seconds # import none; # Default is import all export all; # Default is export none # kernel table 5; # Kernel table to synchronize with (default: main) } protocol direct { interface "lo", "*"; preference 32000; # make sure bgp routes don't overwrite direct } log "/var/log/birdlog" all; router id 10.100.16.10; protocol static { preference 16000; route 198.49.100.45/32 via "lo"; route 8.25.217.18/32 via "lo"; route 198.49.100.18/32 via "lo"; route 8.25.217.45/32 via "lo"; route 8.6.161.18/32 via "lo"; route 8.5.161.45/32 via "lo"; } function issecondary() { return net ~ [198.49.100.45,8.25.217.18,198.49.100.18,8.25.217.45,8.6.161.18,8.5.161.45]; } function isprimary() { return net ~ [0.0.0.4/30]; } function net_outside() { return net ~ [172.18.10.0/24+,8.5.161.0/24+,198.49.100.0/24+]; } function is_internal_local() { return net ~ [10.100.32.10/32,10.100.32.0/20,10.100.16.10/32,10.100.16.0/20]; } filter inside_export { if ((net = 0.0.0.0/0) || (net ~ 10.0.0.0/8)) then accept; else reject; } filter inside_import { if is_internal_local() then reject; if net ~ [10.0.0.0/8+, 172.16.0.0/12+] then accept; else reject; } filter load_default { if net = 0.0.0.0/0 then accept; else reject; } filter outside_only { if isprimary() then bgp_local_pref=100; else if issecondary() then bgp_local_pref=80; else if net_outside() then bgp_local_pref=25; if net_outside() then accept; else reject; } template bgp tocore { description "bgp to data center as"; local as 65302; direct; export filter inside_export; import filter inside_import; bfd on; } protocol bgp inside_netA from tocore { neighbor 10.100.16.3 as 65302; source address 10.100.16.10; } protocol bgp inside_netB from tocore { neighbor 10.100.32.3 as 65302; source address 10.100.32.10; } template bgp toedge { description "bgp to edge/ISP as"; local as 18741; # direct; export filter outside_only; import filter load_default; allow local as; bfd on; } protocol bgp outside_edge_A from toedge { neighbor 172.18.10.1 as 18741; source address 172.18.10.4; } protocol bgp outside_edge_B from toedge { neighbor 172.18.10.2 as 18741; source address 172.18.10.5; } protocol bfd { interface "eth*" { interval 300 ms; multiplier 3; }; } include "/soundhound/etc/bird/*4.part.cfg";