Routing

 View Only
last person joined: 3 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 advertise inactive

    Posted 04-24-2019 02:45

    Hi folks,

     

    I am trying to advertise all static routes in bgp, but for some reason my inactive routes are not advertised

     

    My config:

    set protocols bgp group cogent type external
    set protocols bgp group cogent local-preference 180
    set protocols bgp group cogent advertise-inactive
    set protocols bgp group cogent import pol-bb2isp-in
    set protocols bgp group cogent import pol-reject-any
    set protocols bgp group cogent family inet unicast
    set protocols bgp group cogent export pol-bb2isp-out
    set protocols bgp group cogent export pol-reject-any
    set protocols bgp group cogent neighbor xxx.xxx.140.209 description Cogent
    set protocols bgp group cogent neighbor xxx.xxx.140.209 peer-as 174
    set policy-options policy-statement pol-bb2isp-out term match-static from protocol static
    set policy-options policy-statement pol-bb2isp-out term match-static from route-filter xxx.xxx.203.0/24 exact
    set policy-options policy-statement pol-bb2isp-out term match-static from route-filter xxx.xxx.232.0/22 exact
    set policy-options policy-statement pol-bb2isp-out term match-static from route-filter xxx.xxx.72.0/23 exact
    set policy-options policy-statement pol-bb2isp-out term match-static then accept
    set routing-options static route xxx.xxx.203.0/24 reject
    set routing-options static route xxx.xxx.203.0/24 install
    set routing-options static route xxx.xxx.232.0/22 reject
    set routing-options static route xxx.xxx.232.0/22 install
    set routing-options static route xxx.xxx.72.0/23 reject
    set routing-options static route xxx.xxx.72.0/23 install
    # run show route protocol static

    inet.0: 45 destinations, 49 routes (45 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both xxx.xxx.203.0/24 *[Static/5] 2w1d 13:36:40 Reject xxx.xxx.232.0/22 *[Static/5] 2w1d 13:35:11 Reject xxx.xxx.72.0/23 [Static/5] 2w1d 13:35:11 Reject
    # run show route advertising-protocol bgp xxx.xxx.140.209
    
    inet.0: 45 destinations, 49 routes (45 active, 0 holddown, 0 hidden)
      Prefix		  Nexthop	       MED     Lclpref    AS path
    * xxx.xxx.203.0/24          Self                                    I
    * xxx.xxx.232.0/22          Self                                    I

    The /23 that is not advertised is also directly connected 

     

    Thanks,

    Dan



  • 2.  RE: bgp advertise inactive
    Best Answer

     
    Posted 04-24-2019 03:06

    Hi ndanl,

     

    Think it's not getting advertised because there's an active route (direct) for the same prefix.  Try to include a term for matching the direct route and the prefix:

     

    set policy-options policy-statement pol-bb2isp-out term match-direct from protocol direct
    set policy-options policy-statement pol-bb2isp-out term match-direct from route-filter xxx.xxx.203.0/24 exact

    set policy-options policy-statement pol-bb2isp-out term match-direct then accept

     

    Hope this helps.

    Regards,
    -r.

    --------------------------------------------------

    If this solves your problem, please mark this post as "Accepted Solution."
    Kudos are always appreciated :).



  • 3.  RE: bgp advertise inactive

    Posted 04-24-2019 03:10

    mriyaz is correct, advertise inactive flag will only send a matching route to an active route if the protocol is different than the active route one.  If they are the same, as in this case, only the active one is sent.

     



  • 4.  RE: bgp advertise inactive

    Posted 04-24-2019 03:14
    By default, BGP readvertises only active routes. To have the routing table export to BGP the best route learned by BGP even if Junos OS did not select it to be an active route, include the advertise-inactive statement:
    Reference: https://www.juniper.net/documentation/en_US/junos/topics/example/bgp-advertise-inactive.html