The ipv6 neighbor command configures static neighbor entries.
The undo ipv6 neighbor command deletes static neighbor entries.
By default, no static neighbor entry is configured.
VLANIF interface view:
ipv6 neighbor ipv6-address mac-address vid vlan-id interface-type interface-number
undo ipv6 neighbor ipv6-address
Ethernet interface view, Eth-Trunk interface view, Ethernet sub-interface view, and Eth-Trunk sub-interface view:
ipv6 neighbor ipv6-address mac-address [ vid vlan-id [ cevid cevid ] ]
undo ipv6 neighbor ipv6-address
Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support the command in Ethernet interface view and Ethernet sub-interface view.
Parameter | Description | Value |
---|---|---|
ipv6-address |
Specifies the IPv6 address of a static neighbor entry. |
The value consists of 128 octets, which are classified into 8 groups. Each group contains 4 hexadecimal numbers in the format X:X:X:X:X:X:X:X. |
mac-address |
Specifies the MAC address of a static neighbor entry. |
The value is in the H-H-H format. An H contains one to four hexadecimal numbers. |
vid vlan-id |
Specifies the ID of the outer VLAN to which the interface belongs. |
The value is an integer that ranges from 1 to 4094. |
cevid cevid |
Specifies the ID of the inner VLAN to which the interface belongs. |
The value is an integer that ranges from 1 to 4094. |
interface-type interface-number |
Specifies the interface type and number of a physical interface. |
- |
Usage Scenario
To filter invalid packets, you can create static neighbor entries, binding the destination IPv6 addresses of these packets to nonexistent MAC addresses.
Prerequisites
The IPv6 function has been enabled on the interface using the ipv6 enable command in the interface view.
Precautions
A neighbor entry enters the REACHABLE state after being created, indicating that the interface connected to this neighbor is Up.
The static neighbor entries overwrite the neighbor entries dynamically learnt by device. That is, static neighbor entries are of higher priorities than dynamically learnt neighbor entries.
If the IPv6 address or MAC address specified in the ipv6 neighbor command is incorrect, communication with this neighbor fails.
# Configure static neighbor entries on VLANIF100.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] ipv6 enable [HUAWEI-Vlanif100] ipv6 neighbor fc00::1 0019-7459-3301 vid 2 gigabitethernet 0/0/1
# Configure static neighbor entries on GE0/0/1.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ipv6 enable [HUAWEI-GigabitEthernet0/0/1] ipv6 neighbor fc00::1 0019-7459-3301