.. _clicmd_src_vnet_ip-neighbor:

===============================================================
Ip-neighbor cli reference
===============================================================

ip neighbor
-------------------------------------------------------------------------

.. code-block:: console

    ip neighbor [del] [flush] <intfc> <ip-address> <mac-address> [static] [no-fib-entry] [count <count>]


Declaration: ``ip_neighbor_command2`` `src/vnet/ip-neighbor/ip_neighbor.c line 896 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L896>`_

Implementation: ``ip_neighbor_cmd``


set ip neighbor
-------------------------------------------------------------------------

.. code-block:: console

    set ip neighbor [del] <intfc> <ip-address> <mac-address> [static] [no-fib-entry] [count <count>]



Add or delete IPv4 ARP cache entries.

@note 'set ip neighbor' options (e.g. delete, static,
'count <number>', 'interface ip4_addr mac_addr') can be added in
any order and combination.

Add or delete IPv4 ARP cache entries as follows. MAC Address can be in
either aa:bb:cc:dd:ee:ff format or aabb.ccdd.eeff format.


.. code-block:: console

    set ip neighbor GigabitEthernet2/0/0 6.0.0.3 dead.beef.babe




.. code-block:: console

    set ip neighbor delete GigabitEthernet2/0/0 6.0.0.3 de:ad:be:ef:ba:be



To add or delete an IPv4 ARP cache entry
table:


.. code-block:: console

    set ip neighbor GigabitEthernet2/0/0 6.0.0.3 dead.beef.babe




.. code-block:: console

    set ip neighbor delete GigabitEthernet2/0/0 6.0.0.3 dead.beef.babe



Add or delete IPv4 static ARP cache entries as follows:


.. code-block:: console

    set ip neighbor static GigabitEthernet2/0/0 6.0.0.3 dead.beef.babe




.. code-block:: console

    set ip neighbor static delete GigabitEthernet2/0/0 6.0.0.3 dead.beef.babe



For testing / debugging purposes, the 'set ip neighbor' command can add or
delete multiple entries. Supply the 'count N' parameter:


.. code-block:: console

    set ip neighbor count 10 GigabitEthernet2/0/0 6.0.0.3 dead.beef.babe




Declaration: ``ip_neighbor_command`` `src/vnet/ip-neighbor/ip_neighbor.c line 890 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L890>`_

Implementation: ``ip_neighbor_cmd``


set ip neighbor-config
-------------------------------------------------------------------------

.. code-block:: console

    set ip neighbor-config ip4|ip6 [limit <limit>] [age <age>] [recycle|norecycle]


Declaration: ``set_ip_neighbor_cfg_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1868 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1868>`_

Implementation: ``ip_neighbor_config_set``


show ip neighbor
-------------------------------------------------------------------------

.. code-block:: console

    show ip neighbor [interface]


Declaration: ``show_ip_neighbor_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1060 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1060>`_

Implementation: ``ip_neighbor_show``


show ip neighbor-config
-------------------------------------------------------------------------

.. code-block:: console

    show ip neighbor-config


Declaration: ``show_ip_neighbor_cfg_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1863 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1863>`_

Implementation: ``ip_neighbor_config_show``


show ip neighbor-stats
-------------------------------------------------------------------------

.. code-block:: console

    show ip neighbor-stats [interface]


Declaration: ``show_ip_neighbor_stats_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1874 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1874>`_

Implementation: ``ip_neighbor_stats_show``


show ip neighbor-watcher
-------------------------------------------------------------------------

.. code-block:: console

    show ip neighbors-watcher


Declaration: ``show_ip_neighbor_watchers_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor_watch.c line 248 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor_watch.c#L248>`_

Implementation: ``ip_neighbor_watchers_show``


show ip neighbors
-------------------------------------------------------------------------

.. code-block:: console

    show ip neighbors [interface]



Display all the IP neighbor entries.

Example of how to display the IPv4 ARP table:


.. code-block:: console

    show ip neighbor
    
       Time      FIB        IP4       Flags      Ethernet              Interface
       346.3028   0       6.1.1.3            de:ad:be:ef:ba:be   GigabitEthernet2/0/0
      3077.4271   0       6.1.1.4       S    de:ad:be:ef:ff:ff   GigabitEthernet2/0/0
      2998.6409   1       6.2.2.3            de:ad:be:ef:00:01   GigabitEthernet2/0/0
    Proxy arps enabled for:
    Fib_index 0   6.0.0.1 - 6.0.0.11
    



Declaration: ``show_ip_neighbors_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1045 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1045>`_

Implementation: ``ip_neighbor_show``


show ip4 neighbor
-------------------------------------------------------------------------

.. code-block:: console

    show ip4 neighbor [interface]


Declaration: ``show_ip4_neighbor_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1065 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1065>`_

Implementation: ``ip4_neighbor_show``


show ip4 neighbor-sorted
-------------------------------------------------------------------------

.. code-block:: console

    show ip4 neighbor-sorted


Declaration: ``show_ip4_neighbor_sorted_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1075 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1075>`_

Implementation: ``ip4_neighbor_show_sorted``


show ip4 neighbors
-------------------------------------------------------------------------

.. code-block:: console

    show ip4 neighbors [interface]


Declaration: ``show_ip4_neighbors_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1050 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1050>`_

Implementation: ``ip4_neighbor_show``


show ip6 neighbor
-------------------------------------------------------------------------

.. code-block:: console

    show ip6 neighbor [interface]


Declaration: ``show_ip6_neighbor_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1070 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1070>`_

Implementation: ``ip6_neighbor_show``


show ip6 neighbor-sorted
-------------------------------------------------------------------------

.. code-block:: console

    show ip6 neighbor-sorted


Declaration: ``show_ip6_neighbor_sorted_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1080 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1080>`_

Implementation: ``ip6_neighbor_show_sorted``


show ip6 neighbors
-------------------------------------------------------------------------

.. code-block:: console

    show ip6 neighbors [interface]


Declaration: ``show_ip6_neighbors_cmd_node`` `src/vnet/ip-neighbor/ip_neighbor.c line 1055 <https://github.com/FDio/vpp/blob/master//src/vnet/ip-neighbor/ip_neighbor.c#L1055>`_

Implementation: ``ip6_neighbor_show``