BIRD: OSPF with BIRD and Juniper MX

I’ve been wanting to play with The BIRD Internet Routing Daemon for some time now. This weekend, I finally got around to it. Since I’m mostly working with MX routers now, I thought I’d share the following example configuration:



The BIRD OSPF configuration that worked for me was the following:

[root@bird ~]# more /etc/bird.conf
router id 172.30.0.254;

protocol device {
        scan time 10;
}

protocol kernel {
        export all;
        scan time 15;
}

protocol ospf {
        area 0 {
                interface "eth1" {
                        passwords {
                                password "LaLa" {
                                        id 1;
                                        generate from "01-01-2000 00:00:00";
                                        accept from "01-01-2000 00:00:00";
                                };
                        };
                        cost 5;
                        type pointopoint;
                        hello 5; retransmit 2; wait 10; dead 20;
                        authentication cryptographic;
                };
                interface "lo" {
                        cost 1000;
                        stub;
                };
        };
}

You will find that there are more than enough commands available on BIRD to verify OSPF and routing in general. For example:

[root@bird ~]# birdc
BIRD 1.3.11 ready.
bird> show ospf neighbors
ospf1:
Router ID       Pri          State      DTime   Interface  Router IP
1.1.1.9 128         full/ptp    00:17   eth1       172.30.0.2

This command tells us that there is an adjacency with the other router. Besides this one, you’ll have plenty of other commands at your disposal:

show route stats
show route all
show route 2.0.0.40/30 all
show route protocol ospf1
show ospf
show ospf neighbors
show ospf neighbors "eth1"
show ospf interface
show ospf lsadb
show protocols all ospf1

For OSPF debugging, you have to put debugging in the configuration, like this:

protocol ospf {
        debug all;
xxx
xx
x
}

After adding ‘debug all’ to the configuration file, you'll be able to find the debugging output in /var/log/messages;

[root@bird ~]# birdc configure soft
BIRD 1.3.11 ready.
Reading configuration from /etc/bird.conf
Reconfigured
[root@bird ~]# more /var/log/messages | grep OSPF
Jun 13 12:17:42 bird bird: OSPF: Bad packet from 172.30.0.2 - authentication failed
Jun 13 12:17:47 bird bird: OSPF: Bad packet from 172.30.0.2 - authentication failed
Jun 13 12:17:51 bird bird: OSPF: Bad packet from 172.30.0.2 - authentication failed

One last note on the MX-side of things. It had the following configuration:

play@MX480-TEST-RE0:Tiberius> show configuration protocols ospf
area 0.0.0.0 {
    interface ge-0/0/0.13 {
        interface-type p2p;
        hello-interval 5;
        authentication {
            md5 1 key "$9$bTwgaZGimfQxN"; ## SECRET-DATA
        }
    }
}

Allready looking forward to having more fun with BIRD!

13-6-2015