Tip

This is the documentation for the 23.11 version. Looking for the documentation of the latest version? Have a look here.

Neighbors

For directly connected networks which operate at layer 2, TNSR will attempt to locate neighboring hosts via Address Resolution Protocol (ARP) for IPv4 or Neighbor Discover Protocol (NDP) for IPv6. In this way, TNSR can discover the hardware MAC address to which a packet will be delivered in these networks.

Static Neighbors

Static neighbor entries can override this dynamic behavior so that a specified IPv4 or IPv6 address is always associated with the same MAC address.

The command to specify a static neighbor takes the following form:

tnsr(config)# neighbor <interface> <ip-address> <mac-address> [no-adj-route-table-entry]

The parameters for this command are:

<interface>:

The interface on which this static entry will be placed.

Note

This interface must support layer 2 (L2) data. Neighbors cannot be configured on interfaces which only support layer 3 (L3), such as ipip or gre interfaces.

<ip-address>:

The IPv4 or IPv6 address for the static neighbor entry.

<mac-address>:

The MAC address to associate with the given IP address.

no-adj-route-table-entry:

Do not create an adjacency route table entry.

For example, to add a static entry to map 1.2.3.4 to a MAC address of 00:11:22:33:44:55 on the interface GigabitEthernet3/0/0, run this command from config mode:

tnsr(config)# neighbor GigabitEthernet3/0/0 1.2.3.4 00:11:22:33:44:55

View Neighbors

To see the current table of known IPv4 and IPv6 neighbors, use the show neighbor [interface <if-name>] command.

Note

In other products, this information may be referred to as the ARP table or NDP table.

tnsr# show neighbor

            Interface S/D   IP Address MAC Address
--------------------- --- ------------ -----------------
GigabitEthernet0/14/0   D  203.0.113.1 00:90:0b:37:a3:24
GigabitEthernet0/14/0   D 203.0.113.14 00:0d:b9:33:0f:71
 GigabitEthernet3/0/0   S      1.2.3.4 00:11:22:33:44:55
 GigabitEthernet3/0/0   D   10.2.0.129 00:0c:29:4c:b3:9b

This output can optionally be filtered by interface name.

The S/D column shows if the entry is static (S) or dynamic (D).

Neighbor Cache Options

The behavior of the neighbor cache can be fine-tuned as needed.

neighbor cache-options (ipv4|ipv6) max-number <max-num-val>:

This command controls the maximum capacity of the neighbor cache, which by default is 50000 entries.

neighbor cache-options (ipv4|ipv6) max-age <max-age-sec>:

This command controls the duration, in seconds, for which the dataplane will consider a neighbor entry valid in the cache. The default value is 300 seconds. When this timer expires the dataplane will probe the neighbor to see if it is still active. If it’s still active, the neighbor will remain in the cache. If the neighbor does not respond, it can be removed from the cache.

The special value of 0 sets an unlimited duration which also disables the recycling of entries from the neighbor cache.

To view the current configuration, use the show neighbor cache-options command:

tnsr# show neighbor cache-options

Neighbor Cache Options
----------------------
IPv4:
    Max number: 50000
    Max age: 300s
    Recycle: enable
IPv6:
    Max number: 50000
    Max age: 300s
    Recycle: enable