BIRD Stubnet-Cost

Server bird.conf

router id 172.20.0.2;
log stderr all;
debug protocols all;

protocol kernel {
    ipv4 {
        export all;
    };
}

protocol device {
    scan time 10;
}

protocol direct {
    ipv4;
}

protocol static {
    ipv4;
    # TODO: dynamisch. alle länderserver
    route 51.15.228.246/32 via 192.168.0.1; #fr1
    route 51.15.90.181/32 via 192.168.0.1; #nl1
    route 178.209.46.133/32 via 192.168.0.1; #ch1
}

protocol ospf v2 OSPFip4 {
    tick 4;
    ipv4 {
        import all;
        export all;
    };
    area 0 {
        # TODO: dynamisch. alle länderserver
        stubnet 172.25.1.1/32 {
            cost 3;
        };
        stubnet 172.25.4.1/32 {
            cost 4000;
        };
        stubnet 172.25.7.1/32 {
            cost 5000;
        };
        interface "overlay", "lo" {
            type ptmp;
            cost 2000;
            hello 25;
        };
    };
    area 51 {
        interface "e2e", "lan" {
            type ptmp;
            cost 1000;
            hello 25;
        };
    };
}

ip route

box ~ # ip r
default via 172.25.7.1 dev overlay proto bird metric 32 
default via 192.168.0.1 dev enp3s0 proto dhcp src 192.168.0.234 metric 1024 
10.0.2.0/24 dev lan proto kernel scope link src 10.0.2.1 
10.0.2.0/24 dev lan proto bird scope link metric 32 
10.0.2.1 dev lan proto bird scope link metric 32 
10.1.91.34/31 via 172.25.4.1 dev overlay proto bird metric 32 
10.1.91.36/31 via 172.25.4.1 dev overlay proto bird metric 32 
10.6.0.52/31 via 172.25.7.1 dev overlay proto bird metric 32 
10.6.0.54/31 via 172.25.7.1 dev overlay proto bird metric 32 
51.15.90.181 via 192.168.0.1 dev enp3s0 proto bird metric 32 
51.15.228.246 via 192.168.0.1 dev enp3s0 proto bird metric 32 
172.16.16.16 dev dummy0 proto bird scope link metric 32 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 
172.17.0.0/16 dev docker0 proto bird scope link metric 32 
172.20.0.2 via 172.25.7.1 dev overlay proto bird metric 32 
172.25.1.1 dev overlay proto kernel scope link src 172.20.0.2 
172.25.1.1 dev overlay proto bird scope link metric 32 
172.25.4.1 dev overlay proto kernel scope link src 172.20.0.2 
172.25.4.1 dev overlay proto bird scope link metric 32 
172.25.7.1 dev overlay proto kernel scope link src 172.20.0.2 
172.25.7.1 dev overlay proto bird scope link metric 32 
178.209.46.128/26 via 172.25.1.1 dev overlay proto bird metric 32 
178.209.46.133 via 192.168.0.1 dev enp3s0 proto bird metric 32 
192.168.0.0/24 dev enp3s0 proto kernel scope link src 192.168.0.234 
192.168.0.0/24 dev enp3s0 proto bird scope link metric 32 
192.168.0.1 dev enp3s0 proto dhcp scope link src 192.168.0.234 metric 1024 

Fails

2018-08-31 18:47:54.850 <RMT> OSPFip4: Bad packet from 172.25.4.1 via overlay - strange source address (0)
2018-08-31 18:47:55.974 <RMT> OSPFip4: Bad packet from 172.25.1.1 via overlay - strange source address (0)
2018-08-31 18:47:55.974 <TRACE> OSPFip4: LSACK packet received from nbr 172.25.1.1 on overlay
2018-08-31 18:47:55.974 <TRACE> OSPFip4:     length   44
2018-08-31 18:47:55.974 <TRACE> OSPFip4:     router   172.25.1.1
2018-08-31 18:47:55.974 <TRACE> OSPFip4:     LSA      Type: 0001, Id: 172.20.0.2, Rt: 172.20.0.2, Seq: 80000066, Age: 1, Sum: 56c4
2018-08-31 18:47:57.299 <RMT> OSPFip4: Bad packet from 172.25.7.1 via overlay - strange source address (0)
2018-08-31 18:47:57.299 <RMT> ...
2018-08-31 18:47:57.299 <TRACE> OSPFip4: LSACK packet received from nbr 172.25.7.1 on overlay
2018-08-31 18:47:57.299 <TRACE> OSPFip4:     length   44
2018-08-31 18:47:57.299 <TRACE> OSPFip4:     router   172.25.7.1
2018-08-31 18:47:57.299 <TRACE> OSPFip4:     LSA      Type: 0001, Id: 172.20.0.2, Rt: 172.20.0.2, Seq: 80000066, Age: 1, Sum: 56c4
2018-08-31 18:48:02.720 <TRACE> device1: Scanning interfaces

ip a show overlay

7: overlay: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1300 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none 
    inet 172.20.0.2 peer 172.25.1.1/32 scope global overlay
       valid_lft forever preferred_lft forever
    inet 172.20.0.2 peer 172.25.4.1/32 scope global overlay
       valid_lft forever preferred_lft forever
    inet 172.20.0.2 peer 172.25.7.1/32 scope global overlay
       valid_lft forever preferred_lft forever
wg/bird/stubnet-cost.txt · Last modified: 2018/08/31 22:08 by 42
Back to top
GNU Free Documentation License 1.3
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0