08-03-2016 10:37 AM - edited 03-08-2019 06:51 AM
hi, a simple question. I have 5 static routes on a router, and want to inject them into OSPF with differing AD (administrative distance) values.
OSPF AD default = 110
2 static routes should go into OSPF as external routes with AD=10
3 static routes should go into OSPF as external routes with AD=25
I also would like these routes to propagate into the LS DB with this new AD distance, so I don't have to tweak each router in the domain running OSPF in the same area. Is that something I can tweak and how?
thx in advance!
Will
Solved! Go to Solution.
08-03-2016 11:13 AM
Hello
ip route x.x.x.x y.y.y.y x.x.x.x tag 200
ip route x.x.x.x y.y.y.y x.x.x.x tag 100
route-map TAGS permit 10
match tag 100
set metric xx
route-map TAGS permit 20
match tag 200
set metric xx
router ospf X
redistribute static subnets route-map TAGS
res
Paul
08-03-2016 11:13 AM
Hello
ip route x.x.x.x y.y.y.y x.x.x.x tag 200
ip route x.x.x.x y.y.y.y x.x.x.x tag 100
route-map TAGS permit 10
match tag 100
set metric xx
route-map TAGS permit 20
match tag 200
set metric xx
router ospf X
redistribute static subnets route-map TAGS
res
Paul
08-03-2016 11:55 AM
thank you Paul for quick answer! that looks great. Will
08-03-2016 12:33 PM
Hello
Just realise you have asked for AD manipulation not cost!
The AD can only be change on the receiving router via the distance command
and to do this you need to match on the ospf rid for the advertising router
so lets say the advertising rtr rid is 1.1.1.1, on the receiving rtr you set change it AD for all incoming routes.or specific ones
access-list 10 permit x.x.x.x
router ospf 1
Distance 109 1.1.1.1 0.0.0.0 <--------------all routes advertised by 1.1.1.1
Distance 109 1.1.1.1 0.0.0.0 10 <--------------all routes matched on the acl advertised by 1.1.1.1
res
Paul
08-03-2016 12:55 PM
hey paul, yes, I may be getting confused. I did ask for AD manipulation. In fact, I'm doing this AD manipulation now by your second example:
access-list 10 permit x.x.x.x
router ospf 1
Distance 109 1.1.1.1 0.0.0.0 10
the problem I face is this just changed AD on the specific router with the above configuration. so I had to go to each router in the area and apply the ACL and distance command. this was inefficient, so I wanted a better way. hopefully, the first method you described would solve it by basically injecting the route into the first OSPF router with that AD and it propagates everywhere that way.
the problem is that in reviewing, I see you used "set metric", which manipulates the cost. So I might still be stuck with no way to "inject" the static route once with a specific AD; and let it propagate within the area with that new AD?
thx again for the comments! seems like there should be a way to inject the route as an external with a non-default external AD value for a small subset of routes?
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