Routing

last person joined: 5 days ago 

Ask questions and share experiences about ACX Series, CTP Series, MX Series, PTX Series, SSR Series, JRR Series, and all things routing, including portfolios and protocols.
  • 1.  Query on BGP attribute origin

    Posted 03-27-2009 06:54

    Hello every one

     

    I want to ask when we redistribute static, any IGP routes in to bgp through bgp export policy then the origin attribute is "I" what are the scenario when origin attribute is "?" and "E".

     

    Thank you



  • 2.  RE: Query on BGP attribute origin

    Posted 03-27-2009 08:00

    Hello,

     

    From the BGP RFC (4271):

     

    ORIGIN is a well-known mandatory attribute that defines the
    origin of the path information. The data octet can assume
    the following values:

    Value Meaning

    0 IGP - Network Layer Reachability Information
    is interior to the originating AS

    1 EGP - Network Layer Reachability Information
    learned via the EGP protocol [RFC904]

    2 INCOMPLETE - Network Layer Reachability
    Information learned by some other means

     


     

     

    This is sort of subject to interpretation...

     

    EGP means learned via the (ancient) EGP protocol (not to be confused with E-BGP) so we should never see this origin being used except through explicit configuration.

     

    IGP... does this mean originating from an IGP (RIP, OSPF, ISIS...) as the name would indicate or anything "interior" to the originating AS as per definition ? Juniper tends to consider the latter and therefore, by default, all BGP routes originated on a JUNOS device use the IGP code in the Origin attribute.

     

    Regards,

    /david 


     

    Message Edited by davidjdv on 03-27-2009 04:08 PM


  • 3.  RE: Query on BGP attribute origin

     
    Posted 03-27-2009 08:26

    Hello Pentium-V

     

    Like David wrote this can lead to interpretation and I think that you need to read carefully each vendors documents

     

    For example C.. tells that E value sould mean E-BGP, and I think David is right when he says that it's wrong!

    Usualy in Juniper routers you will only see the I value:

     

     AS path: 65XXX 65YYY I (Originator) Cluster list:  1.1.1.1

     

    But I have already seen the ? value:

     

    AS path: 65WWW 65ZZZ ? (Originator) Cluster list:  1.1.1.1

     

    And also in some other networks the E value:

     

    AS path: zzzzz YYYY xxxxx E

     

     

     

    Juniper will prefer to route via I first, E second,  and ? third.

     

     

     

    Finaly you can, like David said manipulate this attirbute when you redistribute some routes via policies in a Juniper router:

     

    lab@Router# ...1 policy-options policy-statement TEST then accept origin ?    
    Possible completions:
      egp                  Path originated in another AS
      igp                  Path originated in the local IGP
      incomplete           Path was learned by some other means

    Via the policy you can modify the origin attribute which will be by default on JUNOS always set to I.

     

    HTH

     

     

     

     

     

     



  • 4.  RE: Query on BGP attribute origin

    Posted 03-27-2009 09:07

    Thanks for example... and it illustrates that even our "help" string is wrong... :smileywink:

     

    It should really read something like:

     egp -> path learned via EGP

     igp -> path originating in local AS

     incomplete -> path learned via some other means 



  • 5.  RE: Query on BGP attribute origin

     
    Posted 03-27-2009 08:32

    Hi again

     

    So inthis configuration you will see E in the BGP attribute:

     

    Route received:

    20.0.0.0/24        *[BGP/170] 00:03:03, localpref 100
                          AS path: 65000 E
                        > to 10.0.0.1 via fe-1/3/0.0
     

     

     

    set protocols bgp export TEST
    set protocols bgp group EXT neighbor 10.0.0.2 peer-as 65001
    set policy-options policy-statement TEST from protocol static
    set policy-options policy-statement TEST then origin egp
    set policy-options policy-statement TEST then accept
    set routing-options static route 20.0.0.0/24 discard
    set routing-options autonomous-system 65000

     

     

    HTH

     



  • 6.  RE: Query on BGP attribute origin

    Posted 04-26-2009 16:38

    Pentium,

     

    The best way to think of the origin attribute is that it is just another knob for path selection in BGP.  By default, JUNOS will select origin of IGP for routes exported into BGP, which includes static, aggregate/generated and OSPF/RIP/IS-IS routes.  However, some other router operating systems will set the origin of unknown for redistributed routes or those set with a "network" statement. 

     

    In general, the origin attribute was originally conceived to help BGP speakers select the "best route" and considered routes learned through IGPs better than EGP or unknown routes.  But, today, it can be useful as a way to weight various advertisements of the same prefix.  Since origin is a mandatory transitive attribute, it can be a useful knob to to influence route selection in upstream peers.  The default is always IGP in JUNOS, but you can easily modify this throug standard JUNOS policy.

     

    In order, the selection process in JUNOS is: (think of this is a tie-breaking process)

    1) next-hop is reachable

    2) highest local-pref

    3) shortest AS-path

    4) best origin (IGP, then EGP, then unknown)

    5) smallest MED

    6) ebgp routes before ibgp

    7) smallest IGP metric to next-hop

    😎 if iBGP route-reflectors are used the shortest cluster-list

    9) smallest router-id

    10) smallest numerical peer-address 



  • 7.  RE: Query on BGP attribute origin

    Posted 11-19-2012 15:00

    Sorry for the thread necro.

     

    In IOS, a redistributed route is marked with the incomplete origin. In Junos it would be marked with IGP.

     

    My question is - is there any time Junos would ever set the origin to incomplete, besides administratively? (through routing policy, etc).

     

    Also, to clarify Loup2's comment: 

    "For example C.. tells that E value sould mean E-BGP, and I think David is right when he says that it's wrong!"

     

    No, it's not that it's "wrong", its that E simply doesnt mean EBGP. It means EGP. EGP is the predecessor to BGP. So saying "tells that E value should mean EBGP" is the part that's wrong, because it doesn't 😉