The following example configures NHRP shortcut switching on tunnel interface 1:
Router(config)#
interface Tunnel 1
Router(config-if)#
ip nhrp shortcut
The following example shows the output of the show ip route and show ip route nhrp commands. These commands can be used to show the current state of the routing table. NHRP entries are flagged “H”.
Router#
show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C 10.1.1.0/24 is directly connected, Tunnel0
C 172.16.22.0 is directly connected, Ethernet1/0
H 172.16.99.0 [250/1] via 1.1.1.99, 00:11:43, Tunnel0
10.2.2.0/24 is subnetted, 1 subnets
C 10.11.11.0 is directly connected, Ethernet0/0
Router#
show ip route nhrp
H 172.16.99.0 [250/1] via 10.1.1.99, 00:11:43, Tunnel0
The following sample output displays the NHRP next-hop overrides associated with a particular route and the corresponding
default next hops, when the following next-hop override is added:
-
IP address: 10.50.10.0
-
Mask: 255.255.255.0
-
Gateway: 10.1.1.1
-
Interface: Tunnel0
Router#
show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP
+ - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.2.1.0/24 is directly connected, Loopback1
L 10.2.1.1/32 is directly connected, Loopback1
10.50.0.0/24 is subnetted, 1 subnets
% S 10.50.10.0 is directly connected, Tunnel0
10.30.0.0/24 is subnetted, 1 subnets
S 10.30.11.0 is directly connected, Ethernet0/0
Router#
show ip route next-hop-override
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP
+ - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.2.1.0/24 is directly connected, Loopback1
L 10.2.1.1/32 is directly connected, Loopback1
10.50.0.0/24 is subnetted, 1 subnets
% S 10.50.10.0 is directly connected, Tunnel0
[NHO][1/0] via 10.1.1.1, Tunnel0
10.30.0.0/24 is subnetted, 1 subnets
S 10.30.11.0 is directly connected, Ethernet0/0
Router#
show ip cef
Prefix Next Hop Interface
10.2.1.255/32 receive Loopback110.10.10.0/24
10.50.10.0/24 10.1.1.1 Tunnel0
10.30.11.0/24 attached Ethernet0/0
127.0.0.0/8 drop
The following example displays the output of the show ip route and show ip route next-hop-override commands after the following next-hop override is deleted:
-
IP address: 10.50.10.0
-
Mask: 255.255.255.0
-
Gateway: 10.1.1.1
-
Interface: Tunnel0
Router#
show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP
+ - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.2.1.0/24 is directly connected, Loopback1
L 10.2.1.1/32 is directly connected, Loopback1
10.50.0.0/24 is subnetted, 1 subnets
% S 10.50.10.0 is directly connected, Tunnel0
10.30.0.0/24 is subnetted, 1 subnets
S 10.30.11.0 is directly connected, Ethernet0/0
Router#
show ip route next-hop-override
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP
+ - replicated route
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.2.1.0/24 is directly connected, Loopback1
L 10.2.1.1/32 is directly connected, Loopback1
10.50.0.0/24 is subnetted, 1 subnets
S 10.50.10.0 is directly connected, Tunnel0
10.30.0.0/24 is subnetted, 1 subnets
S 10.30.11.0 is directly connected, Ethernet0/0
Router#
show ip cef
Prefix Next Hop Interface
10.2.1.255/32 receive Loopback110.10.10.0/24
10.50.10.0/24 attached Tunnel0
10.30.11.0/24 attached Ethernet0/0
127.0.0.0/8 drop
The following sample output shows the information displayed by the show ip nhrp command when a cache entry has an associated NHRP next-hop override in the RIB. Note that the flags for the entry are displayed
as “router rib” and not “router candidate”.
Router#
show ip nhrp
10.1.1.22/32 via 10.1.1.22
Tunnel0 created 00:00:06, expire 00:02:23
Type: dynamic, Flags: router implicit
NBMA address: 10.11.11.22
10.1.1.99/32 via 10.1.1.99
Tunnel0 created 4d04h, never expire
Type: static, Flags: used
NBMA address: 10.11.11.99
172.16.11.0/24 via 10.1.1.11
Tunnel0 created 00:00:06, expire 00:02:23
Type: dynamic, Flags: router unique local
NBMA address: 10.11.11.11
(no-socket)
172.16.22.0/24 via 10.1.1.22
Tunnel0 created 00:00:05, expire 00:02:24
Type: dynamic, Flags: router rib
NBMA address: 10.11.11.22
The following example shows the output displayed by the show ip nhrp command when a cache entry has an NHRP next-hop override added to the RIB. If the corresponding cache entry has an associated
NHRP next-hop override in the RIB, the flags are displayed as “router rib nho”.
Router#
show ip nhrp
10.1.1.22/32 via 10.1.1.22
Tunnel0 created 00:00:06, expire 00:02:23
Type: dynamic, Flags: router implicit
NBMA address: 10.11.11.22
10.1.1.99/32 via 10.1.1.99
Tunnel0 created 4d04h, never expire
Type: static, Flags: used
NBMA address: 10.11.11.99
172.16.11.0/24 via 10.1.1.11
Tunnel0 created 00:00:06, expire 00:02:23
Type: dynamic, Flags: router unique local
NBMA address: 10.11.11.11
(no-socket)
172.16.22.0/24 via 10.1.1.22
Tunnel0 created 00:00:05, expire 00:02:24
Type: dynamic, Flags: router rib nho
NBMA address: 10.11.11.22
The following example shows the output displayed by the show ip nhrp shortcut command. This command displays only the NHRP cache entries that have an associated NHRP route or NHRP next-hop override.
Router#
show ip nhrp shortcut
172.16.22.0/24 via 10.1.1.22
Tunnel0 created 00:00:05, expire 00:02:24
Type: dynamic, Flags: router rib
NBMA address: 10.11.11.22
172.16.22.0/24 via 10.1.1.22
Tunnel0 created 00:00:05, expire 00:02:24
Type: dynamic, Flags: router rib nho
NBMA address: 10.11.11.22
The following example shows the output displayed by the show dmvpn command. The output indicates a route installation in the attributes section of the command output.
Router#
show dmvpn
Legend: Attrb --> S - Static, D - Dynamic, I - Incomplete
N - NATed, L - Local, X - No Socket, T1 - Route Installed,
T2 - Nexthop-override
# Ent --> Number of NHRP entries with same NBMA peer
NHS Status: E --> Expecting Replies, R --> Responding
UpDn Time --> Up or Down Time for a Tunnel
==========================================================================
Interface: Tunnel0, IPv4 NHRP Details
IPv4 Registration Timer: 60 seconds
IPv4 NHS: 10.1.1.99 RE
Type:Spoke, Total NBMA Peers (v4/v6): 2
# Ent Peer NBMA Addr Peer Tunnel Add State UpDn Tm Attrb Target Network
----- --------------- --------------- ----- -------- ----- -----------------
2 10.11.11.22 192.1.1.22 UP 00:10:11 D 192.1.1.22/32
0 10.11.11.22 173.1.1.22 UP 00:10:11 DT1 172.16.22.0/24
1 10.11.11.99 173.1.1.99 UP 02:18:29 S 173.1.1.99/32
The example shows how to clear NHRP cache entries on tunnel interface 1 that have associated NHRP routes or nexthop overrides:
Router(config)# clear ip nhrp shortcut Tunnel1