Routing – Establish an iBGP connection using BIRD

bgprouting

I'm trying to setup an iBGP session between two nodes running BIRD 1.4.5 in my lab network but I can't establish a working session.

My config looks like this on both hosts except the different neighbor ip and router id:

log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
router id 10.142.0.6;
debug protocols all;

protocol kernel {
import none;
export filter {
    if source = RTS_STATIC then reject;
    accept;
  };

}

protocol static {
    route 10.142.120.0/22 reject;
}

protocol bgp {
    local as 76118;
    neighbor 10.142.12.2 as 76118;
    export where source=RTS_STATIC;
    import all;
    direct;
    next hop self;
}

The two hosts are connected via a tinc vpn and are both in the 10.142.12.0/24 subnet. The interfaces are configured properly.

With this setup there is no error in my log files but the BGP session is only in idle state. I've checked my config with some other people running almost the same config and it works for them.

If I remove the "direct" and "next hop self" config options it results in this routes in the master routing table.

10.142.112.0/22    unreachable [bgp1 16:38:55 from 10.142.12.2] * (100/-) [i]
10.142.120.0/22    unreachable [static1 16:25:50] * (200)

Best Answer

So I've got the problem fixed.

The first problem was the missing device protocol. This protocol is needed to get the interfaces of the router.

The second problem is connected with the first. BIRD has to know the route to the interface where my vpn network is connected to. To get this routes I've to add a static route at the static protocol block or I've to get theme dynamically with a direct protocol definition.

As a last modification I have to delete the direct option. I don't exactly know why but with the direct; option defined the two BIRD instances can't connect and there ins't traffic on the interface between them. So I have to run this iBGP BIRD Session in multihop mode. It would be great if someone can explane this last little problem.

My working config looks like this:

log syslog { debug, trace, info, remote, warning, error, auth, fatal, bug };
router id 10.142.0.2;
protocol device {
    scan time 10;
};
debug protocols all;
protocol kernel {
export filter {    
    if source = RTS_STATIC then reject;
    accept;
  };

}
protocol direct {
        interface "*";
}

protocol static {
    route 10.142.112.0/22 reject;
#   route 10.142.12.0/24 via "mapbone";
}

protocol bgp {
    local as 76118;
    neighbor 10.142.12.6 as 76118;
    export where source=RTS_STATIC;
    import all;
    next hop self;
}