< Home

user-bind static

Function

The user-bind static command configures a static binding table.

The undo user-bind static command deletes a static binding table.

By default, no static binding table is configured.

Format

user-bind static { { { ip-address | ipv6-address } { start-ip [ to end-ip ] } &<1-10> | ipv6-prefix prefix/prefix-length } | mac-address mac-address } * [ interface interface-type interface-number ] [ vlan vlan-id [ ce-vlan ce-vlan-id ] ]

undo user-bind static [ { ip-address { start-ip [ to end-ip ] } &<1-10> | ipv6-address [ start-ip [ to end-ip ] ] &<1-10> | ipv6-prefix [ prefix/prefix-length ] } | mac-address mac-address | interface interface-type interface-number | vlan vlan-id [ ce-vlan ce-vlan-id ] ] *

Parameters

Parameter Description Value
interface interface-type interface-number Specifies the interface connected to a user in a static binding entry.
  • interface-type specifies the interface type.
  • interface-number specifies the interface number.

-

ip-address Indicates the static IPv4 address. -
ipv6-address Indicates the static IPv6 address. -
start-ip [ to end-ip ] Specifies the user IP address in a static binding entry.
  • start-ip specifies the first IP address.
  • to end-ip specifies the last IP address. The value of end-ip must be larger than the value of start-ip. start-ip and end-ip identify a VLAN range.

If to end-ip is not specified, only the start IP address is added to the static binding entry.

You can specify a maximum of 10 VLAN ranges at a time. The entered VLAN ranges cannot overlap.

The IPv4 address is in dotted decimal notation in the format of X.X.X.X. The value is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X.
ipv6-prefix prefix/prefix-length Specifies the prefix of an IPv6 address The prefix 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. prefix-length is an integer that ranges from 1 to 128.
mac-address mac-address Specifies the user MAC address in a static binding entry. The value is in hexadecimal notation.

The value is in the format of H-H-H.

vlan vlan-id Specifies the user VLAN ID in a static binding entry. The value is an integer that ranges from 1 to 4094.
ce-vlan ce-vlan-id Specifies the inner VLAN tag of a QinQ packet in a static binding entry. The value is an integer that ranges from 1 to 4094.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When DHCP snooping is enabled, a dynamic binding table is automatically generated for dynamic users. However, a static binding table cannot be generated for static users. If IP source guard is enabled but no static binding table is available, the device discards all static users' forwarding packets. To enable the device to forward static users' packets, run the user-bind static command to configure a static binding table.

Precautions

After a static binding table is configured and IP source guard is enabled, the device performs a match check on IP packets based on the configured binding entries. If the match check fails, the device discards the IP packets.

Example

# Configure a static binding entry for a user in VLAN 2 with the IP address 10.1.1.1.

<HUAWEI> system-view
[HUAWEI] user-bind static ip-address 10.1.1.1 vlan 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >