Description

This article explains the procedure for advertising a local route via BGP.

Symptoms

The goal of this article is to explain the reason why local routes are not re-advertised by default, and how the behavior can be modified using a configurable knob.

In the example below, 99.99.99.2/32 is the interface IP address (ge-0/1/1.0) which is not getting advertised even though the policy configuration permits this route to be accepted.

[edit]
jtac@Router-RE0# show protocols bgp | display set
set protocols bgp group inter type internal
set protocols bgp group inter local-address 100.200.200.200
set protocols bgp group inter export local_adv
set protocols bgp group inter neighbor 100.200.200.201



[edit]
jtac@Router-RE0# show policy-options policy-statement local_adv | display set
set policy-options policy-statement local_adv term 1 from route-filter 99.99.99.2/32 exact
set policy-options policy-statement local_adv term 1 then accept


[edit]
jtac@Router-RE0# run show route 99.99.99.2

inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

99.99.99.2/32        *[Local/0] 19:57:50
                                       Local via ge-0/1/1.0


[edit]
lab@Router-RE0# run show bgp summary
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...
100.200.200.201 18106 2795 2816 0 1 21:02:51 0/0/0/0 0/0/0/0

[edit]
jtac@Router-RE0# run show route advertising-protocol bgp 100.200.200.201    >>> Local route is not advertised



Solution


This is expected behavior since the local routes are not re-advertised to avoid unnecessary redistribution of host routes.  The ideal scenario would be to advertise the subnets which are present in the routing-table as directly connected routes. The output of  "show route x.x.x.x/32 extensive" shows that the route is tagged with NoReadvrt attribute thereby blocking the advertisement.

[edit]
jtac@Router-RE0# run show route 99.99.99.2 extensive

inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
99.99.99.2/32 (1 entry, 1 announced)
                *Local   Preference: 0
                               Next hop type: Local
                               Next-hop reference count: 12
                               Interface: ge-0/1/1.0
                               State: <Active <span style="color: red;" class="error"> NoReadvrt Int>
                               Local AS: 18106
                               Age: 19:57:53
                               Task: IF
                               Announcement bits (1): 5-Resolve tree 1
                               AS path: I


This behavior can be modified via the following configurable knob under "routing-options" as seen below:

[edit]
jtac@Router-RE0# show routing-options
interface-routes {
         family inet {
               export {
                       lan;
                       point-to-point;
                      }
            }
}



After enabling this knob, NoReadvrt attribute will be deleted and the routes becomes eligible for advertisement as below:

Note: To export LAN routes, include the lan option. To export point-to-point routes, include the point-to-point option.Only local routes on point-to-point interfaces configured with a destination address are exportable

[edit]
jtac@Router-RE0# run show route 99.99.99.2 extensive

inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
99.99.99.2/32 (1 entry, 1 announced)
TSI:
Page 0 idx 0 Type 1 val 8fc3b58
         Nexthop: Self
         Localpref: 100
         AS path: [18106] I
         Communities:
Path 99.99.99.2 Vector len 4. Val: 0
            *Local Preference: 0
                         Next hop type: Local
                         Next-hop reference count: 12
                         Interface: ge-0/1/1.0
                         State: <Active Int>
                          Local AS: 18106
                          Age: 21:42:17
                          Task: IF
                          Announcement bits (2): 4-BGP RT Background 5-Resolve tree 1
                          AS path: I

[edit]
jtac@Router-RE0# show route advertising-protocol bgp 100.200.200.201

inet.0:  20 destinations,  20 routes  (20 active, 0 holddown, 0 hidden)
    Prefix                                 Nexthop                    MED           Lclpref         AS path
 * 99.99.99.2/32                  Self                                                100               I


Related Information