The dhcp snooping bind-table static command configures the static binding between IP addresses and MAC addresses in the DHCP snooping binding table.
The undo dhcp snooping bind-table static command cancels the static binding between IP addresses and MAC addresses in the DHCP snooping binding table.
By default, the static binding between IP addresses and MAC addresses in the DHCP snooping binding table is not configured.
dhcp snooping bind-table static ip-address ip-address [ mac-address mac-address ] [ interface { interface-name | interface-type interface-number } [ ce-vlan ce-vlan-id ] ]
undo dhcp snooping bind-table static ip-address ip-address [ mac-address mac-address ] [ interface { interface-name | interface-type interface-number } [ ce-vlan ce-vlan-id ] ]
Parameter | Description | Value |
---|---|---|
ip-address ip-address |
Specifies the IP address. |
The value is in dotted decimal notation. |
mac-address mac-address |
Specifies the MAC address. |
The value is in the format of H-H-H. Each H contains one to four hexadecimal numbers, such as 00e0 and fc01. If an H contains less than four bits, 0s are padded ahead. For example, an H is e0. It is displayed as 00e0 in the MAC address. |
interface interface-name |
Specifies the interface name. |
- |
interface interface-type interface-number |
Specifies the interface type and number. |
- |
ce-vlan ce-vlan-id |
Specifies the CE VLAN ID. |
The value ranges from 1 to 4094. |
Usage Scenario
You can run the dhcp snooping bind-table static command to configure static DHCP snooping binding entries. Dynamic DHCP snooping binding entries do not need to be configured but are automatically generated when DHCP snooping is enabled.
The static entry to be deleted must exist in the DHCP snooping binding table.Precautions
Layer 3 interfaces have to be switched to Layer 2 interfaces before being added to a VLAN. Otherwise, Layer 3 interfaces cannot be added to a VLAN.
<HUAWEI> system-view [~HUAWEI] vlan 10 [*HUAWEI-vlan10] quit [*HUAWEI] interface GigabitEthernet 0/1/6 [*HUAWEI-GigabitEthernet0/1/6] portswitch [*HUAWEI-GigabitEthernet0/1/6] port default vlan 10 [*HUAWEI-GigabitEthernet0/1/6] quit [*HUAWEI] vlan 10 [*HUAWEI-vlan10] dhcp snooping bind-table static ip-address 10.10.10.2 mac-address 00e0-fc20-0327 interface GigabitEthernet 0/1/6