Configuring a Binding Table
Context
IPSG enables the device to check IP packets against the binding table, including dynamic and static entries.
If user IP addresses are dynamically allocated by DHCP, a dynamic binding table is generated after DHCP snooping is enabled. If user IP addresses are configured statically, static binding entries are configured manually.
After a large number of configured binding entries are delivered, you can view the binding entry information only after a period of time.
Procedure
For users dynamically obtaining IP addresses through DHCP:
- Run system-view
The system view is displayed.
Run dhcp enable
DHCP is enabled globally.
By default, DHCP is disabled globally.
Run dhcp snooping enable
DHCP snooping is globally enabled.
By default, DHCP snooping is disabled globally.
- Enter the VLAN or interface view.
- Run vlan vlan-id
The VLAN view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run vlan vlan-id
Run dhcp snooping enable
DHCP snooping is enabled in a VLAN or on an interface.
By default, DHCP snooping is disabled in a VLAN or on an interface.
- Configure the trusted interface.
- Run dhcp snooping trusted interface interface-type interface-number
The interface in the VLAN is configured as the trusted interface.
- Run dhcp snooping trusted
The interface is configured as the trusted interface.
By default, interfaces are untrusted after DHCP snooping is enabled.
The interface directly or indirectly connected to the server is generally configured as the trusted interface. After DHCP snooping is enabled and the trusted interface is configured, the interface on the user side generates dynamic binding entries based on DHCP ACK messages.
- Run dhcp snooping trusted interface interface-type interface-number
- Run commit
The configuration is committed.
- Run system-view
For users using manually configured IP addresses:
- Run system-view
The system view is displayed.
- Run user-bind static { ip-address { start-ip [ to end-ip ] } &<1-10> | mac-address mac-address } * [ interface interface-type interface-number ] [ vlan vlan-id [ inner-vlan inner-vlan-id ] ]
A static binding entry is configured.
By default, no static binding table is configured.
- Run commit
The configuration is committed.
- Run system-view