Clearing the Neighbor Cache

When there is an event such as a topology change or an address change, the neighbor cache may have too many entries to allow efficient use. Also, if an unauthorized client is answering DAD or normal neighbor solicitations with invalid replies, the neighbor cache may contain many invalid entries and communication with some valid hosts may fail The show ipv6 neighbors command output also may become too cluttered to efficiently read. In such cases, the fastest way to restore optimum traffic movement on a VLAN may be to statically clear the neighbor table instead of waiting for the unwanted entries to time out.

Syntax:

clear ipv6 neighbors

Executed at the global config level, this command removes all nonlocal IPv6 neighbor addresses and corresponding MAC addresses from the neighbor cache, except neighbor entries specified as next-hops for active routes. The Layer-2 address information for any next-hop route is cleared until the route is refreshed in the neighbor cache. An example for clearing the IPv6 neighbors cache is:
Switch(config)# clear ipv6 neighbors
Switch(config)# show ipv6 neighbors

Switch# show ipv6 neighbors

 IPv6 ND Cache Entries

 IPv6 Address                MAC Address   State Type    Port
 ––––––––––––––––––––––––––– ––––––––––––– ––––– ––––––– ––––
 fe80::213:c4ff:fedd:14b0    000000–000000 INCMP dynamic 

For an active-route next-hop, the MAC address and source port data is removed, and the State is set to “Incomplete” (INCMP) until the route is refreshed in the neighbor cache.