On S series switches, how long does it take for BGP routes to expire after the static routes imported by BGP expire

11

If the static routes imported by an S series switch become invalid, the routes imported in the BGP routing table will be invalidated.
The route imported through the network command must be active in the local routing table. Otherwise, it cannot be imported in the BGP routing table.

Other related questions:
How to configure BGP to import routes for S series switches
Background BGP itself cannot discover routes. Therefore, it needs to import other protocol routes, such as IGP routes, to the BGP routing table. In this manner, these imported routes can be transmitted within an AS or between ASs. BGP imports routes in either of the following ways: In import mode, BGP imports routes according to protocol types, such as RIP routes, OSPF routes, and IS-IS routes. To ensure validity of imported IGP routes, BGP can also import static routes and direct routes in import mode. In network mode, BGP imports routes in an IP routing table one by one, making it more precise than the import mode. Procedure Import mode: [HUAWEI] bgp 100 [HUAWEI-bgp] ipv4-family unicast //The IPv4 address family view is displayed. You can also enter other views as required. [HUAWEI-bgp-af-ipv4] import-rout static //Importing static routes is taken as an example. Importing routes of other protocols is similar. (Optional) Run the default-route import command to allow BGP to import the default route that already exists in the local IP routing table. By default, BGP does not add default routes to the BGP routing table. Network mode: [HUAWEI] bgp 100 [HUAWEI-bgp] ipv4-family unicast //The IPv4 address family view is displayed. You can also enter other views as required. [HUAWEI-bgp-af-ipv4] network 192.168.100.0 24 //Advertise routes to network segment 192.168.100.0 24. Precaution The network command is used to advertise exactly matched routes. That is, the routes whose destination addresses and prefix lengths exactly match the entries in the local routing table. If the network mask is not specified, routes are exactly matched according to the natural network segment. When using the undo network command to clear the existing configuration, you need to specify the correct mask.

Why cannot OSPF on S series switches import BGP routes
Question: Why cannot OSPF import BGP routes? Answer: As defined in RFC 1364, routes learned via IBGP must not be imported into OSPF. That is, OSPF cannot import IBGP routes. PEs can import IBGP routes. Most VPNv4 routing tables contain BGP routes, but the routes cannot be imported into OSPF processes. This is because the vpn-instance-capability simple command is configured in the OSPF processes. After the command is configured, the PE role is disabled on a device and the device acts as an MCE. To enable the PE role on a device, run the undo vpn-instance-capability command.

How does the firewall BGP route?
When multiple routes are reached at the same destination, BGP adopts the following policy to route: 1. Optimize the route with the highest preferred value (PrefVal); 2. Preferred route with the highest local precedence (Local_Pref); 3. Aggregate routes are preferred (aggregation routes have priority over non-aggregated routes); 4. Local manual aggregation routes have a higher priority than local auto-aggregated routes. 5. Routes imported through the network command take precedence over locally routes imported through the import-route command. 6. Preferred AS path (AS_Path) the shortest route; 7. Compare the Origin attribute, and select the route with the Origin type IGP, EGP, and Incomplete; 8. Preferred route with the lowest MED value; 9. Route learned from EBGP (EBGP route priority is higher than IBGP route); 10. The route with the lowest IGP metric for the AS to reach the BGP next hop is preferred. If load balancing is configured and multiple As_Path identical external routes are configured, multiple routes are selected for load balancing based on the configured number of routes. 11. Optimize the shortest route for Cluster_List; 12. Optimize the route with the smallest Originator_ID; 13. It is preferred that the router with the smallest router ID be advertised; 14. Compare the IP address of the peer, preferably from a peer with a smaller IP Address.

Why cannot OSPF import BGP routes
As defined in RFC 1364, OSPF cannot import IBGP routes. Routes learned via IBGP must not be imported into OSPF OSPF, however, can import IBGP routes on a PE. BGP routes exist in a VPNv4 routing table on a device functioning as a PE but cannot be imported to OSPF. This is because the role of the device changes from a PE to an MCE after the vpn-instance-capability simple command in run in the OSPF process. Solution: If the device needs to function as a PE, you need to run the undo vpn-instance-capability command on the device.

Why are all the next hop addresses in the BGP routing table displayed as 0.0.0.0 after BGP imports routes from other protocols
Only routes that exist in the Border Gateway Protocol (BGP) routing table can be imported by the BGP. When importing such routes, BGP does not add new routes, but increases the reference count based on the routing table.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top