04-07-2009 12:07 PM - edited 03-06-2019 05:03 AM
Please could somebody explain why I would append a tag to static routes within a configuration.
I am using OSPF and the statics are redistributed throughout the OSPF network.
Example;
ip route 192.168.80.0 255.255.255.0 172.16.10.1 tag 7 name TEST
Is it something to do with how it is distributed or advertised?
Yet to do BSCI so I have no clue.
Many thanks,
Carlton.
Solved! Go to Solution.
04-07-2009 10:21 PM
if you specify a tag the command is easy to configuraion something like metric as follows.
--- R1 ----
router ospf 1
log-adjacency-changes
redistribute static subnets route-map TEST
network 192.168.1.0 0.0.0.255 area 0
!
ip route 1.1.1.0 255.255.255.0 Null0 tag 9
ip route 2.2.2.0 255.255.255.0 Null0 tag 8
!
route-map TEST permit 10
match tag 9
set metric 100000
!
route-map TEST permit 20
--- R2 ----
sh ip route
O E2 1.1.1.0 [110/100000] via 192.168.1.254, FastEthernet0/0
O E2 2.2.2.0 [110/20] via 192.168.1.254, FastEthernet0/0
HTH
04-07-2009 12:24 PM
Carlton:
Typically, a route tag is used to mark a route and then apply policies to routes that bare that tag. It is usually used in a mutual redistribution topology to prevent routing loops.
So...
Lets say BGP is being redistributed into OSPF by two CE edge routers, as is done in a typical MPLS VPN environment.
Router R1 will learn the BGP prefixes and tag them as it redistributes them into OSPF.
R2, which sits on the same subnet and is an OSPF neighbor of R1, will learn about those OSPF external routes from R1 (O E2, by default). Those routes will carry a tag and R2's redistribution process will have a dependency statement that blocks the redistribution of those tagged routes back into the BGP domain.
R2, in turn, will also tag its redistributed BGP routes and R1 will deny redistribution back into the BGP domain to routes that bare that tag.
The purpose of doing all this is to prevent routing loops.
HTH
Victor
04-07-2009 12:25 PM
Hello Carlton,
a possible reason is that the route-tag configured in the static route is then carried in the route tag field of the OSPF LSA of type 5.
you can check this using
sh ip ospf database external 192.168.80.0
in this way in some other part of OSPF domain a decision about if it is wise to redistribute the route to another protocol or not can be taken using this route tag value
Hope to help
Giuseppe
04-07-2009 10:21 PM
if you specify a tag the command is easy to configuraion something like metric as follows.
--- R1 ----
router ospf 1
log-adjacency-changes
redistribute static subnets route-map TEST
network 192.168.1.0 0.0.0.255 area 0
!
ip route 1.1.1.0 255.255.255.0 Null0 tag 9
ip route 2.2.2.0 255.255.255.0 Null0 tag 8
!
route-map TEST permit 10
match tag 9
set metric 100000
!
route-map TEST permit 20
--- R2 ----
sh ip route
O E2 1.1.1.0 [110/100000] via 192.168.1.254, FastEthernet0/0
O E2 2.2.2.0 [110/20] via 192.168.1.254, FastEthernet0/0
HTH
04-07-2009 10:49 PM
All very helpfull.
As I suspected, more than one reason to apply tags.
Thank you all very much.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide