3

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)
2
  • Can they ping each other?
    – Ron Trunk
    Dec 8, 2015 at 13:45
  • 1
    yes, the network connection works properly
    – nazco
    Dec 8, 2015 at 14:28

2 Answers 2

4

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;
}
0

You want to null route, so add a static route everywhere to do that.

192.0.2.1 -> null0 (the IP is reserved for that usecase).

Then announce every network you want to rTBH through 192.0.2.1.

That would do the trick.

http://packetlife.net/blog/2009/jul/6/remotely-triggered-black-hole-rtbh-routing/

3
  • 1
    Sorry but I never said that I want to null route anything. As I've written I try to establish an iBGP link between my two BIRD instances and exchange the defined routes between them. The unreachable routes are part of the problem.
    – nazco
    Dec 9, 2015 at 21:58
  • Following my answer will get rid of the problem though, won't it? Without any extensions, BGP can only announce reachable networks. Dec 9, 2015 at 23:43
  • 1
    hell no! You answered a question I nerver asked. The article and the answer you gave has noting to do with my quesion. And additionally your liked artikel describes stuff for cisco systems but I'm running BIRD! So pleas read my question. The reject in the static definition is how you define this stuff in BIRD for example a official example gitlab.labs.nic.cz/labs/bird/wikis/BGP_example_1
    – nazco
    Dec 10, 2015 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.