1ASN = "65001" 2AS 65001 3router-id 127.0.0.1 4socket "/var/run/bgpd.sock.0" 5holdtime min 3 6fib-priority 48 7network 192.0.2.0/24 set { large-community 65001:1:1 } 8network 2001:db8:abcd::/48 set { large-community 65001:1:1 } 9 10 11rde rib Adj-RIB-In no evaluate 12rde rib Adj-RIB-Out no evaluate 13rde rib Loc-RIB rtable 0 fib-update yes 14 15prefix-set "mynetworks" { 2001:db8:abcd::/48 192.0.2.0/24 } 16prefix-set "mynetworks_orlonger" { 2001:db8:abcd::/48 or-longer 192.0.2.0/24 or-longer } 17prefix-set "bogons" { ff00::/8 or-longer fec0::/10 or-longer fe80::/10 or-longer fc00::/7 or-longer 3ffe::/16 or-longer 2002::/16 or-longer 2001:db8::/32 or-longer 2001:10::/28 or-longer 2001:2::/48 or-longer 100::/64 or-longer ::/8 or-longer 240.0.0.0/4 or-longer 224.0.0.0/4 or-longer 203.0.113.0/24 or-longer 198.51.100.0/24 or-longer 198.18.0.0/15 or-longer 192.168.0.0/16 or-longer 192.88.99.0/24 or-longer 192.0.2.0/24 or-longer 172.16.0.0/12 or-longer 169.254.0.0/16 or-longer 127.0.0.0/8 or-longer 100.64.0.0/10 or-longer 10.0.0.0/8 or-longer 0.0.0.0/8 or-longer } 18 19 20group "ibgp mesh v4" { 21 neighbor 192.0.2.3 { 22 remote-as 65001 23 local-address 192.0.2.1 24 enforce neighbor-as no 25 enforce local-as yes 26 announce IPv4 unicast 27 } 28 neighbor 192.0.2.2 { 29 remote-as 65001 30 local-address 192.0.2.1 31 enforce neighbor-as no 32 enforce local-as yes 33 announce IPv4 unicast 34 } 35} 36 37group "ibgp mesh v6" { 38 neighbor 2001:db8:abcd::3 { 39 remote-as 65001 40 local-address 2001:db8:abcd::1 41 enforce neighbor-as no 42 enforce local-as yes 43 announce IPv6 unicast 44 } 45 neighbor 2001:db8:abcd::2 { 46 remote-as 65001 47 local-address 2001:db8:abcd::1 48 enforce neighbor-as no 49 enforce local-as yes 50 announce IPv6 unicast 51 } 52} 53 54group "upstreams" { 55 neighbor 198.51.100.0 { 56 descr "IPv4 Transit provider B" 57 remote-as 65123 58 enforce neighbor-as yes 59 enforce local-as yes 60 announce IPv4 unicast 61 } 62 neighbor 203.0.113.1 { 63 descr "IPv4 Transit Provider A" 64 remote-as 65002 65 enforce neighbor-as yes 66 enforce local-as yes 67 announce IPv4 unicast 68 } 69 neighbor 2001:db8:666::2 { 70 descr "IPv6 Transit provider B" 71 remote-as 65123 72 enforce neighbor-as yes 73 enforce local-as yes 74 announce IPv6 unicast 75 } 76} 77 78 79allow to ebgp prefix-set "mynetworks" large-community 65001:1:1 80deny quick from ebgp prefix-set "mynetworks_orlonger" 81allow from ibgp 82allow to ibgp 83match from ebgp set { community delete 65001:* } 84match from ebgp set { large-community delete 65001:*:* } 85allow from any prefix 0.0.0.0/0 prefixlen 8 - 24 86allow from any prefix ::/0 prefixlen 16 - 48 87match from any community 65535:0 set { localpref 0 } 88deny quick from any prefix-set "bogons" 89deny quick from any AS 23456 90deny quick from any AS 64496 - 131071 91deny quick from any AS 4200000000 - 4294967295 92