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 . 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? Thanks Arvin
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@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."
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@crfreenet.org> Sent: Thursday, May 31, 2018 10:11 PM To: Arvin Gan <AGan@advaoptical.com> Cc: bird-users@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@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."
And on Juniper side, all redistributed route are IGP :P Which is probably smart, since BGP origin attribute is an oldie created for compatibility with EGP, and that should have since been killed a long time ago, so everything as IGP makes sense (to basically remove origin from the best route choice).
Le 1 juin 2018 à 05:05, Arvin Gan <AGan@advaoptical.com> a écrit :
I also notice the explanation from Cisco is all redistributed route are INCOMPLETE. What's your opinion ?
On Fri, Jun 01, 2018 at 09:37:56AM +0200, Olivier Benghozi wrote:
Le 1 juin 2018 à 05:05, Arvin Gan <AGan@advaoptical.com> a écrit :
I also notice the explanation from Cisco is all redistributed route are INCOMPLETE. What's your opinion ?
That it does nor really matter.
And on Juniper side, all redistributed route are IGP :P Which is probably smart, since BGP origin attribute is an oldie created for compatibility with EGP, and that should have since been killed a long time ago, so everything as IGP makes sense (to basically remove origin from the best route choice).
I agree with this stance. Also note that using different bgp_origin value than IGP makes you vulnerable to dirty play from transit operators. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
But as a mandatory attribute, how can it be conceptually allowed to remove this attribute between BGP and BGP ?
Le 31 mai 2018 à 16:10, Ondrej Zajicek <santiago@crfreenet.org> a écrit :
If the route is from BGP but bgp_origin attribute was removed by filters -> use ORIGIN_INCOMPLETE.
On Fri, Jun 01, 2018 at 09:39:04AM +0200, Olivier Benghozi wrote:
But as a mandatory attribute, how can it be conceptually allowed to remove this attribute between BGP and BGP ?
Most attributes can be defined and undefined in configurable filters, regardless of their meaning. After export filter, it is ensured that all mandatory attributes are there by defining them if they are missing. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
participants (3)
-
Arvin Gan -
Olivier Benghozi -
Ondrej Zajicek