IPv4/IPv6 Dual Stack BGP Configuration: Part 3 – BiRD

Hello again this is the third and the last post of a series of posts about simple configuration examples implementing IPv4/IPv6 Dual Stack BGP on Open Source Routing platforms. Previous posts dealt with similar configuration for OpenBGPD and Quagga, this time we will touch a little the BiRD Dynamic Routing Platform.

BiRD
BiRD “was developed as a school project at Faculty of Math and Physics, Charles University Prague.” as its webpage says. It isnt very well known, but in my search of alternatives for routing it came to my attention many times, but its configuration complexity made me to avoid it. So the time has come with this lab, its my first time configuring this deamon and i must say that i was very excited while playing with this software, it is awesome, it took me some time to figure out its configuration philosophy, but once i had it, all the others aspects was straight forward. I found this routing platform very flexible and advanced with very high amount of configuration options. The next time that i will use linux as a router i will give BiRD a try to production and i believe it will give me back my favor.

Ok, now lets go to the lab informations:

ISP router details:

AS: 1000

IPv4 network: 10.0.0.0/8

IPv6 network: fc00::/32

Peering Interface: f0/2

Peering address IPv4: 10.0.0.5/30

Peering address IPv6: fc00::1:5/126

BiRD router details:

AS: 200

IPv4 network: 192.168.8.0/21

IPv6 network: fc00:2::/32

Peering Interface: eth0

Peering address IPv4: 10.0.0.6/30

Peering address IPv6: fc00::1:6/126

You can install BiRD via aptitude on Debian, BiRD’s author made 2 different versions of the daemon, one for IPv4 and one for IPv6 so if we want to have dual stack with this daemon we need to configure 2 files which are /etc/bird.conf and /etc/bird6.conf respectively.

Installation of BiRD on Debian:

root@debian:~# apt-get install bird6

Linux by default doesnt forwards network traffic, so we must turn forwarding on for both IPv4 and IPv6 on our server this can be done with the following 2 commands on the shell:

root@debian-quagga:~# sysctl net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
root@debian-quagga:~# sysctl net.ipv6.conf.all.forwarding=1
net.ipv6.conf.all.forwarding = 1

If you want to turn forwarding on at boot time you must change the above configuration on /etc/sysctl.com like mine’s below:

root@debian-quagga:~# cat /etc/sysctl.conf
...
...
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
...
...

No lets head to BiRD’s configuration :


root@debian-bird:~# more /etc/bird.conf
# Logging to Syslog
log syslog all;

# Route ID
router id 10.0.0.6;

# How fast scans for interfaces
protocol device {
        scan time 10;
}

# Export routes to kernel
protocol kernel {
        export all;
        scan time 15;
}

# "Pull UP" Route for BGP
protocol static static_bgp {
        import all;

        route 192.168.8.0/21 reject;
}

# BGP Configuration
protocol bgp {
        import all;
        export where proto = "static_bgp";

        local as 200;
        neighbor 10.0.0.5 as 1000;
}

root@debian-bird:~# more /etc/bird6.conf
log syslog all;

listen bgp v6only;

router id 11.11.11.11;

protocol device {
        scan time 10;
}

protocol kernel {
        export all;
        scan time 15;
}

protocol static static_bgp {
        import all;

        route fc00:2::/32 reject;
}

protocol bgp {
        import all;
        export where proto = "static_bgp";

        local as 200;
        neighbor fc00::1:5 as 1000;
        source address fc00::1:6;
}

Now lets start the processes:

root@debian-bird:~# invoke-rc.d bird start
root@debian-bird:~# invoke-rc.d bird6 start

And verify:
For IPv4 we will use the birdc client:

root@debian-bird:~# birdc
BIRD 1.2.5 ready.
bird>

if we want to check our neighbor BiRD gives as a bunch of information

bird> show protocols all bgp1
name     proto    table    state  since       info
bgp1     BGP      master   up     22:58       Established
  Preference:     100
  Input filter:   ACCEPT
  Output filter:  
  Routes:         3 imported, 1 exported, 3 preferred
  Route change stats:     received   rejected   filtered    ignored   accepted
    Import updates:              3          0          0          0          3
    Import withdraws:            0          0        ---          0          0
    Export updates:              4          3          0        ---          1
    Export withdraws:            0        ---        ---        ---          0
  BGP state:          Established
    Session:          external
    Neighbor AS:      1000
    Neighbor ID:      10.0.1.1
    Neighbor address: 10.0.0.5
    Nexthop address:  10.0.0.5
    Source address:   10.0.0.6
    Neighbor caps:    refresh
    Hold timer:       108/180
    Keepalive timer:  34/60

Show routes in RIB from BGP

bird> show route protocol bgp1
10.0.0.0/8         via 10.0.0.5 on eth0 [bgp1 22:58] * (100) [AS1000i]
192.168.0.0/21     via 10.0.0.5 on eth0 [bgp1 22:58] * (100) [AS100i]
192.168.16.0/21    via 10.0.0.5 on eth0 [bgp1 22:58] * (100) [AS300i]

Show route exported to kernel, then based on kernel’s weight of the protocol they are inserted into FIB

bird> show route export kernel1
10.0.0.0/8         via 10.0.0.5 on eth0 [bgp1 22:58] * (100) [AS1000i]
192.168.0.0/21     via 10.0.0.5 on eth0 [bgp1 22:58] * (100) [AS100i]
192.168.8.0/21     unreachable [static_bgp 22:58] * (200)
192.168.16.0/21    via 10.0.0.5 on eth0 [bgp1 22:58] * (100) [AS300i]

For IPv6 we will use the birdc6 client:

root@debian-bird:~# birdc6
BIRD 1.2.5 ready.
bird>

Show BGP Neighbord status:

bird> show protocols all bgp1
name     proto    table    state  since       info
bgp1     BGP      master   up     22:58       Established
  Preference:     100
  Input filter:   ACCEPT
  Output filter:  
  Routes:         3 imported, 1 exported, 3 preferred
  Route change stats:     received   rejected   filtered    ignored   accepted
    Import updates:              3          0          0          0          3
    Import withdraws:            0          0        ---          0          0
    Export updates:              4          3          0        ---          1
    Export withdraws:            0        ---        ---        ---          0
  BGP state:          Established
    Session:          external
    Neighbor AS:      1000
    Neighbor ID:      10.0.1.1
    Neighbor address: fc00::1:5
    Nexthop address:  fc00::1:5
    Source address:   fc00::1:6
    Neighbor caps:    refresh
    Hold timer:       91/180
    Keepalive timer:  59/60

Show routes in RIB from BGP

bird> show route protocol bgp1
fc00::/32          via fc00::1:5 on eth0 [bgp1 22:58] * (100) [AS1000i]
fc00:1::/32        via fc00::1:5 on eth0 [bgp1 22:58] * (100) [AS100i]
fc00:3::/32        via fc00::1:5 on eth0 [bgp1 22:58] * (100) [AS300i]

Show routes exported to kernel, then based on kernel’s weight of the protocol they are inserted into FIB.

bird> show route export kernel1
fc00::/32          via fc00::1:5 on eth0 [bgp1 22:58] * (100) [AS1000i]
fc00:1::/32        via fc00::1:5 on eth0 [bgp1 22:58] * (100) [AS100i]
fc00:2::/32        unreachable [static_bgp 22:58] * (200)
fc00:3::/32        via fc00::1:5 on eth0 [bgp1 22:58] * (100) [AS300i]

This was the minimum configuration for BiRD, i think this daemon has a lot of potentials it seems to be very stable if you think that major IXP like DE-CIX, LINX and more use BiRD for their heavy loaded BGP Route Server who has some thousands of BGP Peerings. Keep up the good work guys at BiRD team.

Please feel free to contact me with anything about BiRD, like success stories etc, and ofcourse point me out my mistakes but please stay calm its my first time with this beast 🙂

4 thoughts on “IPv4/IPv6 Dual Stack BGP Configuration: Part 3 – BiRD”

  1. What is the real benefit for enabling the forwarding flag for both IPv4 and IPv6? And is it really a requirement for running BIRD?

  2. Hi

    Thanks for this guide, it’s really useful! One thing I don’t understand is the “reject” on the pull-up routes. Why are they configured as reject/unreachable?

    Thank you.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top