OSPF Route Tagging
OSPF Route Tagging
When external routes are redistributed into OSPF, they might be assigned an OSPF route tag, which is a 32-bit value. It may be used to filter, match, or set route properties in other routing protocols as well as inside OSPF.
In other words, while the OSPF protocol does not utilize it, it may be used to filter, match, or set characteristics for routes in other routing protocols or inside OSPF.
The route tag can be used to prevent routing loops, define metrics, apply policies, or identify the source of the routes. In the OSPF router setup mode, you may configure the OSPF route tag by using the redistribute command with the tag keyword, or by using a route map with the set tag command.
Fig 1.1-OSPF route Tagging |
If you want to tag the EIGRP routes with 12 when redistributing them into OSPF, you can use
NDNA_R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
NDNA_R1(config)#router ospf 1
NDNA_R1(config-router)#redistribute eigrp 1 metric-type 1 subnets tag 12
NDNA_R1(config-router)#exit
NDNA_R1(config)#end
NDNA_R1#
Verification
NDNA_R1#show ip route 10.1.1.0
Routing entry for 10.1.1.0/30
Known via "ospf 1", distance 110, metric 1500
Tag 12, type extern 1
Redistributing via ospf 12
Last update from 172.25.1.5 on Ethernet0, 00:07:14 ago
Routing Descriptor Blocks:
* 172.1.1.5, from 172.1.25.1, 00:07:14 ago, via Ethernet0
Route metric is 1500, traffic share count is 1
NDNA_R1#
Some of the basic troubleshooting commands in OSPF as below:
- show ip ospf - to verify the Router ID, area information, and SPF information
- show ip ospf interface - to verify the OSPF area number and type
- show ip ospf database - to view the OSPF link state database and the route tags
- show ip route ospf - to view the OSPF routing table and the route tags
- debug ip ospf events - to monitor OSPF events such as adjacency changes and SPF calculations
Some tips while configuring OSPF
- When setting OSPF, be sure to use a wildcard mask rather than a subnet mask.
- On WAN links, ensure that IP addresses and subnet masks are appropriately established.
- Serial connections connected through a DCE cable must be set with the clock rate command.
- To construct an adjacency, OSPF routers must have the same hello and dead timings.
- To build an adjacency, OSPF routers must use the same authentication type and key.
- To build an adjacency, OSPF routers must have the same MTU size.
Some use cases and scenarios for OSPF route tag are:
- When redistributing routes into or out of OSPF, filter OSPF routes depending on the tag value.
- When redistributing routes across various routing protocols, to avoid redistribution loops or undesirable routes.
- In OSPF, determine the source or kind of external routes.
Some best practices and recommendations for OSPF route tag are:
- For each route source or type, use a consistent and relevant tag value.
- Use route maps to regulate route redistribution depending on tag value.
- To avoid unauthorized route injection, use distinct OSPF authentication for each neighbor.
- To eliminate unwanted OSPF adjacencies, use accurate network design and the default passive interface.
- Reduce the size of the OSPF database and routing table by using summarization techniques.
Continue Reading...
- OSPF Show Commands on Cisco, Juniper, Huawei, HP and Arista Networks devices
- How to Optimize Your MPLS VPN with OSPF Sham-Link
- OSPF protocol : OSPF Packet Types
- OSPF NSSA Area introduction and Configuration
- Facts about DR and BDR selection in OSPF
- OSPF and BGP configuration setup on a vEdge Router
- OSPF Configuration Guide : OSPF Distance External Command Behavior
- A quick difference: OSPF Vs IS-IS Dynamic Routing Protocol
- Routing: Configuration OSPF To Filter Type-5 LSAs
- Introduction to OSPFv3 AS External LSA Route Calculation
- Differences between OSPFv3 and OSPFv2
- OSPF Over non-Broadcast Networks ( NBMA) basics and Configuration
- OSPF Configurations in Huawei Routers
- Quick tips to OSPF Routing Protocol for Network Engineers
- OSPF Basic configuration Step by step on Cisco Routers
- OSPF Basics : Simple points to study
- OSPF prefix-suppression- Configurations and Verification
- OSPF LSA-ID Conflict : %OSPF-4-CONFLICTING_LSAID
- Cisco IOS-XE: OSPF stuck in INIT - LLS TLV
- Configure Redistribution of iBGP Routes Into OSPF
- Cisco and Juniper Routers : OSPF point to multipoint configurations