BGP origin attribute

Arvin Gan AGan at advaoptical.com
Fri Jun 1 05:05:13 CEST 2018


Hi Ondrej,
 Thanks for your response.
> If the route is from IGP (OSPF, RIP, Babel ..) -> src is NULL -> use ORIGIN_IGP
   Yes, I agree using IGP  if route  is from OSPF, RIP...., but if route is static or direct, using ORIGIN_IGP is not applicable. 
I also notice the explanation  from Cisco is all redistributed route are INCOMPLETE. What's your opinion ?

Thanks
Arvin

-----Original Message-----
From: Ondrej Zajicek <santiago at crfreenet.org> 
Sent: Thursday, May 31, 2018 10:11 PM
To: Arvin Gan <AGan at advaoptical.com>
Cc: bird-users at network.cz
Subject: Re: BGP origin attribute

On Thu, May 31, 2018 at 03:14:40AM +0000, Arvin Gan wrote:
> Hi All,
>   I notice the origin attribute in function bgp_update_attrs , if route source  is BGP, I think it should set as ORIGIN_IGP, not INCOMPLETE, according to RFC or Cisco device . It seems there is mistake on Line 1443 in attrs.c .

Hi

I think the current behavior is correct.

If the route is from IGP (OSPF, RIP, Babel ..) -> src is NULL -> use ORIGIN_IGP

If the route is from BGP, then it should already have bgp_origin -> do nothing

If the route is from BGP but bgp_origin attribute was removed by filters -> use ORIGIN_INCOMPLETE.


> Line 1443:
> bgp_set_attr_u32(&attrs, pool, BA_ORIGIN, 0, src ? ORIGIN_INCOMPLETE : 
> ORIGIN_IGP);
> 
> ð  bgp_set_attr_u32(&attrs, pool, BA_ORIGIN, 0, src ? ORIGIN_IGP : ORIGIN_INCOMPLETE ); // correct?

--
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