Contents

Introduction

Background Information

Prerequisites

Requirements

Components Used

Network Diagram

Default Behavior

Configurations Example

Introduction

This document describes the configuration example of how to modify Administrative Distance (AD) of one specific received route.

Background Information

If your network design needs to choose higher Administrative Distance (AD) Path over Lower Administrative Distance (AD) routing path, you need to perform additional configuration, which is described in this document. As you can see from network topology shown, N9K2 learns the same prefix 10.1.1.0/24 from Open Shortest Path First (OSPF) (via N9K3) and Enhanced Interior Gateway Routing Protocol (EIGRP) (via N9K1). By default, N9K2 prefers the OSPF path for prefix 10.1.1.0/24 via N9K3 to N9K4 because of lower AD=110 (preferred over External EIGRP learned route AD = 170). If you want N9K2 to choose the External EIGRP path via N9K1 instead of the OSPF path via N9K3 to network 10.1.1.0/24, you can lower the Administrative Distance of the External EIGRP received route to less than 110 through Table-map. In this case, Table-map is used to alter the Administrative Distance of the EIGRP learned route prior to its transmission to the Routing Information Base (RIB).

Prerequisites

Basic knowledge of Nexus Operating System (NX-OS) and IP Routing.

Requirements

There are no specific requirements for this document.

Components Used

The information in this document is based on these software and hardware versions:

Nexus 9000 / NXOS® 9.3(3)

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

Network Diagram

Default Behavior

Show IP Route Output on N9K2 before you apply Table-Map shows OSPF path is selected based on Lower AD to N9K3 via E1/4.

N9K2# show ip route 10.1.1.0

IP Route Table for VRF "default"

'*' denotes best ucast next-hop

'**' denotes best mcast next-hop

'[x/y]' denotes [preference/metric]

'%<string>' in via output denotes VRF <string>

10.1.1.0/24, ubest/mbest: 1/0

*via 10.10.10.6, Eth1/4, [110/1], 00:41:45, ospf-100, type-2, tag 200

via 10.10.10.1, Eth1/1, [170/2562816], 00:44:00, eigrp-100, external, tag 200

N9K2#

Configurations Example

This configuration example shows how to make N9K2 choose External EIGRP path via N9K1 over OSPF Path.

Step 1.  Create a Prefix list to match your prefix (in this example 10.1.1.0/24) on N9K2.

N9K2# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

N9K2(config)# ip prefix-list test seq 5 permit 10.1.1.0/24

N9K2(config)#

Step 2. Create a route-map to match prefix-list test and set distance to desired value.

N9K2# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

N9K2(config)# route-map test permit 10

match ip address prefix-list test

N9K2(config-route-map)# match ip address prefix-list test

N9K2(config-route-map)# set distance 90

N9K2(config-route-map)# end

N9K2#

Step 3. Apply this route-map to the routing protocol as table-map.

N9K2# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

N9K2(config)# router eigrp 100

N9K2(config-router)# table-map test

N9K2(config-router)# end

N9K2#

Step 4. Verify routing table entry after you apply table map.

This output indicates that the Administrative Distance for the prefix 10.1.1.0/24 has been altered to 90 through the use of table-map. As a result, N9K2 chooses the EIGRP Learned Path via E1/1 over the OSPF Learned Path.

N9K2# show ip route 10.1.1.0

IP Route Table for VRF "default"

'*' denotes best ucast next-hop

'**' denotes best mcast next-hop

'[x/y]' denotes [preference/metric]

'%<string>' in via output denotes VRF <string>

10.1.1.0/24, ubest/mbest: 1/0

*via 10.10.10.1, Eth1/1, [90/2562816], 00:00:04, eigrp-100, external, tag 200

via 10.10.10.6, Eth1/4, [110/1], 01:05:52, ospf-100, type-2, tag 200

N9K2#