cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
163
Views
10
Helpful
3
Replies

change AD of specific prefix when readvertising from OSPF to EIGRP

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?

2 ACCEPTED SOLUTIONS

Accepted Solutions
MHM Cisco World
Advisor

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 

View solution in original post

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:

 

  1. ip prefix-list pl-test-ospf-eigrp-change-ad seq 10 permit 3.3.3.12/32
  2. route-map test-ospf-eigrp-change-ad permit 10

    match ip address prefix-list pl-test-ospf-eigrp-change-ad

    set distance 88
  3. router ospf 1

    vrf 7k

    distance 190

    table-map test-ospf-eigrp-change-ad


    sh ip ro ospf vrf 7k


  4. 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

View solution in original post

3 REPLIES 3
MHM Cisco World
Advisor

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 

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:

 

  1. ip prefix-list pl-test-ospf-eigrp-change-ad seq 10 permit 3.3.3.12/32
  2. route-map test-ospf-eigrp-change-ad permit 10

    match ip address prefix-list pl-test-ospf-eigrp-change-ad

    set distance 88
  3. router ospf 1

    vrf 7k

    distance 190

    table-map test-ospf-eigrp-change-ad


    sh ip ro ospf vrf 7k


  4. 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

You are so welcome friend,

Please mention that this issue is solved.