Something went wrong. Try again.
forked from cz-nic/bird
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334/* * This is an example configuration file for MP-BGP setting */
log "bird.log" all;# debug protocols all;
router id 192.168.1.1;
ipv4 table master4;ipv6 table master6;
ipv4 table mcast4;ipv6 table mcast6;
ipv4 table mtab4;ipv6 table mtab6;
vpn4 table vpntab4;vpn6 table vpntab6;
vpn4 table vpn4mc;vpn6 table vpn6mc;
flow4 table flowtab4;flow6 table flowtab6;
protocol device {}
protocol kernel kernel4 { ipv4 { export all; };}
protocol kernel kernel6 { ipv6 { export all; };}
protocol static static4 { ipv4;
route 10.10.0.0/24 via 192.168.1.2; route 10.10.1.0/24 via 192.168.1.2 { bgp_large_community.add((10,20,30)); bgp_large_community.add((10,(20*3),10)); };}
protocol static static6 { ipv6;
route 2001:db8:10:10::/64 via 2001:db8:1:1::10; route 2001:db8:10:11::/64 via 2001:db8:1:1::10;
route 2001:db8:1:1::/64 via fe80::ec9b:67ff:fe60:fd5d % ve1;}
# VPNv4 routes with MPLS labelsprotocol static statvpn4 { vpn4;
route 10:10 10.20.0.0/24 via 192.168.1.2 mpls 210; route 10:10 10.20.1.0/24 via 192.168.1.2 mpls 210; route 10:20 10.20.0.0/24 via 192.168.1.2 mpls 220; route 10:20 10.20.1.0/24 via 192.168.1.2 mpls 220;}
protocol static statvpn6 { vpn6;
route 10:10 2001:db8:20:10::/64 via 2001:db8:1:1::10 mpls 200/210; route 10:10 2001:db8:20:11::/64 via 2001:db8:1:1::10 mpls 200/210; route 10:20 2001:db8:20:10::/64 via 2001:db8:1:1::10 mpls 200/220; route 10:20 2001:db8:20:11::/64 via 2001:db8:1:1::10 mpls 200/220;}
# RFC 8955 flow specificationprotocol static flowstat4 { flow4;
route flow4 { dst 10.0.0.0/8; proto = 23; dport > 24 && < 30 || 40..50,60..70,80; sport > 24 && < 30 || = 40 || 50,60..70,80; icmp type 80; icmp code 90; tcp flags 0x03/0x0f; length 2048..65535; dscp = 63; fragment dont_fragment, is_fragment || !first_fragment; };
route flow4 { dst 11.0.0.0/8; proto = 0x12; sport > 0x5678 && < 0x9abc || 0xdef0 || 0x1234,0x5678,0x9abc..0xdef0; dport = 50; tcp flags 0x000/0xf00; };
route flow4 { dst 12.0.0.0/32; tcp flags ! 0/0x999; };
route flow4 { dst 220.0.254.0/24; tcp flags 0x99/0x999; };
route flow4 { dst 220.0.254.192/28; tcp flags ! 0xfff/0xfff; };
route flow4 { dst 15.0.0.0/8; tcp flags ! 0x999/0x999; };}
# RFC 8956 flow specificationprotocol static flowstat6 { flow6;
route flow6 { dst fec0:1122:3344:5566::1/128; src 0000:0000:0000:0001:1234:5678:9800:0000/101 offset 63; next header = 23; sport 24..30, 42 || 50,60,70..80; dport = 50; tcp flags 0x03/0x0f, !0/0xff || 0x33/0x33; fragment !is_fragment || !first_fragment; label > 1111 && != 1234; };
route flow6 { dst fec0:1122:3344:5566::1/128; src ::1:1234:5678:9800:0/101 offset 63; next header = 23; dport = 50; sport > 24 && < 30 || = 40 || = 50 || = 60 || >= 70 && <= 80; tcp flags 0x3/0x3 && 0x0/0xc; };}
protocol pipe { table master4; peer table mcast4; import none; export where source = RTS_OSPF;}
protocol pipe { table master6; peer table mcast6; import none; export where source = RTS_OSPF;}
protocol ospf v2 ospf4 { ipv4 { import all;# export where source = RTS_STATIC; };
area 0 { interface "ve0" { stub; }; interface "ve1" { hello 5; type ptp; }; interface "ve2" { hello 5; type bcast; ttl security; }; interface "ve3" { hello 5; type bcast; ttl security; }; };}
protocol ospf v3 ospf6 { ipv6 { import all;# export where source = RTS_STATIC; };
area 0 { interface "ve0" { stub; }; interface "ve1" { hello 5; type ptp; }; interface "ve2" { hello 5; type bcast; }; };}
protocol bgp { local 192.168.11.1 as 1000; neighbor 192.168.11.2 as 2000;# local 192.168.1.1 as 1000;# neighbor 192.168.2.1 as 2000;# multihop;# rr client;# strict bind;# debug all;
# regular IPv4 unicast (1/1) ipv4 { # connects to master4 table by default import all; export where source ~ [ RTS_STATIC, RTS_BGP ]; };
# regular IPv6 unicast (2/1) ipv6 { # connects to master6 table by default import all; export where source ~ [ RTS_STATIC, RTS_BGP ];# next hop address 2001:db8:1:1::1; };
# IPv4 multicast topology (1/2) ipv4 multicast { # explicit IPv4 table table mcast4; import all; export all; };
# IPv6 multicast topology (2/2) ipv6 multicast { # explicit IPv6 table table mcast6; import all; export all;# next hop address 2001:db8:1:1::1; };
# IPv4 with MPLS labels (1/4) ipv4 mpls { # explicit IPv4 table table mtab4; import all; export all; };
# IPv6 with MPLS labels (2/4) ipv6 mpls { # explicit IPv6 table table mtab6; import all; export all; # allows IPv4 next hops (6PE) # extended next hop; };
# VPNv4 with MPLS labels (1/128) vpn4 mpls { # connects to vpntab4 table by default import all; export all; };
# VPNv6 with MPLS labels (2/128) vpn6 mpls { # connects to vpntab6 table by default import all; export all; };
# VPNv4 multicast topology (1/129) vpn4 multicast { table vpn4mc; import all; export all; };
# VPNv6 multicast topology (2/129) vpn6 multicast { table vpn6mc; import all; export all; };
# IPv4 Flowspec (1/133) flow4 { # connects to flowtab4 table by default import all; export all; };
# IPv6 Flowspec (2/133) flow6 { # connects to flowtab6 table by default import all; export all; };}
protocol bgp { local 192.168.1.1 as 1000; neighbor 192.168.3.1 as 1000; multihop; rr client;
ipv4 { import all; export where source ~ [ RTS_STATIC, RTS_BGP ]; };
ipv6 { import all; export where source ~ [ RTS_STATIC, RTS_BGP ]; next hop address 2001:db8:1:1::1; };}
protocol bgp { local 2001:db8:1:1::1 as 1000; neighbor 2001:db8:4:1::1 as 1000; multihop; rr client;
ipv4 { import all; export where source ~ [ RTS_STATIC, RTS_BGP ]; next hop address 192.168.4.1; };
ipv6 { import all; export where source ~ [ RTS_STATIC, RTS_BGP ]; };}