Configuring Static Neighbors
Context
To communicate with a destination host, a host needs to obtain the destination host's link-layer address. The link-layer address of a neighbor node can be obtained using the neighbor discovery mechanism, or by manually configuring static neighbor entries. A device identifies a static neighbor entry based on the IPv6 address of this neighbor and number of the Layer 3 interface connected to this neighbor. To filter invalid packets, you can create static neighbor entries, binding the destination IPv6 addresses of these packets to nonexistent MAC addresses.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The specified interface view is displayed.
- (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
- Run ipv6 enable
The IPv6 function is enabled.
- Run the following commands to configure static neighbors based on the interface type.
For the Ethernet interface, run the ipv6 neighbor ipv6-address mac-address command.
For a VLANIF interface, run the ipv6 neighbor ipv6-address mac-address vid vlan-id interface-type interface-number command.