cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3050
Views
5
Helpful
4
Replies

redistribute subset of static routes into OSPF with AD (admin distance) less than default

will
Level 3
Level 3

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

1 Accepted Solution

Accepted Solutions

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

4 Replies 4

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

thank you Paul for quick answer! that looks great. Will

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

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?

Review Cisco Networking products for a $25 gift card