dhcp snooping bind-table dynamic (interface view)

Function

The dhcp snooping bind-table dynamic command configures a dynamic binding between an IP address and a MAC address in the DHCP snooping binding table.

Format

dhcp snooping bind-table dynamic ip-address ip-address [ mac-address mac-address ] [ vlan vlan-id [ ce-vlan ce-vlan-id ] ] [ lease day [ hour [ minute ] ] ]

Parameters

Parameter Description Value
ip-address ip-address

Specifies a user IP address.

The value is in dotted decimal notation.

mac-address mac-address

Specifies a user 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.

vlan vlan-id

Specifies an outer VLAN ID.

The value is an integer ranging from 1 to 4094.

ce-vlan ce-vlan-id

Specifies an inner VLAN ID.

The value is an integer ranging from 1 to 4094.

lease day

Specifies the number of days in a lease.

The value is an integer ranging from 0 to 999. The default value is 7.

hour

Specifies the number of hours in a lease.

The value is an integer ranging from 0 to 23. The default value is 0.

minute

Specifies the number of minutes in a lease.

The value is an integer ranging from 0 to 59. The default value is 0.

Views

100GE interface view, 10GE interface view, 40GE interface view, Eth-Trunk interface view, FlexE sub-interface view, GE optical interface view, GE electrical interface view, Sub-interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp execute

Usage Guidelines

Usage Scenario

In a cutover scenario, if the non-Huawei device to be replaced has generated a dynamic DHCP snooping binding for a user's IP address and MAC address, run the dhcp snooping bind-table dynamic command on the Huawei device to configure the same dynamic binding for the user. This configuration prevents the user's services from being interrupted during the cutover. When the user requires to update the lease, the Huawei device will update the user's lease and generate a normal dynamic binding entry for the user.

Prerequisites

DHCP snooping has been enabled using the dhcp snooping enable command. DHCP snooping is considered enabled if any of the following conditions is met:

  • DHCP snooping is enabled on an interface.
  • An interface is bound to a BD for which DHCP snooping is enabled.
  • An interface is bound to a BD, and DHCP snooping is enabled for the BDIF interface of the BD.

Precautions

When dynamic DHCP snooping binding entries are deleted using the reset dhcp snooping bind-table command, user entries will be deleted, interrupting services. Therefore, exercise caution when running this reset command.

Example

# Configure a dynamic binding between an IP address and a MAC address on GE 0/1/6.
<HUAWEI> system-view
[~HUAWEI] dhcp snooping enable
[*HUAWEI] interface GigabitEthernet 0/1/6
[*HUAWEI-GigabitEthernet0/1/6] dhcp snooping enable
[*HUAWEI-GigabitEthernet0/1/6] commit
[~HUAWEI-GigabitEthernet0/1/6] dhcp snooping bind-table dynamic ip-address 10.10.10.2 mac-address 00e0-fc20-0327
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >