iBGP and Next-Hop cost

Adam Priestley adam at pack-net.co.uk
Thu Sep 10 11:40:22 CEST 2015


Hello list,

I am trying to understand where I might be going wrong in my implementation
or understanding of the following setup.

I have two servers in different locations, both of which are using exabgp
to advertise the same /32 loopback to their nearest bird router over eBGP.
The network is logically just a ring of 6 bird routers running OSPF and an
iBGP full mesh. These /32 routes are then distributed via the iBGP mesh to
the rest of the network.
Both routes are identical in their attributes apart from the next-hop and
router-id. They have the same MED and localpref. The next-hop routes are of
course known from OSPF.

The documentation states that "BGP depends on existing IGP routing table
with AS-internal routes to determine immediate next hops for routes and to
know their internal distances to boundary routers for the purpose of BGP
route selection". However:
When inspecting the available routes from one of my bird routers elsewhere
on the network, I see one for which the next-hop OSPF cost is 20, and one
where the cost is 30. Both routes still show the same MED, the same
localpref, same as-path etc, but the route with the higher OSPF cost is
always being installed.

The only reason I can see for this route to be preferred is that the
originating router has the lower router-id, but this check comes after the
supposed IGP distance check in the route selection rules. So am I
completely misunderstanding how this process works, or have I just done
something wrong? Any advice would be greatly appreciated.



Available routes for the /32: -------------------------

root at bird1:~# birdc show route all for 10.13.83.6
BIRD 1.4.5 ready.
10.13.83.6/32     via 10.13.83.246 on eth1.10 [BIRD3 2015-09-08 from
10.13.83.2] * (100/?) [AS65100i]
Type: BGP unicast univ
BGP.origin: IGP
BGP.as_path: 65100
BGP.next_hop: 10.13.82.65
BGP.med: 100
BGP.local_pref: 100
                   via 10.13.83.233 on eth0.14 [BIRD6 2015-09-08 from
10.13.83.5] (100/?) [AS65100i]
Type: BGP unicast univ
BGP.origin: IGP
BGP.as_path: 65100
BGP.next_hop: 10.13.81.73
BGP.med: 100
BGP.local_pref: 100



Installed routes to the next-hops: -------------------------

root at bird1:~# birdc show route all primary for 10.13.82.65
BIRD 1.4.5 ready.
10.13.82.64/27    via 10.13.83.246 on eth1.10 [PackOSPF 2015-08-05] * E2
(150/30/10000) [10.13.83.2]
Type: OSPF-E2 unicast univ
OSPF.metric1: 30
OSPF.metric2: 10000
OSPF.tag: 0x00000000
OSPF.router_id: 10.13.83.2

root at bird1:~# birdc show route all primary for 10.13.81.73
BIRD 1.4.5 ready.
10.13.81.64/27    via 10.13.83.233 on eth0.14 [PackOSPF 2015-08-24] * E2
(150/20/10000) [10.13.83.5]
Type: OSPF-E2 unicast univ
OSPF.metric1: 20
OSPF.metric2: 10000
OSPF.tag: 0x00000000
OSPF.router_id: 10.13.83.5




Adam Priestley
Network Administrator
Packnet Limitedt: +44 (0)161 660 2350
f: +44 (0)161 660 9825
e: adam at pack-net.co.uk
w: http://www.pack-net.co.uk/

Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street
Manchester, M1 2JW
COMPANY REG NO. 04920552
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20150910/b73ddb33/attachment.html>


More information about the Bird-users mailing list