04-14-2022
07:06 AM
- last edited on
04-21-2022
02:52 AM
by
Translator
Hi all.
on a Nexus 7k
I need to change the Administrative Distance of a specific prefix from OSPF so EIGRP table has it at the new AD.
for reasons, we already change the AD of the incoming OSPF routes to 180 so its higher than EIGRP but i have 1 prefix that i need the 7K's to prefer.
simple topology
nx0S-9K1 OSPF <--> OSPF-ad180 nxOS-7K1<-->EIGRP nxOS-7K1<--> EIGRP nxOS-7K2 <--> OSPF-ad180 nxOS-7K2<--> nx0S-9K2 OSPF
example subnet from the 9K = 3.3.3.0/24
OSPF advertises 9k to 7k with AD 110, 7k changes OSPF AD to 180, route then gets redistributed to EIGRP with AD180.
7K ospf config to change distance for all incoming ospf prefix's
router ospf 1
router-id 0.0.0.2
distance 180
passive-interface default
examples i have seen suggest that an ACL can be used with the distance command but that is not available on NXOS.
Any suggestions?
Solved! Go to Solution.
04-14-2022
07:47 AM
- last edited on
04-21-2022
02:54 AM
by
Translator
1. configure terminal
2. router ospf instance-tag
3. [ no ] table-map map-name
4. exit
5. route-map map-name [ permit | deny ] [ seq ]
6. match route-type route-type
7. match ip route-source prefix-list name
8. match ip address prefix-list name
9. set distance value
this way you can change the AD in nexus for OSPF
04-14-2022
10:13 AM
- last edited on
04-21-2022
02:55 AM
by
Translator
Thanks @MHM Cisco World
i did initially struggle to get this going as all OSPF routes took that new AD but now all looks ok.
from sh run section test-ospf-eigrp-change-ad:
ip prefix-list pl-test-ospf-eigrp-change-ad seq 10 permit 3.3.3.12/32
route-map test-ospf-eigrp-change-ad permit 10
match ip address prefix-list pl-test-ospf-eigrp-change-ad
set distance 88
router ospf 1
vrf 7k
distance 190
table-map test-ospf-eigrp-change-ad
sh ip ro ospf vrf 7k
3.3.3.12/32, ubest/mbest: 1/0
*via x.x.x.x, Eth1/x, [88/1], 00:04:48, ospf-1, type-2, tag x
4.4.4.4/32, ubest/mbest: 1/0
*via x.x.x.x, Eth1/x, [190/1], 00:04:48, ospf-1, type-2, tag x
Thanks again
04-14-2022
07:47 AM
- last edited on
04-21-2022
02:54 AM
by
Translator
1. configure terminal
2. router ospf instance-tag
3. [ no ] table-map map-name
4. exit
5. route-map map-name [ permit | deny ] [ seq ]
6. match route-type route-type
7. match ip route-source prefix-list name
8. match ip address prefix-list name
9. set distance value
this way you can change the AD in nexus for OSPF
04-14-2022
10:13 AM
- last edited on
04-21-2022
02:55 AM
by
Translator
Thanks @MHM Cisco World
i did initially struggle to get this going as all OSPF routes took that new AD but now all looks ok.
from sh run section test-ospf-eigrp-change-ad:
ip prefix-list pl-test-ospf-eigrp-change-ad seq 10 permit 3.3.3.12/32
route-map test-ospf-eigrp-change-ad permit 10
match ip address prefix-list pl-test-ospf-eigrp-change-ad
set distance 88
router ospf 1
vrf 7k
distance 190
table-map test-ospf-eigrp-change-ad
sh ip ro ospf vrf 7k
3.3.3.12/32, ubest/mbest: 1/0
*via x.x.x.x, Eth1/x, [88/1], 00:04:48, ospf-1, type-2, tag x
4.4.4.4/32, ubest/mbest: 1/0
*via x.x.x.x, Eth1/x, [190/1], 00:04:48, ospf-1, type-2, tag x
Thanks again
04-14-2022 10:21 AM
You are so welcome friend,
Please mention that this issue is solved.
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