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.

Scroll to top