Why configure OSPF route tag on S series switches

3

For S series switches supporting OSPF, the OSPF router tag is applied to VPNs and prevents loops of Type 5 LSAs in CE dual-homing networking. If the tag of a received Type 5 LSA is the same as the router tag of OSPF on a PE, the PE neglects this LSA when calculating routes. When a CE is connected to two PEs, PE1 generates a Type 5 LSA based on the imported BGP route and sends the LSA to the CE, and the CE forwards the LSA to PE2. The OSPF route takes precedence over the BGP route, so PE2 replaces the BGP route with the OSPF route. As a result, a loop occurs. If the route tag is configured on a PE, when the PE receives an LSA with the same route tag as its own route tag, it neglects this LSA, avoiding loops. By default, the route tag is calculated using the BGP AS number. If BGP is not configured, the route tag is 0.
In OSPF public network instances, router tags cannot be used to prevent loops but can be used as a filtering condition in a policy.

When setting the router tag of ASE-LSAs and NSSA-LSAs, not the following:
The route-tag command is used in the OSPF multi-instance scenario.
The default tag command is used in the OSPF public network instance scenario.
The import-route tag command can be used in either of the preceding scenarios.

Other related questions:
What is the purpose of an OSPF route tag
OSPF route tags are used in only Virtual Private Network (VPN) scenarios to prevent Type 5 link-state advertisement (LSA) loops in Customer Edge (CE) dual-homing networks. When OSPF detects that the route tag of a Type 5 LSA is the same as a route tag on the Provider Edge (PE) router, this route is ignored. When a CE router is connected to two PEs, PE1 sends the Type 5 LSA generated based on the redistributed Border Gateway Protocol (BGP) route. The CE then forwards this LSA to PE 2. Because an OSPF route has a higher priority than a BGP route to the CE, PE 2 replaces the BGP route with the OSPF route. Thus, a routing loop occurs. With a route tag configured, when the PE detects that the route tag of the LSA is the same as that of its route tag, the PE ignores the LSA, thereby avoiding routing loops. The default route tag is calculated based on the AS numbers in the BGP. If BGP is not configured, the default value of route tag is 0.

Why are routes in the OSPF routing table on an S series switch in the inactive state
A policy that filters all OSPF routes may be configured in an OSPF process. As a result, all routes in the OSPF routing table are in the inactive state.

Configure the priority of an OSPF route on an S series switch
The routing protocols may share and select the routing information because a switch may run multiple dynamic routing protocols simultaneously. In this case, a priority should be set for each routing protocol. When different protocols find multiple routes to the same destination, the route discovered by the protocol with a higher priority is preferred. On an S series switch, you can run the preference command in the OSPF process view to configure the OSPF priority. Perform the following operations: 1. Run the ospf [ process-id ] command in the system view to enter the OSPF process view. 2. Run the preference [ ase ] { preference | route-policy route-policy-name } * command to configure the OSPF priority. The parameters are described as follows: ase: indicates the priority of the AS-External route. preference: indicates the OSPF route priority. A smaller value indicates a higher priority. route-policy route-policy-name: indicates the priority for specified routes in the routing policy. The default OSPF priority value is 10. When an ASE is specified, the default OSPF priority is 150. For example, set the priority of routes in OSPF process 100 to 150 as follows: [HUAWEI] ospf 100 [HUAWEI-ospf-100] preference 150

Why is an OSPF route on an S series switch in the Invalid Adv state
Question: Why is an OSPF route in the Invalid Adv state? Answer: After you run the display ip routing-table x.x.x.x verbose command on an S series switch supporting OSPF to check information about a specified route, you may find that Invalid Adv is displayed in the State field. Possible causes are as follows: A route with a smaller preference value, for example, a directly connected route, exists. The route is filtered out based on a filter policy. A sham link is configured on the outbound interface.

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.

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