2 * This is an example configuration file for MB-BGP setting
34 protocol kernel kernel4 {
42 protocol kernel kernel6 {
51 protocol static static4 {
54 route 10.10.0.0/24 via 192.168.1.2;
55 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)); };
58 protocol static static6 {
61 route 2001:db8:10:10::/64 via 2001:db8:1:1::10;
62 route 2001:db8:10:11::/64 via 2001:db8:1:1::10;
64 route 2001:db8:1:1::/64 via fe80::ec9b:67ff:fe60:fd5d % ve1;
67 # VPNv4 routes with MPLS labels
68 protocol static statvpn4 {
71 route 10:10 10.20.0.0/24 via 192.168.1.2 mpls 210;
72 route 10:10 10.20.1.0/24 via 192.168.1.2 mpls 210;
73 route 10:20 10.20.0.0/24 via 192.168.1.2 mpls 220;
74 route 10:20 10.20.1.0/24 via 192.168.1.2 mpls 220;
77 protocol static statvpn6 {
80 route 10:10 2001:db8:20:10::/64 via 2001:db8:1:1::10 mpls 200/210;
81 route 10:10 2001:db8:20:11::/64 via 2001:db8:1:1::10 mpls 200/210;
82 route 10:20 2001:db8:20:10::/64 via 2001:db8:1:1::10 mpls 200/220;
83 route 10:20 2001:db8:20:11::/64 via 2001:db8:1:1::10 mpls 200/220;
86 # RFC 5575 flow specification
87 protocol static flowstat4 {
93 dport > 24 && < 30 || 40..50,60..70,80;
94 sport > 24 && < 30 || = 40 || 50,60..70,80;
100 fragment dont_fragment, is_fragment || !first_fragment;
106 sport > 0x5678 && < 0x9abc || 0xdef0 || 0x1234,0x5678,0x9abc..0xdef0;
108 tcp flags 0x000/0xf00;
118 tcp flags 0x99/0x999;
122 dst 220.0.254.192/28;
123 tcp flags ! 0xfff/0xfff;
128 tcp flags ! 0x999/0x999;
132 protocol static flowstat6 {
136 dst fec0:1122:3344:5566::1/128;
137 src 0000:0000:0000:0001:1234:5678:9800:0000/101 offset 63;
139 sport 24..30, 42 || 50,60,70..80;
141 tcp flags 0x03/0x0f, !0/0xff || 0x33/0x33;
142 fragment !is_fragment || !first_fragment;
143 label 0xaaaa/0xaaaa && 0x33/0x33;
147 dst fec0:1122:3344:5566::1/128;
148 src ::1:1234:5678:9800:0/101 offset 63;
151 sport > 24 && < 30 || = 40 || = 50 || = 60 || >= 70 && <= 80;
152 tcp flags 0x3/0x3 && 0x0/0xc;
161 export where source = RTS_OSPF;
168 export where source = RTS_OSPF;
171 protocol ospf2 ospf4 {
176 # export where source = RTS_STATIC;
180 interface "ve0" { stub; };
181 interface "ve1" { hello 5; type ptp; };
182 interface "ve2" { hello 5; type bcast; ttl security; };
183 interface "ve3" { hello 5; type bcast; ttl security; };
188 protocol ospf3 ospf6 {
193 # export where source = RTS_STATIC;
197 interface "ve0" { stub; };
198 interface "ve1" { hello 5; type ptp; };
199 interface "ve2" { hello 5; type bcast; };
204 local 192.168.11.1 as 1000;
205 neighbor 192.168.11.2 as 2000;
206 # local 192.168.1.1 as 1000;
207 # neighbor 192.168.2.1 as 2000;
213 # regular IPv4 unicast (1/1)
215 # connects to master4 table by default
217 export where source ~ [ RTS_STATIC, RTS_BGP ];
220 # regular IPv6 unicast (2/1)
222 # connects to master6 table by default
224 export where source ~ [ RTS_STATIC, RTS_BGP ];
225 # next hop address 2001:db8:1:1::1;
228 # IPv4 multicast topology (1/2)
230 # explicit IPv4 table
236 # IPv6 multicast topology (2/2)
238 # explicit IPv6 table
242 # next hop address 2001:db8:1:1::1;
245 # IPv4 with MPLS labels (1/4)
247 # explicit IPv4 table
253 # IPv6 with MPLS labels (2/4)
255 # explicit IPv6 table
259 # allows IPv4 next hops (6PE)
263 # VPNv4 with MPLS labels (1/128)
265 # connects to vpntab4 table by default
270 # VPNv6 with MPLS labels (2/128)
272 # connects to vpntab6 table by default
277 # VPNv4 multicast topology (1/129)
284 # VPNv6 multicast topology (2/129)
291 # IPv4 Flowspec (1/133)
293 # connects to flowtab4 table by default
298 # IPv6 Flowspec (2/133)
300 # connects to flowtab6 table by default
307 local 192.168.1.1 as 1000;
308 neighbor 192.168.3.1 as 1000;
314 export where source ~ [ RTS_STATIC, RTS_BGP ];
319 export where source ~ [ RTS_STATIC, RTS_BGP ];
320 next hop address 2001:db8:1:1::1;
325 local 2001:db8:1:1::1 as 1000;
326 neighbor 2001:db8:4:1::1 as 1000;
332 export where source ~ [ RTS_STATIC, RTS_BGP ];
333 next hop address 192.168.4.1;
338 export where source ~ [ RTS_STATIC, RTS_BGP ];