The ipv6 neighbor command configures a static entry in the IPv6 neighbor discovery cache.
The undo ipv6 neighbor command deletes a static entry from the IPv6 neighbor discovery cache.
By default, no static entry is configured.
ipv6 neighbor ipv6-address mac-address vlan vlan-id { interface-type interface-number | interface-name }
ipv6 neighbor ipv6-address mac-address vlan vlan-id cevlan ce-vid { interface-type interface-number | interface-name }
ipv6 neighbor ipv6-address mac-address { interface-type interface-number | interface-name }
ipv6 neighbor ipv6-address mac-address
undo ipv6 neighbor ipv6-address
Parameter | Description | Value |
---|---|---|
ipv6-address |
Specifies the IPv6 address of a static entry. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
mac-address |
Specifies the data link layer address of the static entry. |
The value is in the format of H-H-H. Each H is a 4-digit hexadecimal number, such as 00e0. If you enter fewer than four digits, the system pads 0s before the input digits. For example, if you enter e0, the system changes it to 00e0. |
vlan vlan-id |
Specifies the outer VLAN ID of PE. |
The value is an integer ranging from 1 to 4094. |
interface-type interface-number |
Specifies the type and number of a physical interface. |
- |
interface-name |
Specifies the name of a physical interface. |
- |
cevlan ce-vid |
Specifies the inner VLAN ID of CE. |
The value is an integer ranging from 1 to 4094. |
Usage Scenario
To filter the illegal packets, you can create static ND entries, binding the destination IPv6 addresses of these packets to nonexistent MAC addresses.
Prerequisites
Before running the ipv6 neighbor command to configure a static entry, you need to run the ipv6 enable command in the interface view to enable the IPv6 function on the interface.
Configuration Impact
An ND entry enters the REACHABLE state after being created, indicating that the interface connected to this neighbor is Up. If the interface connected to this neighbor turns Down, the ND entry needs to be deleted.
The static ND entries overwrite the ND entries dynamically learnt by routers. That is, static ND entries are of higher priorities than dynamically learnt ND entries.Precautions