Routing

 View Only
last person joined: 2 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.  BGP lab scenario

    Posted 07-18-2020 06:38

    Hi all,

     

    Starting out with bgp fundamentals. I have a 2 router topology and am trying to establish an iBGP session between them:

    ---R0--xe-/4/1/18------xe-3/0/0--R1---

    R0:
    ===
    show protocols
    bgp {
        group ibgp {
            type internal;
            local-address 1.1.1.1;
            neighbor 2.2.2.2;
        }
    }
    ospf {
        area 0.0.0.0 {
            interface all;
            interface lo0.0 {
                passive;
            }
            interface fxp0.0 {
                disable;
            }
        }
        preference 200;
    }
    
    
    
    

     In show bgp summary output, I see the state as established but not seeing anything in the fields active/received/accepted/ like 0/0/0 as observed in my places on the internet. Am I missing something in the configuration?

    R0:
    ===
    run show bgp summary
    Threading mode: BGP I/O
    Default eBGP mode: advertise - accept, receive - accept
    Groups: 1 Peers: 1 Down peers: 0
    Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
    inet.0
                           0          0          0          0          0          0
    Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
    2.2.2.2               65000        283        283       0       0     2:06:38 Establ
      inet.0: 0/0/0/0

     Also, noticing that routes are being added through ospf and not via bgp in the routing table, even though ospf preference is set to 200.

    run show route
    
    inet.0: 24 destinations, 24 routes (23 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both
    
    1.1.1.1/32         *[Direct/0] 02:25:23
                        >  via lo0.0
    2.2.2.2/32         *[OSPF/200] 01:52:55, metric 1
                        >  to 10.0.0.2 via xe-4/1/18.0
    11.0.0.0/24        *[OSPF/200] 01:52:55, metric 2
                        >  to 10.0.0.2 via xe-4/1/18.0

    Not sure if any routes are getting added via bgp:

    R0:
    ===
    run show route protocol bgp
    
    inet.0: 24 destinations, 24 routes (23 active, 0 holddown, 1 hidden)
    
    iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
    
    inet6.0: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)

     Any help would be much appreciated.

     

    Thanks,

    Vinay


    #BGP
    #routing
    #ospf
    #JUNOS


  • 2.  RE: BGP lab scenario
    Best Answer

     
    Posted 07-18-2020 07:00

    Hi Vinay,

     

    you don't see routes because the peer is not advertising routes , you need to configure export policy on the peer to enable advertisement , 

     

    https://www.juniper.net/documentation/en_US/junos/topics/topic-map/basic-routing-policies.html

     

    If this solves your problem, please mark this post as "Accepted Solution."



  • 3.  RE: BGP lab scenario

     
    Posted 07-18-2020 07:10

    Hi Vinay,

     

    In your case you need to export OSPF routes on the router to BGP by configuring export policy under BGP , as the example below 

     

    first configure the policy 

     

    # show policy-options
    policy-statement test {
    term 1 {
    from protocol ospf;
    then accept;
    }
    }

     

    then enable it under BGP

     

    # show protocols bgp
    group ibgp {
    export test;
    }

     

    If this solves your problem, please mark this post as "Accepted Solution."

     

     



  • 4.  RE: BGP lab scenario

    Posted 07-18-2020 07:23

    Hi A.A,

    This is the default policy in the documentation for BGP: "Readvertise all active BGP routes to all BGP speakers, while following protocol-specific rules that prohibit one IBGP speaker from readvertising routes learned from another IBGP speaker, unless it is functioning as a route reflector". Had a couple of questions:

    1) Didn't read anything about advertisements of directly connected routes for iBGP. Are they prohibited by default?

    2) Can the default behaviour that an IBGP speaker is prohibited from readvertising routes learned from another IBGP speaker be changed with a routing policy?

     

    Thanks,

    Vinay



  • 5.  RE: BGP lab scenario

     
    Posted 07-18-2020 07:32

    Hi Vinay,

     

    for question 1 , as you said the default rule is to re-advertise the BGP routes , in oder to advertise any other protocol through BGP you will need export policy ,  including the direct routes , using the term2 in the following policy allow direct routes to be advertised 

     

    # show policy-options
    policy-statement test {
    term 1 {
    from protocol ospf;
    then accept;
    }
    term 2 {
    from protocol direct;
    }
    }


    for question 2 , No this can not be done using routing policy 

    If this solves your problem, please mark this post as "Accepted Solution."

     

     



  • 6.  RE: BGP lab scenario

    Posted 07-18-2020 09:23

    Hi A.A,

    Thanks a lot... Able to see BGP routes in the route table. However, still not able to see active/received/accepted route states in show bgp summary. Any idea what could be the issue here?

    show bgp summary
    Threading mode: BGP I/O
    Default eBGP mode: advertise - accept, receive - accept
    Groups: 1 Peers: 1 Down peers: 0
    Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
    inet.0
                           4          2          0          0          0          0
    Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
    2.2.2.2               65000        666        666       0       0     4:57:26 Establ

     Thanks,

    Vinay



  • 7.  RE: BGP lab scenario

    Posted 07-18-2020 12:41

    Hi Vinay,

     

    The syntax that you are looking for, will be seen only when other families are enabled on the BGP peer eg. "family inet-vpn unicast".

    By default, only family inet unicast is enabled and the syntax you are seeing is expected if only this family is enabled.

     

    If you want to see the change then try enabling other families along with "family inet unicast".