dhcp snooping bind-table dynamic (VLAN 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 ] interface { interface-name | interface-type interface-number } [ 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.

interface interface-type interface-number

Specifies the type and number of an interface. The specified interface must be a Layer 2 interface and has been added to the current VLAN.

-

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

VLAN 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 in the VLAN.
  • DHCP snooping is enabled on interfaces in the VLAN.
  • DHCP snooping is enabled on the VLANIF interface of the VLAN.

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 in VLAN 10.
<HUAWEI> system-view
[~HUAWEI] dhcp snooping enable
[*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 enable interface GigabitEthernet 0/1/6
[*HUAWEI-vlan10] dhcp snooping bind-table dynamic ip-address 10.10.10.2 mac-address 00e0-fc20-0327 interface GigabitEthernet 0/1/6
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >