How to set up iBGP in Bird

For example, I will configure the internal BGP protocol in Bird, in my case iBGP was needed in order to transfer user routes from several access servers to a NAT server. As access servers, I configured Accel-ppp (ipoe) and JuniperMX, they all worked simultaneously and balanced users by making an artificial DHCPOFFER delay.

I described the basic Bird setup in the article:
Installing and configuring BIRD (BGP)

Now I will give an example of setting up iBGP sections on the main NAT server (it is the default gateway for all servers) and specify the route reflector client for access servers:

protocol bgp AccelIpoe1 {
debug { states, events };
router id 192.168.5.1;
source address 192.168.5.1;
local as 65000;
neighbor 192.168.5.9 as 65000;
direct;
next hop self;
rr client;
import filter import_32;
export none;
}

protocol bgp JuniperMX204 {
description «ixnfo.com»;
debug { states, events };
router id 192.168.5.1;
source address 192.168.5.1;
local as 65000;
neighbor 192.168.5.8 as 65000;
direct;
next hop self;
rr client;
import filter import_32;
export none;
}

I will give an example of settings on access servers where Accel-ppp is running:

router id 192.168.5.9;

protocol direct {
        interface "ipoe*";
}

protocol kernel {
        persist off;
        scan time 30;
        learn;
        import all;
        export all;
}

protocol device {
        scan time 100;
}

filter import_32 {
        if net.len = 32 then {
#                print "net accepted:", net;
                accept;
        }
 else{
#  print "net rejected:", net;
         reject;
 }
}

protocol bgp ixnfo.com {
debug { states, events };
router id 192.168.5.9;
source address 192.168.5.9;
local as 65000;
neighbor 192.168.5.1 as 65000;
next hop self;
import none;
export filter import_32;
}

Restart bird to apply the changes:

service bird restart

On the main server, let’s look at the number of routes to make sure they were imported:

ip route | wc -l
ip route | less

An example of viewing routes in Bird:

birdc
show route all table master
exit

See also my article:
Configuring iBGP on Juniper MX

Leave a comment

Leave a Reply

Discover more from IT Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading