Why cannot OSPF on S series switches import BGP routes

2

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.

Other related questions:
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.

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.

Precedence of external routes imported by OSPF on S series switches
When an S series switch runs OSPF, you can run the import-route command in the OSPF process view to import external routes. The routes imported using this method are OSPF ASE routes and default precedence is 150.

Why static routes imported to OSPF on an S series switch fail to take effect
Question: Why do static routes imported to OSPF fail to take effect? Answer: If a static route imported to OSPF has a lower precedence than other routes, OSPF does not advertise this static route.

Set the maximum number of routes imported by OSPF on S series switches
On S series switches, when the number of external LSAs (Type 5 and Type 7 LSAs) imported by OSPF exceeds the limit allowed by overflow, the excessive external LSAs cannot be processed properly and are discarded. To address the problem, run the lsdb-overflow-limit command in the OSPF process view to set the maximum of external LSAs in an LSDB. By default, the maximum number of external LSAs in the LSDB is not set. For example, set the maximum number of external LSAs in an LSDB to 400000 as follows: [HUAWEI] ospf 100 [HUAWEI-ospf-100] lsdb-overflow-limit 400000

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