[bird-ospf] LSA forward-address is incorrect

Ondrej Zajicek santiago at crfreenet.org
Mon Dec 28 14:28:33 CET 2015


On Wed, Dec 23, 2015 at 03:17:10PM +0300, danilov wrote:
> Hello.
> 
> I have a small network with several bird routers as bgp and ospf routers.
> 
> EBGP-session has been established between one of our bgp-routers and customer
> router with multihop feature through OSPF-domain and iBGP-domain.
> 
> Then bgp-router advertises the customer announce to other bgp-router, that
> also works as OSPF ASBR (ospf-domain on the one side and ibgp-domain on the
> other side). On this ASBR-router I see the valid next-hop value (customer
> router IP-address in OSPF-domain) in the corresponded routes of customer.
> 
> This routes are installed to OSPF-domain, but in the outgoing LSA-updates
> I see only 0.0.0.0 forward-address values instead the customer router IP-address
> (I have checked it with wireshark).
> 
> Brief flowchart:
> 
> (CUSTOMER-ROUTER)--(PE)--<ospf-domain>--(ASBR)--<ibgp-domain>--(BGP-ROUTER)
>           \                                                      /
>            \-------------------EBGP session---------------------/

Hi

If i undestand it correctly, the route flow is:

CUSTOMER-ROUTER -> BGP-ROUTER via EBGP
BGP-ROUTER -> ASBR via IBGP
ASBR -> PE via OSPP

?


> Some info from ASBR:
> 
> >From bird command line.
> 
> bird> show route all XX.XX.102.0/23 export ospf_tst
> XX.XX.102.0/23    via YY.YY.0.210 on eth1 [bgp_tst_r1 12:41:09] * (100) [AS____i]

bgp_tst_r1 is an IBGP? What is its configuration? How that route looks on
BGP-ROUTER?


I am not really sure why there is 'via YY.YY.0.210', if it is from IBGP
then there should be the next hop from recursive lookup of bgp_next_hop
(WW.WW.6.32 from ZZ.ZZ.21.92/30).

The current code in BIRD for exporting routes to OSPF will set up the OSPF
forwarding address based on gw (YY.YY.0.210), not based on bgp_next_path
(ZZ.ZZ.21.94). And only allow immediate next hop addresses (i.e., ones
that are directly reachable without intermediate next hops).

If your bgp_next_hop is an immediate next hop but for some reason
different from 'via' address, you could fix that in OSPF export filters
on ASBR by 'gw = bgp_next_hop', but that would not work if bgp_next_hop
is not an immediate next hop.


Generally, I am not sure if BIRD does the right thing in setting
forwarding addressess for OSPF external routes. I cannot find a
justification for restriction to immediately-reachable next hops, so
perhaps that is an unnecessary restriction in BIRD and ASBR could just
put bgp_next_hop here. Question is what is a reasonable default here. One
possibility would be to ignore immediate next hops ('via'), have an
explicit route attribute settable in export filter (e.g. 'ospf_fwd_addr')
and originate external routes with zero forwarding addresses unless
explicitly configured in filters.


-- 
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."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20151228/05200ff3/attachment.asc>


More information about the Bird-users mailing list