Annotation of embedaddon/bird2/doc/bird.conf.example2, revision 1.1

1.1     ! misho       1: /*
        !             2:  *     This is an example configuration file for MB-BGP setting
        !             3:  */
        !             4: 
        !             5: 
        !             6: log "bird.log" all;
        !             7: # debug protocols all;
        !             8: 
        !             9: router id 192.168.1.1;
        !            10: 
        !            11: ipv4 table master4;
        !            12: ipv6 table master6;
        !            13: 
        !            14: ipv4 table mcast4;
        !            15: ipv6 table mcast6;
        !            16: 
        !            17: ipv4 table mtab4;
        !            18: ipv6 table mtab6;
        !            19: 
        !            20: vpn4 table vpntab4;
        !            21: vpn6 table vpntab6;
        !            22: 
        !            23: vpn4 table vpn4mc;
        !            24: vpn6 table vpn6mc;
        !            25: 
        !            26: flow4 table flowtab4;
        !            27: flow6 table flowtab6;
        !            28: 
        !            29: 
        !            30: protocol device {
        !            31: }
        !            32: 
        !            33: protocol kernel kernel4 {
        !            34:        ipv4 {
        !            35:                export all;
        !            36:        };
        !            37: }
        !            38: 
        !            39: protocol kernel kernel6 {
        !            40:        ipv6 {
        !            41:                export all;
        !            42:        };
        !            43: }
        !            44: 
        !            45: 
        !            46: protocol static static4 {
        !            47:        ipv4;
        !            48: 
        !            49:        route 10.10.0.0/24 via 192.168.1.2;
        !            50:        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)); };
        !            51: }
        !            52: 
        !            53: protocol static static6 {
        !            54:        ipv6;
        !            55: 
        !            56:        route 2001:db8:10:10::/64 via 2001:db8:1:1::10;
        !            57:        route 2001:db8:10:11::/64 via 2001:db8:1:1::10;
        !            58: 
        !            59:        route 2001:db8:1:1::/64 via fe80::ec9b:67ff:fe60:fd5d % ve1;
        !            60: }
        !            61: 
        !            62: # VPNv4 routes with MPLS labels
        !            63: protocol static statvpn4 {
        !            64:        vpn4;
        !            65: 
        !            66:        route 10:10 10.20.0.0/24 via 192.168.1.2 mpls 210;
        !            67:        route 10:10 10.20.1.0/24 via 192.168.1.2 mpls 210;
        !            68:        route 10:20 10.20.0.0/24 via 192.168.1.2 mpls 220;
        !            69:        route 10:20 10.20.1.0/24 via 192.168.1.2 mpls 220;
        !            70: }
        !            71: 
        !            72: protocol static statvpn6 {
        !            73:        vpn6;
        !            74: 
        !            75:        route 10:10 2001:db8:20:10::/64 via 2001:db8:1:1::10 mpls 200/210;
        !            76:        route 10:10 2001:db8:20:11::/64 via 2001:db8:1:1::10 mpls 200/210;
        !            77:        route 10:20 2001:db8:20:10::/64 via 2001:db8:1:1::10 mpls 200/220;
        !            78:        route 10:20 2001:db8:20:11::/64 via 2001:db8:1:1::10 mpls 200/220;
        !            79: }
        !            80: 
        !            81: # RFC 5575 flow specification
        !            82: protocol static flowstat4 {
        !            83:        flow4;
        !            84: 
        !            85:        route flow4 {
        !            86:                dst 10.0.0.0/8;
        !            87:                proto = 23;
        !            88:                dport > 24 && < 30 || 40..50,60..70,80;
        !            89:                sport > 24 && < 30 || = 40 || 50,60..70,80;
        !            90:                icmp type 80;
        !            91:                icmp code 90;
        !            92:                tcp flags 0x03/0x0f;
        !            93:                length 2048..65535;
        !            94:                dscp = 63;
        !            95:                fragment dont_fragment, is_fragment || !first_fragment;
        !            96:        };
        !            97: 
        !            98:        route flow4 {
        !            99:                dst 11.0.0.0/8;
        !           100:                proto = 0x12;
        !           101:                sport > 0x5678 && < 0x9abc || 0xdef0 || 0x1234,0x5678,0x9abc..0xdef0;
        !           102:                dport = 50;
        !           103:                tcp flags 0x000/0xf00;
        !           104:        };
        !           105: 
        !           106:        route flow4 {
        !           107:                dst 12.0.0.0/32;
        !           108:                tcp flags ! 0/0x999;
        !           109:        };
        !           110: 
        !           111:        route flow4 {
        !           112:                dst 220.0.254.0/24;
        !           113:                tcp flags 0x99/0x999;
        !           114:        };
        !           115: 
        !           116:        route flow4 {
        !           117:                dst 220.0.254.192/28;
        !           118:                tcp flags ! 0xfff/0xfff;
        !           119:        };
        !           120: 
        !           121:        route flow4 {
        !           122:                dst 15.0.0.0/8;
        !           123:                tcp flags ! 0x999/0x999;
        !           124:        };
        !           125: }
        !           126: 
        !           127: protocol static flowstat6 {
        !           128:        flow6;
        !           129: 
        !           130:        route flow6 {
        !           131:                dst fec0:1122:3344:5566::1/128;
        !           132:                src 0000:0000:0000:0001:1234:5678:9800:0000/101 offset 63;
        !           133:                next header = 23;
        !           134:                sport 24..30, 42 || 50,60,70..80;
        !           135:                dport = 50;
        !           136:                tcp flags 0x03/0x0f, !0/0xff || 0x33/0x33;
        !           137:                fragment !is_fragment || !first_fragment;
        !           138:                label 0xaaaa/0xaaaa && 0x33/0x33;
        !           139:        };
        !           140: 
        !           141:        route flow6 {
        !           142:                dst fec0:1122:3344:5566::1/128;
        !           143:                src ::1:1234:5678:9800:0/101 offset 63;
        !           144:                next header = 23;
        !           145:                dport = 50;
        !           146:                sport > 24 && < 30 || = 40 || = 50 || = 60 || >= 70 && <= 80;
        !           147:                tcp flags 0x3/0x3 && 0x0/0xc;
        !           148:        };
        !           149: }
        !           150: 
        !           151: 
        !           152: protocol pipe {
        !           153:        table master4;
        !           154:        peer table mcast4;
        !           155:        import none;
        !           156:        export where source = RTS_OSPF;
        !           157: }
        !           158: 
        !           159: protocol pipe {
        !           160:        table master6;
        !           161:        peer table mcast6;
        !           162:        import none;
        !           163:        export where source = RTS_OSPF;
        !           164: }
        !           165: 
        !           166: protocol ospf v2 ospf4 {
        !           167:        ipv4 {
        !           168:                import all;
        !           169: #              export where source = RTS_STATIC;
        !           170:        };
        !           171: 
        !           172:        area 0 {
        !           173:                interface "ve0" { stub; };
        !           174:                interface "ve1" { hello 5; type ptp; };
        !           175:                interface "ve2" { hello 5; type bcast; ttl security; };
        !           176:                interface "ve3" { hello 5; type bcast; ttl security; };
        !           177:        };
        !           178: }
        !           179: 
        !           180: 
        !           181: protocol ospf v3 ospf6 {
        !           182:        ipv6 {
        !           183:                import all;
        !           184: #              export where source = RTS_STATIC;
        !           185:        };
        !           186: 
        !           187:        area 0 {
        !           188:                interface "ve0" { stub; };
        !           189:                interface "ve1" { hello 5; type ptp; };
        !           190:                interface "ve2" { hello 5; type bcast; };
        !           191:        };
        !           192: }
        !           193: 
        !           194: protocol bgp {
        !           195:        local 192.168.11.1 as 1000;
        !           196:        neighbor 192.168.11.2 as 2000;
        !           197: #      local 192.168.1.1 as 1000;
        !           198: #      neighbor 192.168.2.1 as 2000;
        !           199: #      multihop;
        !           200: #      rr client;
        !           201: #      strict bind;
        !           202: #      debug all;
        !           203: 
        !           204:        # regular IPv4 unicast (1/1)
        !           205:        ipv4 {
        !           206:                # connects to master4 table by default
        !           207:                import all;
        !           208:                export where source ~ [ RTS_STATIC, RTS_BGP ];
        !           209:        };
        !           210: 
        !           211:        # regular IPv6 unicast (2/1)
        !           212:        ipv6 {
        !           213:                # connects to master6 table by default
        !           214:                import all;
        !           215:                export where source ~ [ RTS_STATIC, RTS_BGP ];
        !           216: #              next hop address 2001:db8:1:1::1;
        !           217:        };
        !           218: 
        !           219:        # IPv4 multicast topology (1/2)
        !           220:        ipv4 multicast {
        !           221:                # explicit IPv4 table
        !           222:                table mcast4;
        !           223:                import all;
        !           224:                export all;
        !           225:        };
        !           226: 
        !           227:        # IPv6 multicast topology (2/2)
        !           228:        ipv6 multicast {
        !           229:                # explicit IPv6 table
        !           230:                table mcast6;
        !           231:                import all;
        !           232:                export all;
        !           233: #              next hop address 2001:db8:1:1::1;
        !           234:        };
        !           235: 
        !           236:        # IPv4 with MPLS labels (1/4)
        !           237:        ipv4 mpls {
        !           238:                # explicit IPv4 table
        !           239:                table mtab4;
        !           240:                import all;
        !           241:                export all;
        !           242:        };
        !           243: 
        !           244:        # IPv6 with MPLS labels (2/4)
        !           245:        ipv6 mpls {
        !           246:                # explicit IPv6 table
        !           247:                table mtab6;
        !           248:                import all;
        !           249:                export all;
        !           250:                # allows IPv4 next hops (6PE)
        !           251:                # extended next hop;
        !           252:        };
        !           253: 
        !           254:        # VPNv4 with MPLS labels (1/128)
        !           255:         vpn4 mpls {
        !           256:                # connects to vpntab4 table by default
        !           257:                import all;
        !           258:                export all;
        !           259:        };
        !           260: 
        !           261:        # VPNv6 with MPLS labels (2/128)
        !           262:         vpn6 mpls {
        !           263:                # connects to vpntab6 table by default
        !           264:                import all;
        !           265:                export all;
        !           266:        };
        !           267: 
        !           268:        # VPNv4 multicast topology (1/129)
        !           269:         vpn4 multicast {
        !           270:                table vpn4mc;
        !           271:                import all;
        !           272:                export all;
        !           273:        };
        !           274: 
        !           275:        # VPNv6 multicast topology (2/129)
        !           276:         vpn6 multicast {
        !           277:                table vpn6mc;
        !           278:                import all;
        !           279:                export all;
        !           280:        };
        !           281: 
        !           282:        # IPv4 Flowspec (1/133)
        !           283:        flow4 {
        !           284:                # connects to flowtab4 table by default
        !           285:                import all;
        !           286:                export all;
        !           287:        };
        !           288: 
        !           289:        # IPv6 Flowspec (2/133)
        !           290:        flow6 {
        !           291:                # connects to flowtab6 table by default
        !           292:                import all;
        !           293:                export all;
        !           294:        };
        !           295: }
        !           296: 
        !           297: protocol bgp {
        !           298:        local 192.168.1.1 as 1000;
        !           299:        neighbor 192.168.3.1 as 1000;
        !           300:        multihop;
        !           301:        rr client;
        !           302: 
        !           303:        ipv4 {
        !           304:                import all;
        !           305:                export where source ~ [ RTS_STATIC, RTS_BGP ];
        !           306:        };
        !           307: 
        !           308:        ipv6 {
        !           309:                import all;
        !           310:                export where source ~ [ RTS_STATIC, RTS_BGP ];
        !           311:                next hop address 2001:db8:1:1::1;
        !           312:        };
        !           313: }
        !           314: 
        !           315: protocol bgp {
        !           316:        local 2001:db8:1:1::1 as 1000;
        !           317:        neighbor 2001:db8:4:1::1 as 1000;
        !           318:        multihop;
        !           319:        rr client;
        !           320: 
        !           321:        ipv4 {
        !           322:                import all;
        !           323:                export where source ~ [ RTS_STATIC, RTS_BGP ];
        !           324:                next hop address 192.168.4.1;
        !           325:        };
        !           326: 
        !           327:        ipv6 {
        !           328:                import all;
        !           329:                export where source ~ [ RTS_STATIC, RTS_BGP ];
        !           330:        };
        !           331: }
        !           332: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>