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.
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 ] ] *
Parameter | Description | Value |
---|---|---|
interface interface-type interface-number | Specifies the interface connected to a user in a static
binding entry.
|
- |
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.
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. |
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.