BGP Summary Route Flaps

Publication Date:  2016-04-05 Views:  1079 Downloads:  0
Issue Description
Networking:

Figure 1-1 Network topology



Symptom:

The routes learned by BGP neighbors from R1 flap.
Handling Process
Run the ip route-static ip-address { mask | mask-length } { nexthop-address | vpn-instance vpn-instance-name nexthop-address } ] [ preference preference | tag tag ] command on SW1 and SW2 to adjust the preference of the static route from 200 to 60 so that the static route remains preferred in routing tables of SW1 and SW2.
Root Cause
1. Static routes are first imported to OSPF process 500 based on routing policies.

2. After importing a static route, OSPF process 500 calculates an O_ASE route accordingly and advertises it through an LSA to SW2.

Type      : External
             Ls id     : 10.154.2.0
             Adv rtr   : 11.154.127.244
             Ls age    : 7
             Len       : 36
             Options   :  E
             seq#      : 80000029
             chksum    : 0x3c1
             Net mask  : 255.255.255.224
             TOS 0  Metric: 100000
             E type    : 1
             Forwarding Address : 0.0.0.0
             Tag       : 5001            
             Priority  : Low

3. OSPF process 1 imports the O_ASE route from OSPF process 500 through SW2, calculates an O_ASE route accordingly, and then advertises the calculated O_ASE route through an LSA to SW1.

<SW1>disp ip rou 10.154.2.0 27 v
        Route Flags: R - relay, D - download to fib
        ----------------------------------------------                    Routing Table : Public
        Summary Count : 2
                  
        Destination: 10.154.2.0/27
          Protocol: O_ASE            Process ID: 500     
         Preference: 190                    Cost: 100100
           NextHop: 11.154.69.249     Neighbour: 0.0.0.0
            State: Active Adv              Age: 00h00m03s
             Tag: 5001               Priority: low
            Label: NULL                QoSInfo: 0x0
          IndirectID: 0x0            
         RelayNextHop: 0.0.0.0           Interface: Vlanif842
          TunnelID: 0x0                   Flags:  D
                  
        Destination: 10.154.2.0/27
          Protocol: Static           Process ID: 0
         Preference: 200                    Cost: 0
           NextHop: 0.0.0.0           Neighbour: 0.0.0.0
            State: Inactive Adv            Age: 02h42m07s
             Tag: 0                  Priority: medium
            Label: NULL                QoSInfo: 0x0
          IndirectID: 0x0            
         RelayNextHop: 0.0.0.0           Interface: NULL0
          TunnelID: 0x0                   Flags:

4. An O_ASE route has a higher priority than a static route. SW1 then replaces the static route with the O_ASE route in the routing table and notifies the event to SW2. After SW2 learns that the static route is replaced, SW2 notifies that the O_ASE route in OSPF process 5 becomes ineffective. As a result, the O_ASE route in OSPF process 1 also becomes ineffective.

<SW1>disp ip rou 10.154.2.0 27 v
        Route Flags: R - relay, D - download to fib
        -----------------------------------------------                   Routing Table : Public
        Summary Count : 2
                  
        Destination: 10.154.2.0/27
          Protocol: O_ASE            Process ID: 1     
         Preference: 190                    Cost: 101000
           NextHop: 10.250.210.178    Neighbour: 0.0.0.0
            State: Active Adv Del          Age: 00h00m00s
             Tag: 931                Priority: low
            Label: NULL                QoSInfo: 0x0
          IndirectID: 0x0            
        RelayNextHop: 0.0.0.0           Interface: Vlanif819

5. OSPF process 1 withdraws the O_ASE route and notifies the event to SW1. Then the static route in the routing table on SW1 becomes active.

6. OSPF process 500 imports the static route again, and the preceding process repeats itself. As a result, the preferred route frequently alternates between OSPF and static routes in routing tables of SW1 and SW2.

7. SW1 and SW2 import BGP routes using the network command. If the preferred route alternates between OSPF and static routes in routing tables of SW1 and SW2, BGP routes will be withdrawn and then learned again. Consequently, the IGP route on R1 will also flap.
Suggestions
When OSPF imports static routes, the route preference problem will lead to IGP route flapping. When BGP summarizing routes, BGP summary route will also flap because IGP routes flap.

END