NHRP Commands: A through Z

address-family

To enter the address family configuration mode for an NHRP routing process, use the address-family command. To disable the configuration for an address family, use the no form of the command.

address-family { ipv4 [ vrf vrf-name ] | vpnv4 } [unicast]

no address-family { ipv4 [ vrf vrf-name ] | vpnv4 } [unicast]

Syntax Description

ipv4

Configure NHRP for the IPv4 address family.

vrf vrf-name

Specify parameters for a VPN Routing/Forwarding instance.

vpnv4

Configure NHRP for the VPNv4 address family.

unicast

Unicast address family modifier.

Command Default

NHRP is configured for an address family by default.

Command Modes

Router configuration (config-router)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Examples

The following example places the router in address family configuration mode for the IPv4 address family:

Router(config)# router nhrp 50000
Router(config-router)# address-family ipv4
Router(config-router-af)#

default-metric

To set a default metric for routes redistributed into NHRP, use the default-metric command in address family or router configuration mode. To remove the configured value and return NHRP to default operation, use the no form of this command.

default-metric number

no default-metric number

Syntax Description

number

Default preference value applied to the redistributed route. The range of values for this argument is from 1 to 255.

Command Default

The following is the default behavior if this command is not configured or if the no form of this command is entered: the preference configured on the interface through which the route is published is used. The default value of the preference is 255.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Usage Guidelines

The default-metric command is used to set the metric value for routes redistributed into NHRP.


Note

When enabled, the default-metric command applies a metric value of 0 to redistributed connected routes. The default-metric command does not override metric values that are applied with the redistribute command.


Examples

In the following example, a metric of 254 is set for routes redistributed into NHRP from OSPF:


Router(config)# router nhrp 50000 
Router(config-router)# address-family ipv4 unicast
 
Router(config-router-af)# default-metric 254
Router(config-router-af)# redistribute ospf 10 
Router(config-router-af)# end

distance

To define an administrative distance for a host, or the NHRP distance for registered, resolved, or summary routes, use the distance command in the router configuration mode. To revert to the default administrative distance or NHRP distane, use the no form of the command.

distance { admin-distance [ source-ip-addr wildcard [ acl-number | ext-acl-number | acl-name ] ] | nhrp { registered reg-nhrp-distance [ resolved res-nhrp-distance ] [ summary sum-nhrp-distance ] | resolved res-nhrp-distance [ registered reg-nhrp-distance ] [ summary sum-nhrp-distance ] | summary sum-nhrp-distance [ registered reg-nhrp-distance ] [ resolved res-nhrp-distance ] } }

no distance { admin-distance [ source-ip-addr wildcard [ acl-number | ext-acl-number | acl-name ] ] | nhrp { registered reg-nhrp-distance [ resolved res-nhrp-distance ] [ summary sum-nhrp-distance ] | resolved res-nhrp-distance [ registered reg-nhrp-distance ] [ summary sum-nhrp-distance ] | summary sum-nhrp-distance [ registered reg-nhrp-distance ] [ resolved res-nhrp-distance ] } }

Syntax Description

admin-distance

The administrative distance.

Range: 1–255.

source-ip-addr

32-bit source IP address in four-part, dotted-decimal format.

wildcard

Wildcard bits to be applied to the source in four-part, dotted-decimal format.

acl-number

Standard IP access list number.

Range: 1–199.

ext-acl-number

Expanded access list number.

Range: 1300–1999.

acl-name

Standard access-list name.

nhrp

Define the NHRP distance for registered, resolved, or summary routes.

registered reg-nhrp-distance

Define the NHRP distance for registered routes.

resolved res-nhrp-distance

Define the NHRP distance for resolved routes.

summary sum-nhrp-distance

Define the NHRP distance for registration summary routes.

Command Default

The default administrative distance is 250.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Examples

In the following example, the router nhrp global configuration command sets up NHRP routing with process-id 109. The network router configuration commands specify NHRP routing on networks 192.168.7.0 and 172.16.0.0. The first distance command sets the administrative distance to 90 for all routers on the Class C network 192.168.7.0. The second distance command sets the administrative distance to 120 for the router with the address 172.16.1.3. The third distance command sets the NHRP distance for registered, resolved, and summary NHRP routes.

Router> enable
Router# configure terminal
Router(config)# router nhrp 109
Router(config-router)# network 192.168.7.0
Router(config-router)# network 172.16.0.0
Router(config-router)# distance 90 192.168.7.0 0.0.0.255
Router(config-router)# distance 120 172.16.1.3 0.0.0.255
Router(config-router)# distance nhrp resolved 200 registered 25 summary 50
Router(config-router)# end

distribute-list in

To filter routes or networks received in incoming NHRP updates (in registration/resolution), use the distribute-list in command in router configuration mode. To delete the distribute list and remove it from the running configuration file, use the no form of this command.

distribute-list { acl-number | ext-acl-number | acl-name | route-map route-map-name | prefix list-name gateway prefix-list | gateway prefix-list } in [ interface-type interface-number ]

no distribute-list { acl-number | ext-acl-number | acl-name | route-map route-map-name | prefix list-name gateway prefix-list | gateway prefix-list } in [ interface-type interface-number ]

Syntax Description

acl-number

IP access list number. The access list defines which networks are to be received and which are to be suppressed in routing updates.

Range: 1–199.

ext-acl-number

Expanded access list number.

Range: 1300–1999.

acl-name

Standard access-list name.

prefix list-name

Name of a prefix list. The prefix list defines which networks are to be received and which are to be suppressed in routing updates, based upon matching prefixes.

gateway prefix-list

Gateway based on which the incoming updates are filtered.

route-map route-map-name

Name of the route map that defines which networks are to be installed in the routing table and which are to be filtered from the routing table.

in

Applies the access list to incoming routing updates.

interface-type

Optional: Interface type.

interface-number

Optional: Interface number on which the access list should be applied to incoming updates. If no interface is specified, the access list will be applied to all incoming updates. The interface-type and interface-number arguments can apply if you specify an access list.

Command Default

If this command is not configured, the distribute list will default to permitting all traffic.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Usage Guidelines

The distribute-list in command is used to filter incoming NHRP updates. An access list, prefix list, gateway, or route map must be defined prior to configuration of this command. Standard and expanded access lists are supported. IP prefix lists are used to filter based on the bit length of the prefix. An entire network, subnet, supernet, or single host route can be specified. Existing sessions must be reset with the clear ip nhrp command before the distribute list will take effect.


Note

Interface type and number arguments may be displayed in the CLI depending on the version of Cisco IOS software you are using. However, the interface arguments are not supported in any Cisco IOS software release.


To suppress networks from being advertised in updates, use the distribute-list out command.

Examples

In the following example, a prefix list and distribute list are defined to configure the NHRP routing process to accept traffic from only network 10.1.1.0/24, network 192.168.1.0, and network 10.108.0.0. An inbound route refresh is initiated to activate the distribute-list.


Router(config)# ip prefix-list RED permit 10.1.1.0/24
Router(config)# ip prefix-1ist RED permit 10.108.0.0/16
 
Router(config)# ip prefix-list RED permit 192.168.1.0/24
 
Router(config)# router nhrp 50000
 
Router(config-router)# network 10.108.0.0
 
Router(config-router)# distribute-list prefix RED in
 
Router(config-router)# end 
Router# clear ip nhrp

In the following example, an access list and distribute list are defined to configure the NHRP routing process to accept routes for the network 192.168.1.0 and network 10.108.0.0.


Router(config)# access-list 1 permit 192.168.1.0
 
Router(config)# access-list 1 permit 10.108.0.0
 
Router(config)# router nhrp 50000
 
Router(config-router)# network 10.108.0.0 
Router(config-router)# distribute-list 1 in 
Router(config-router)# end 
Router# clear ip nhrp

distribute-list out

To suppress networks from being advertised in outbound NHRP updates (registration or resolution), use the distribute-list command in router configuration mode. To delete the distribute list and remove it from the running configuration file, use the no form of this command.

distribute-list { acl-number | ext-acl-number | acl-name | route-map route-map-name | prefix list-name gateway prefix-list | gateway prefix-list } out [ interface-type interface-number ]

no distribute-list { acl-number | ext-acl-number | acl-name | route-map route-map-name | prefix list-name gateway prefix-list | gateway prefix-list } out [ interface-type interface-number ]

Syntax Description

acl-number

IP access list number. The access list defines which networks are to be received and which are to be suppressed in routing updates.

Range: 1–199.

ext-acl-number

Expanded access list number.

Range: 1300–1999.

acl-name

Standard access-list name.

prefix list-name

Name of a prefix list. The prefix list defines which networks are to be received and which are to be suppressed in routing updates, based upon matching prefixes.

gateway prefix-list

Gateway based on which the incoming updates are filtered.

route-map route-map-name

Name of the route map that defines which networks are to be installed in the routing table and which are to be filtered from the routing table.

out

Applies the access list to outgoing routing updates.

interface-type

Optional: Interface type.

interface-number

Optional: Interface number on which the access list should be applied to incoming updates. If no interface is specified, the access list will be applied to all incoming updates. The interface-type and interface-number arguments can apply if you specify an access list.

Command Default

If this command is configured, the distribute list will default to permitting all traffic.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Gibraltar 16.12.1

This command was introduced.

Usage Guidelines

The distribute-list out command is used to filter outbound NHRP updates. An access list, prefix list, gateway, or route map must be defined prior to configuration of this command. Standard and expanded access lists are supported. IP prefix lists are used to filter based on the bit length of the prefix. An entire network, subnet, supernet, or single host route can be specified. Prefix list and access list configuration is mutually exclusive when configuring a distribute list. The command takes effect only for subsequent updates. Hence, the session must be reset with the clear ip nhrp command for this change to take effect immediately.


Note

Interface type and number arguments may be displayed in the CLI depending on the version of Cisco IOS software you are using. However, the interface arguments are not supported in any Cisco IOS software release.


Addresses not specified in the distribute-list command will not be advertised in outgoing routing updates after a distribute list is configured.

To suppress networks or routes from being received in inbound updates, use the distribute-list in command.

Examples

In the following example, a prefix list and distribute list are defined to configure the nhrp routing process to advertise only network 192.168.0.0. An outbound route refresh is initiated to activate the distribute-list.


Router(config)# ip prefix-list BLUE permit 192.168.0.0/16
 
Router(config)# router nhrp 50000 
Router(config-router)# distribute-list prefix BLUE out
 
Router(config-router)# end
 
Router# clear ip nhrp

In the following example, an access list and a distribute list are defined to configure the nhrp routing process to advertise only network 192.168.0.0.


Router(config)# access-list 1 permit 192.168.0.0 0.0.255.255
 
Router(config)# access-list 1 deny 0.0.0.0 255.255.255.255
 
Router(config)# router nhrp 50000
 
Router(config-router)# distribute-list 1 out 
Router(config-router)# end 
Router# clear ip nhrp
 

import bgp

To configure NHRP to import routes from BGP, use the import bgp command in the address family configuration mode. To disable importing of routes, use the no form of the command.

import bgp autonomous-system-number

no import bgp autonomous-system-number

Syntax Description

autonomous-system-number

The autonomous system number of the BGP routing process from which NHRP imports routes.

Command Default

NHRP does not import routes from BGP.

Command Modes

Address family configuration (VPNv4)

Command History

Release Modification
Cisco IOS XE Amsterdam 17.2.1

Command introduced.

Usage Guidelines

This command supports the deployment of Spoke nodes as 'P' nodes in an MPLS over DMVPN Phase 3 deployment. Configure this command on a Spoke node deployed as an MPLS 'P' node so that NHRP imports information including route(prefix/mask), RD, RT and other opaque data (needed by BGP to reconstruct the VPNv4 prefix at the other end).

Examples

router nhrp 1
 redistribute connected
 !
 address-family vpnv4
  import bgp 65126
 exit-address-family

ip-nhrp-bfd-delete

To delete a tunnel entry when Bidirectional Forwarding Detection (BFD) support is down, use the ip nhrp bfd delete command. By default, the tunnel entry is not immediately deleted and is deleted after expiry of the entry. To disable this feature, use the no form of this command.

ip nhrp bfd delete

no ip nhrp bfd delete

Syntax Description

delete

Deletes tunnel entry on BFD down event.

notify

Sets registration retry count for notification

strict-mode

Enables BFD in strict mode.

Command Default

The tunnel entry is not immediately deleted and is deleted after expiry of the entry.

Command Modes

Router configuration (config-router)

Release

Modification

Cisco IOS XE 17.11.1a

This command was introduced.

Usage Guidelines

This command deletes the tunnel entry upon receiving a BFD down event. Without this configuration, the cache entry pertaining to the tunnel address of the peer is not deleted and performs its default behaviour.

Examples

The following example outlines how to delete the tunnel entry details when BFD support is down:


Router(config)# int tun0
Router(config-if)# ip nhrp bfd delete 
router(config-if)#end

maximum-paths

To limit the number of paths for multipath load sharing among NHRP routes, use the maximum-paths command in router configuration mode. To reset multipath load sharing for NHRP routes to the default behavior (32), use the no form of this command.

maximum-paths number-of-paths

no maximum-paths number-of-paths

Syntax Description

number-of-paths

Number of routes to install into the routing table. See the “Usage Guidelines” section for the number of paths that can be configured with this argument.

Command Default

NHRP, by default, will install up to 32 best paths in the routing table.

Command Modes

Router configuration (config-router)

Command History

Release

Modification

Cisco IOS XE Gibraltar 16.12.1

This command was introduced.

Usage Guidelines

The maximum-paths command is used to control the number of paths that NHRP installs in the RIB for any given prefix.

The maximum number of paths that can be configured is 32.

The maximum-paths command only affects paths created after this configuration change. To make the configuration change effective immediately, delete installed NHRP routes.

Examples

In the following example, the router is configured to install six routes:

Device(config)# router nhrp 64496
Router(config-router-af)# maximum-paths 6 

neighbor nhs

To publish routes to Next Hop Servers (NHS) on an interface, use the neighbor nhs command in router configuration mode. To disable this feature, use the no form of this command.

neighbor nhs interface-name

no neighbor nhs interface-name

Syntax Description

interface-name

The name of the interface over which routes must be published to configured Next Hop Servers (NHS).

Command Default

This command is disabled by default.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Usage Guidelines

This command specifies interfaces through which routing information for locally configured networks and any networks that were redistributed into NHRP is published to NHSs connected to the interfaces.

network

To specify the networks to be registered or resolved by the NHRP routing process, use the network command in address family or router configuration mode. To prevent a network from being re-registered or resolved by NHRP, use the no form of this command.

network network-number [wildcard] [passive]

no network network-number [wildcard] [passive]

Syntax Description

network-number

Network that to be registered or resolved by the NHRP routing process.

wildcard

(Optional) Wildcard bits to be applied to the source in four-part, dotted-decimal format.

passive

(Optional) Sets it to passive mode.

Command Default

No networks are specified. However, when no neighbors are configured, NHRP resolves for all networks if resolution is configured.

Command Modes

Address family configuration (config-router-af)

Router configuration (config-router)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Usage Guidelines

NHRP networks can also be learned from connected routes, from dynamic routing, and from static route sources.

The maximum number of network commands you can use is determined by the resources of the router, such as the configured NVRAM or RAM. . It is recommended to keep the number of published networks small to avoid NHRP packet fragmentation. The exact number depends on the size of each Client Information Entry(CIE) and extensions, which in turn depend on other features configured.

Examples

The following example sets up network 10.108.0.0 to be included in the NHRP updates:


router nhrp 65100
 network 10.108.0.0

redistribute nhrp

To redistribute routes from a NHRP system into other routing processes, use the redistribute command in router configuration mode. To remove the redistribute command from the configuration file and restore the system to its default condition where the software does not redistribute NHRP routes, use the no form of this command.

redistribute nhrp process-id [ metric metric-value ] [ registered ] [ resolved ] [ summary ] [ route-map map-tag ] [ tag tag-value ]

no redistribute nhrp process-id [ metric metric-value ] [ registered ] [ resolved ] [ summary ] [ route-map map-tag ] [ tag tag-value ]

Syntax Description

process-id

The ID of NHRP routing process from which NHRP routes are redistributed. The range of values for this argument is any unique number from 1 to 65535.

metric metric-value

(Optional) Metric for the default metric for the specified redistribution.

registered

(Optional) Limit redistribution to registered routes.

resolved

(Optional) Limit redistribution to resolved routes.

route-map map-tag

(Optional) Identifier of a configured route map. The route map should be examined to filter the importation of routes from the routing protocol. If not specified, all routes are redistributed. If the keyword is specified, but no route map tags are listed, no routes will be imported.

summary

(Optional) Limit redistribution to summary.

tag tag-value

(Optional) Set a tag for the redistributed routes.

Command Default

Route redistribution is disabled.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release Modification
Cisco IOS XE Gibraltar 16.12.1

Command introduced.

Usage Guidelines

You can use this command to distribute all or specific NHRP routes. The routes that can be specified are registered, resolved, or summary routes. The keywords ‘registered’, ‘resolved’ and ‘summary’ are used to filter redistributed routes based on their origin. If none of these is specified, all NHRP routes are redistributed when redistribution from NHRP is configured.

Standard redistribution filtering mechanisms such as route-maps and tagging can also be used. The tag value can be specified directly or as a part of a route-map.

Examples

The following example shows how registered NHRP routes are redistributed into a BGP domain:

Router(config)# router bgp 109
Router(config-router)# redistribute nhrp 11 registered

router nhrp

To configure the Next Hop Resolution Protocol (NHRP) routing process, use the router nhrp command in global configuration mode. To remove a NHRP routing process, use the no form of this command.

router nhrp process-id

no router nhrp process-id

Syntax Description

process-id

An NHRP process identifier that identifies the routing process to other other routing processes and tags the routing information that is passed along. Number in the range from 1 to 65535.

Command Default

No NHRP routing process is enabled by default.

An NHRP routing process is also enabled when ip nhrp shortcut or ipv6 nhrp shortcut is configured on an NHRP interface. However, an NHRP process enabled by these commands is used only for on-demand NHRP shortcut routes and Next Hop Overrides (NHOs).

Command Modes

Global configuration (config)

Command History

Release

Modification

Cisco IOS XE Gibraltar 16.12.1

This command was introduced.

Usage Guidelines

This command allows you to set up a dynamic NHRP routing process. This configures NHRP Next Hop Clients (NHCs) to dynamically publish routes to and receive routes from Next Hop Servers(NHSs) without the overhead of a different routing protocol. This allows for standard routing constructs of configuration based selective redistribution, NHRP administrative distance control, route filtering (in-bound and out-bound within NHRP as well as locally with another routing process). This also allows for multipath routing with ECMP or UCMP, traffic share control, and so on. The routing and mapping information exchange between the NHCs follows the same mechanism (broadly) with or without this configuration.


Note

BFD configuration on an NHRP interface is sufficient to enable BFD for NHRP neighbors. Explicit configuration is not needed within the router configuration or address family configuration modes.


Examples

The following example configures a NHRP process with process ID 45000 and configures an NHRP neighbor via the tunnel interface Tunnel1:


router nhrp 45000
 neighbor nhs Tunnel1

traffic-share min

To configure traffic to use minimum-cost routes, when there are multiple routes that have different-cost routes to the same destination network, use thetraffic-share min command in router address family or router configuration mode. To disable this function, use the no form of this command.

traffic-share min across-interfaces

no traffic-share min across-interfaces

Syntax Description

across-interfaces

Configures multi-interface load splitting on several interfaces with equal-cost paths.

Command Default

NHRP load-balances traffic in the ratio of preferences.

Command Modes

Router configuration (config-router)

Address family configuration (config-router-af)

Command History

Release

Modification

Cisco IOS XE Gibraltar 16.12.1

This command was introduced.

Usage Guidelines

The traffic-share min command divides traffic only among the routes with the best metric. Other routes will remain in the routing table, but will receive no traffic. Configuring this command with the across-interfaces keyword allows you to configure multi-interface load splitting on different interfaces with equal-cost paths.

Examples

In the following example, multi-interface load splitting is configured on different interfaces with equal-cost paths:


router nhrp 5
 traffic-share min across-interfaces