Rules based on which OSPF selects router IDs of S series switches

10

A router ID is used to uniquely identify a device on an OSPF network. Therefore, each router ID in an OSPF process must be unique. Otherwise, an OSPF neighbor relationship cannot be established and routing information is incorrect. You are advised to configure a unique router ID for each OSPF process on an OSPF device.
You can configure the router ID manually. If no router ID is specified through a command, the system selects an IP address of an interface as the router ID. The largest loopback interface IP address is used as the router ID. If no loopback interface is configured, the largest physical interface IP address is used as the router ID.

The router ID is reselected in the following scenarios:
The ospf xx router-id x.x.x.x command is used to reconfigure a router ID of an OSPF device.
The router ID of a system is reconfigured and the OSPF process is restarted.
The IP address that was selected as the router ID of a system is deleted and the OSPF process is restarted.

Other related questions:
What are the rules for an S series switches to select and refresh router IDs
On an S series switches, the rules for selecting and refreshing router IDs are as follows: If the router id command is executed, the configured router ID is used. If the router id command is not executed and the loopback interfaces with IP addresses configured already exist, the switch selects the largest IP address from the loopback interface addresses as the router ID. If the router id command is not executed and the loopback interfaces with IP addresses configured do not exist, the switch selects the largest IP address from the IP addresses of other interfaces as the router ID. In this case, the Up or Down state of interfaces is not considered. The router ID is reelected only when the interface IP address that is elected as the router ID is deleted or modified. Interface status changes do not result in reelection of the router ID. If the IP address of a non-loopback interface is originally selected as the router ID and currently the IP address of a loopback interface is configured, the router ID will not be reelected. If a larger interface IP address is set, the router ID will not reelected. If the master and slave MPUs are installed on the switch, the system backs up the configured router ID and the router ID selected among interface IP addresses. During system startup, when the protocol attempts to obtain the router ID, the RM may not obtain the information about all interface IP addresses. In this case, a smaller interface IP address may be selected as the router ID to return to the protocol. This is not considered as a problem. When the router ID is changed, you need to manually reset the protocol to obtain a new router ID. The router ID cannot be 0.0.0.0 or 255.255.255.255.

Why configure domain IDs for OSPF on S series switches
OSPF domain IDs apply to VPNs. When the domain ID of the remote PE is the same as that of the local PE, Type 1, Type 2, and Type 3 LSAs generate Type 3 LSAs, and Type 5 and Type 7 LSAs generate Type 5 and Type 7 LSAs (related to the area type). When the domain ID of the remote PE is different from that of the local PE, Type 1, Type 2, and Type 3 LSAs generate Type 5 or Type 7 LSAs, and Type 5 and Type 7 LSAs generate Type 5 and Type 7 LSAs (related to the area type). Before advertising the remote routes to CEs, PEs need to determine the type of OSPF routes (Type 3 or Type 5) to be advertised to CEs according to domain IDs. If local domain IDs are the same as or compatible with remote domain IDs in BGP routes, PEs advertise Type 3 routes. If not, PEs advertise Type 5 routes.

What route selection rules should be followed when external routes with the same prefix are imported into OSPF on an S series switch
Question: What route selection rules should be followed when external routes with the same prefix are imported into an S series switch supporting OSPF? Answer: Imported external OSPF routes include Type 1 and Type 2 routes. By default, Type 2 routes are imported. When Type 1 external routes are imported, in route calculation, the cost of the route to be advertised is the sum of the LSA cost and the cost of an external route. When Type 2 external routes are imported, OSPF considers that the cost of an external route is much higher than that of an intra-area route. Therefore, only the LSA cost value is used in route calculation. When Type 1 external routes with the same prefix are imported, the route selection rules are as follows: The route with the lowest cost is selected. The cost is the sum of the cost of the route to the ASBR and the LSA cost. If the costs of the routes are the same, the route in a Type 5 LSA is selected. When Type 2 external routes with the same prefix are imported, the route selection rules are as follows: The imported route with the smallest LSA cost value is selected. If the LSA cost values are the same, the route with the lowest cost of the route to the ASBR is selected. If the costs of the routes are the same, the route in a Type 5 LSA is selected.

What are the rules for selecting routes belonging to different OSPF processes
OSPF supports multi-processes. Multiple OSPF processes can run on the same router independently. Assume that a router is configured with two OSPF processes: process 1 and process 2. They are independent of each other. Therefore, both of the routes belonging to process 1 and process 2 are advertised to the routing management (RM) module. Route selection between the two processes complies with the following rules: 1. The RM module checks the protocol preference of process 1 and process 2. The route belonging to the process with higher protocol preference is selected as the optimal route. NOTE: To set the preference of an OSPF route in the specified process, run the preference [ ase ] { preference | route-policy route-policy-name } * command. The default preference of an OSPF route is 10. When an ASE is specified, the default value is 150. 2. When the protocol preferences of the two processes are the same, the RM module compare the cost of the two routes. The route with smaller cost value is selected as the optimal route. NOTE: When selecting the optimal route, the RM module first compares the protocol preference. The RM module compares the cost of routes only when the protocol preferences are the same.

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