iBGP - Simple static route exchange

Cedric Lemarchand yipikai7 at gmail.com
Thu Feb 23 16:42:50 CET 2017





> On 23 Feb 2017, at 16:09, Ondrej Zajicek <santiago at crfreenet.org> wrote:
> 
> On Thu, Feb 23, 2017 at 02:45:34PM +0100, Cedric Lemarchand wrote:
>> Hello,
>> 
>> I am trying to distribute 2 static routes between 2 hosts, not directly connected, and I am having hard time to make it works … 
>> 
>> host1 10.10.1.1 (eth0) own subnet 192.168.1.0/24 ( 192.168.1.1 on eth1)
>> host2 10.10.2.1 (eth0) own subnet 192.168.2.0/24 ( 192.168.2.1 on eth1)
>> 
>> I get the following error : 
>> 
>> host1 bird: bgp1 < rejected by protocol 192.168.2.0/24 unreachable
>> host1 bird: bgp1 > updated [best] 192.168.2.0/24 unreachable
> 
> Hello
> 
> These are not errors, these are log messages enabled by 'debug all’.

Good to know, thanks.

> The only unexpected thing is that received routes are marked as
> unreachable. That is most likely because an IP address from route
> attribute bgp_next_hop cannot be resolved in your routing table
> But there should be routes learned by kernel protocols. What
> is your output of 'show route all' command?

Yes, I am not sure to understand how plays theses options (and if I need it) in the bgp protocol and it they are related to my problem :

gateway recursive : means that if host2 advertise "route 192.168.2.0/24 via 10.10.2.1;” to host1, host1 does a lookup in the kernel routing table and set the nexthop for 192.168.2.0/24 via the same IP as for host2 ? which makes sens, at least for me, because host2 (10.10.2.1) is not directly reachable by host1 (10.10.1.1) and cannot be used as the next_hop in the kernel routing table, but the gateway 10.10.1.254 is, this is what I would expect.

next hop self : means that every route advertised by host2 will be routed to it self while keeping the “gateway recursive” logic ?

The output of show route all :

host1 : 
—
10.10.2.0/24       unreachable [bgp1 15:32:13 from 10.10.2.1] ! (100/-) [i]
        Type: BGP unicast univ
        BGP.origin: IGP
        BGP.as_path:
        BGP.next_hop: 10.10.2.1
        BGP.local_pref: 100
                   via 10.10.1.254 on eth0 [kernel1 15:30:42] (10)
        Type: inherit unicast univ
        Kernel.source: 3
        Kernel.metric: 0
10.10.1.0/24       dev eth0 [direct1 15:30:42] * (240)
        Type: device unicast univ
192.168.1.0/24     dev eth1 [direct1 15:30:42] * (240)
        Type: device unicast univ
                   unreachable [static1 15:30:42] (200)
        Type: static unicast univ
192.168.2.0/24     unreachable [bgp1 15:32:13 from 10.10.2.1] * (100/-) [i]
        Type: BGP unicast univ
        BGP.origin: IGP
        BGP.as_path:
        BGP.next_hop: 10.10.2.1
        BGP.local_pref: 100
—

host2 :
—
10.10.2.0/24       dev eth0 [direct1 16:26:58] * (240)
        Type: device unicast univ
10.10.1.0/24       unreachable [bgp1 16:27:00 from 10.10.1.1] ! (100/-) [i]
        Type: BGP unicast univ
        BGP.origin: IGP
        BGP.as_path:
        BGP.next_hop: 10.10.1.1
        BGP.local_pref: 100
                   via 10.10.2.254 on eth0 [kernel1 16:26:58] (10)
        Type: inherit unicast univ
        Kernel.source: 3
        Kernel.metric: 0
192.168.1.0/24     unreachable [bgp1 16:27:00 from 10.10.1.1] * (100/-) [i]
        Type: BGP unicast univ
        BGP.origin: IGP
        BGP.as_path:
        BGP.next_hop: 10.10.1.1
        BGP.local_pref: 100
192.168.2.0/24     dev eth1 [direct1 16:26:58] * (240)
        Type: device unicast univ
                   via 10.10.2.1 on eth0 [static1 16:26:58] (200)
        Type: static unicast univ
—


> 
> -- 
> Elen sila lumenn' omentielvo
> 
> Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
> OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
> "To err is human -- to blame it on a computer is even more so."




More information about the Bird-users mailing list