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.
Expand all | Collapse all

Advertise-inactive

  • 1.  Advertise-inactive

    Posted 04-20-2021 19:16
    I have the following, is the default route supposed to be advertised to the eBGP peer ?

    root@vMX3# run show route 0.0.0.0/0 exact               
    
    inet.0: 37 destinations, 58 routes (37 active, 0 holddown, 2 hidden)
    + = Active Route, - = Last Active, * = Both
    
    0.0.0.0/0          *[BGP/170] 3d 18:14:21, localpref 150, from 192.168.0.2
                          AS path: I, validation-state: unverified
                        > to 192.168.23.2 via ge-0/0/1.0, Push 0
                        [BGP/170] 3d 22:55:13, localpref 100, from 192.168.0.1
                          AS path: I, validation-state: unverified
                        > to 192.168.13.1 via ge-0/0/0.0, Push 0
    
    B2.inet.0: 28 destinations, 41 routes (27 active, 0 holddown, 2 hidden)
    + = Active Route, - = Last Active, * = Both
    
    0.0.0.0/0          *[Static/5] 3d 17:35:25
                          to table inet.0
                        [BGP/170] 3d 17:31:11, localpref 150, from 192.168.0.2
                          AS path: I, validation-state: unverified
                        > to 192.168.23.2 via ge-0/0/1.0, Push 0
                        [BGP/170] 3d 17:31:11, localpref 100, from 192.168.0.1
                          AS path: I, validation-state: unverified
                        > to 192.168.13.1 via ge-0/0/0.0, Push 0
    
    [edit]
    root@vMX3# show routing-instances | display set    
    set routing-instances B2 instance-type vrf
    set routing-instances B2 interface ge-0/0/6.0
    set routing-instances B2 route-distinguisher 192.168.0.3:3
    set routing-instances B2 vrf-target target:65000:1
    set routing-instances B2 routing-options static route 0.0.0.0/0 next-table inet.0
    set routing-instances B2 protocols bgp group ToB2 type external
    set routing-instances B2 protocols bgp group ToB2 advertise-inactive
    set routing-instances B2 protocols bgp group ToB2 family inet unicast rib-group B2ToInet
    set routing-instances B2 protocols bgp group ToB2 neighbor 192.168.35.5 peer-as 100001
    set routing-instances B2 protocols bgp group ToB2v6 type external
    set routing-instances B2 protocols bgp group ToB2v6 family inet6 unicast
    set routing-instances B2 protocols bgp group ToB2v6 neighbor 2001:0db8:3000:0035::5 peer-as 100001​


    thanks for taking a look !!



  • 2.  RE: Advertise-inactive

    Posted 04-21-2021 10:11
    hi gongyayu,
    it depends on how you have rib-groups and other parts of the lab configured I guess but a quick look tells me yeah it shouldnt be advertised. looks like rib-group B2ToInet is importing routes from inet.0 to B2.inet.0 (isnt it technically InetToB2)?  what is the static route used for then? are you testing advertise-inactive functionality? the way I understand that statement is it advertises the inactive paths that might have became inactive due to any reason, lets say due to IGP cost. I see 0/0 is using at least 2 nh ips, 192.168.23.2/ 192.168.13.1 so both are "active" routes and 0/0 should be advertised even without the advertise-inactive statement, this is bgp default behavior to advertise bgp learned routes to ebgp peers. However you have a static route in B2 instance pointing to inet.0, since source protocol is static I believe it wont be advertised by default and requires a policy to do so. Im still not clear on the static route. if its not needed, one way to test this is to simply remove the static route in B2 instance. as a result your active route should be sourced from protocol bgp, and therefore should be advertised.
    obviously I dont have the lab in front of me so please be gentle....Im interested to learn your results as well. let me know how it goes if you dont mind.


  • 3.  RE: Advertise-inactive

    Posted 04-21-2021 11:49
    set routing-instances B2 protocols bgp group ToB2 family inet unicast rib-group B2ToInet

    this line sends B2 bgp routes to inet.0.
    In the B2 routing-instance, I have a static route configured to make the reachability within the organization, and a generate default route from bgp based the ISP availablibity.  I did not redistribute the static route,  as I thought the default route will be advertised with advertise-inactive, but it did not.

    I like to know what I have missed.

    thanks a lot !!




  • 4.  RE: Advertise-inactive

    Posted 04-22-2021 09:27
    Hi,
    can you please share your rib-group config? 
    > show configuration routing-options​

    Based on the routes I see above it looks like the originating table is still inet.0, would be great if you could also share routing table with detail knob.
    > show route 0.0.0.0/0 exact detail​
    > show route advertising-protocol bgp 192.168.35.5
    I still believe default route is not getting advertised as BGP sees this as a non-bgp route and thus it wont advertise it by default.
    to be sure, and so I can clear my own doubts,  I can certainly test it out if you can share the topology and your config files?


  • 5.  RE: Advertise-inactive

    Posted 04-22-2021 10:20

    I did a quick lab with as much info I had on this case. I tested this on  21.0.0.0/8 between provider router R1 ge-0/0/6.999 and customer-B2 ge-0/0/6.999. on provider I am using a rib group to leak routes between tables

    set routing-options rib-groups B2-RIB import-rib inet.0
    set routing-options rib-groups B2-RIB import-rib B2.inet.0
    
    set routing-instances B2 protocols bgp group ToB2 type external
    set routing-instances B2 protocols bgp group ToB2 family inet unicast
    set routing-instances B2 protocols bgp group ToB2 neighbor 199.99.99.2 peer-as 101
    set routing-instances B2 instance-type vrf
    set routing-instances B2 interface ge-0/0/6.999
    set routing-instances B2 interface lo0.99
    set routing-instances B2 route-distinguisher 172.30.5.1:999
    set routing-instances B2 vrf-target target:54591:999

    here the routing table as well as advertising /8 to peer:

    ****************************************
    root@R1# run show route 21.0.0.0/8 exact 
    
    inet.0: 849 destinations, 1441 routes (681 active, 0 holddown, 330 hidden)
    @ = Routing Use Only, # = Forwarding Use Only
    + = Active Route, - = Last Active, * = Both
    
    21.0.0.0/8         *[BGP/170] 1d 00:05:26, localpref 200, from 172.30.5.41
                          AS path: 2831679853 26697 56251 10277 21151 I, validation-state: unverified
                        >  to 172.30.0.2 via ae0.0, Push 299776
    
    
    B2.inet.0: 296 destinations, 296 routes (295 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both
    
    21.0.0.0/8         *[BGP/170] 23:41:40, localpref 200, from 172.30.5.41
                          AS path: 2831679853 26697 56251 10277 21151 I, validation-state: unverified
                        >  to 172.30.0.2 via ae0.0, Push 299776
    ****************************************
    root@R1# run show route advertising-protocol bgp 199.99.99.2 21.0.0.0/8 
    
    B2.inet.0: 296 destinations, 296 routes (295 active, 0 holddown, 1 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 21.0.0.0/8              Self                                    2831679853 26697 56251 10277 21151 I
    * 21.32.0.0/13            Self                                    2831679853 26697 19412 41250 18175 61392 9306 25391 I
    
    **ignore the second prefix**


    so routes learned are via bgp and leaked to instance B2, therefore it gets advertised to remote customer. here is routing table from customer:

    root@customer-B2> show route 21.0.0.0/8 exact 
    
    inet.0: 221 destinations, 221 routes (221 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    21.0.0.0/8         *[BGP/170] 00:03:38, localpref 100
                          AS path: 54591 2831679853 26697 56251 10277 21151 I, validation-state: unverified
                        > to 199.99.99.1 via ge-0/0/6.999


    lets add a similar static route in provider router instance B2, mimicing your 0/0 static route:

    set routing-instances B2 routing-options static route 21.0.0.0/8 next-table inet.0


    routing table indicates the latest change:

    root@R1# run show route 21.0.0.0/8 exact                                    
    
    inet.0: 849 destinations, 1441 routes (681 active, 0 holddown, 330 hidden)
    @ = Routing Use Only, # = Forwarding Use Only
    + = Active Route, - = Last Active, * = Both
    
    21.0.0.0/8         *[BGP/170] 1d 00:07:20, localpref 200, from 172.30.5.41
                          AS path: 2831679853 26697 56251 10277 21151 I, validation-state: unverified
                        >  to 172.30.0.2 via ae0.0, Push 299776
    
    B2.inet.0: 296 destinations, 297 routes (295 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both
    
    21.0.0.0/8         *[Static/5] 00:00:07
                           to table inet.0
                        [BGP/170] 23:43:34, localpref 200, from 172.30.5.41
                          AS path: 2831679853 26697 56251 10277 21151 I, validation-state: unverified
                        >  to 172.30.0.2 via ae0.0, Push 299776


    even though the route is still present, the active /8 route is static which BGP wont advertise by default:

    root@R1# run show route advertising-protocol bgp 199.99.99.2 21.0.0.0/8     
    
    B2.inet.0: 296 destinations, 297 routes (295 active, 0 holddown, 1 hidden)
      Prefix                  Nexthop              MED     Lclpref    AS path
    * 21.32.0.0/13            Self                                    2831679853 26697 19412 41250 18175 61392 9306 25391 I
    
    **we only see the second prefix that was there before - missing /8**


    and here is customers routing table for reference. 

    root@customer-B2> show route 21.0.0.0/8 exact    
    
    root@customer-B2> show route 21.0.0.0/8          
    
    inet.0: 220 destinations, 220 routes (220 active, 0 holddown, 0 hidden)
    + = Active Route, - = Last Active, * = Both
    
    21.32.0.0/13       *[BGP/170] 00:02:33, localpref 100
                          AS path: 54591 2831679853 26697 19412 41250 18175 61392 9306 25391 I, validation-state: unverified
                        > to 199.99.99.1 via ge-0/0/6.999


    hope this clarifies the issue for you. 




  • 6.  RE: Advertise-inactive

    Posted 04-22-2021 11:18
    thanks so much !

    Could you add advertise-inactive to send 21.0.0.0/8 to the customer ?


  • 7.  RE: Advertise-inactive
    Best Answer

    Posted 04-22-2021 11:43
    advertise-inactive works in my situation as I have an "inactive" route available. 

    root@R1# run show route 21.0.0.0/8 exact inactive-path 
    
    inet.0: 849 destinations, 1441 routes (681 active, 0 holddown, 330 hidden)
    
    
    B2.inet.0: 296 destinations, 297 routes (295 active, 0 holddown, 1 hidden)
    + = Active Route, - = Last Active, * = Both
    
    21.0.0.0/8          [BGP/170] 01:15:35, localpref 200, from 172.30.5.41
                          AS path: 2831679853 26697 56251 10277 21151 I, validation-state: unverified
                        >  to 172.30.0.2 via ae0.0, Push 299776​
    
    
    
    here is my rib-group config, injecting routes from inet.0 to B2.inet.0.
    im populating the rib with interface-routes and all BGP learned routes from group ibgp:
    
    set routing-options rib-groups B2-RIB import-rib inet.0
    set routing-options rib-groups B2-RIB import-rib B2.inet.0
    set routing-options interface-routes rib-group inet B2-RIB
    set protocols bgp group ibgp family inet unicast rib-group B2-RIB
    

    run the same command on yours for 0/0 and share the results. also curious to see your routing-options config under global instance to verify your rib-group config. 

    also please share the following:

    > show route advertising-protocol bgp 192.168.35.5


  • 8.  RE: Advertise-inactive

    Posted 04-22-2021 11:56
    root@vMX3# show routing-options | display set 
    set routing-options rib-groups inet2B2 import-rib inet.0
    set routing-options rib-groups inet2B2 import-rib B2.inet.0
    set routing-options rib-groups B2ToInet import-rib B2.inet.0
    set routing-options rib-groups B2ToInet import-rib inet.0​


    I meant your customer-B2 received 21.0.0.0/8 with advertised-inactive configured on your R1?

    thanks !!




  • 9.  RE: Advertise-inactive

    Posted 04-22-2021 11:59

    Here is my topology



  • 10.  RE: Advertise-inactive

    Posted 04-22-2021 13:56
    Seems working now. Not sure if the issue was caused the vMX image.
    root@vMX3# run show route advertising-protocol bgp 192.168.35.5 0.0.0.0/0 exact detail 
    
    B2.inet.0: 28 destinations, 41 routes (27 active, 0 holddown, 2 hidden)
      0.0.0.0/0 (3 entries, 2 announced)
     BGP group ToB2 type External
         Nexthop: Self
         AS path: [10458] I
    ​

    thanks so much !!




  • 11.  RE: Advertise-inactive

    Posted 04-23-2021 08:59
    Hi, glad I was able to assist. just out of curiosity did you have to make any config change?


  • 12.  RE: Advertise-inactive

    Posted 04-23-2021 10:51
    I think all the configuration is the same.  I did have a couple of times when I thought the configuration was right, but it did not work. My vMX image *14) might be too old ?

    thanks again !!