Tuesday, September 24, 2013

Clearing the ARP cache table in ESXi 5.5

A new feature has been added in the new 5.5 release of ESXi.  You can now clear the ARP cache on an ESXi server.  This is a very useful feature that should have always been part of ESXi.  This feature ONLY works with ESXi 5.5.  The KB article contents are below and were copied from http://kb.vmware.com/kb/2049667

Clearing the ARP cache table in ESXi 5.5 (2049667)

Purpose

This article provides information on the new esxcli command introduced in vSphere 5.5 to clear the ARP table. ESXi 3.x, 4.x, and ESXi 5.0/5.1 do not include any mechanism to clear the ARP table.

For more information, see Troubleshooting network connection issues using Address Resolution Protocol (ARP) (1008184).

Resolution

vSphere 5.5 introduces the a new esxcli network ip neighbor remove command to clear the ARP cache table.

To clear the ARP cache table in ESXi 5.5, use this command:
esxcli network ip neighbor remove [options]
Where options includes:
  • -i string or --interface-name=string

    Where string is the name of the VMkernel network interface from which the neighbor entry must be removed. If this option is not specified, the neighbor is removed from all interfaces.
  • -a address or --neighbor-addr=address

    Where address is the IPv4/IPv6 address of the neighbor. This is mandatory.
  • -N instance or --netstack=instance

    Where instance is the network stack instance. If unspecified, the default netstack instance is used.
  • -v number or --version=number

    Where number is the IP version and can either be 4 or 6. This is mandatory.

For example, to delete the ARP entry for address 10.131.0.103:

  1. Connect to the ESXi 5.5 host using SSH. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).
  2. View the current ARP table using this command:

    # esxcli network ip neighbor list

    You see output similar to:

    Neighbor      Mac Address        Vmknic    Expiry  State  Type
    ------------  -----------------  ------   -------  -----  -----
    10.131.0.103  00:1c:c4:a9:6f:fc   vmk0     908 sec        Unknown
    10.131.0.179  00:1e:0b:bf:7a:50   vmk0    1062 sec        Unknown

  3. To delete the ARP entry for address 10.131.0.103, run one of these commands:

    • # esxcli network ip neighbor -v 4 -a 10.131.0.103
    • # esxcli network ip neighbor --version=4 --neighbor-addr=10.131.0.103
  4. View the ARP table again using this command:

    # esxcli network ip neighbor list

    You see output similar to:

    Neighbor      Mac Address        Vmknic    Expiry  State  Type
    ------------  -----------------  ------   -------  -----  -----
    10.131.0.179  00:1e:0b:bf:7a:50   vmk0    750 sec        Unknown

No comments:

Post a Comment