1. 配置IP+VLAN静态绑定:通过配置基于静态绑定表的IPSG,对非信任接口上接收的IP报文进行过滤,可以有效防止恶意主机盗用合法主机的IP地址仿冒合法主机非法访问网络,适用于局域网络中主机数较少,且主机使用静态配置IP地址的网络环境 [HUAWEI]user-bind static ip-address 192.168.2.1 vlan 10 [HUAWEI] vlan 10 [HUAWEI-vlan10] ip source check user-bind enable
  2. 配置IP+MAC静态绑定 [HUAWEI] user-bind static ip-address 192.168.2.1 mac-address 0002-0002-0002 [HUAWEI] vlan 10 [HUAWEI-vlan10] ip source check user-bind enable
  3. 配置IP+MAC+接口静态绑定 [HUAWEI] user-bind static ip-address 192.168.2.1 mac-address 0002-0002-0002 interface gigabitethernet 0/0/1 [HUAWEI] vlan 10 [HUAWEI-vlan10] ip source check user-bind enable
  4. 配置基于DHCP Snooping动态绑定表的IPSG:通过配置基于DHCP Snooping动态绑定表的IPSG,对非信任接口上接收的IP报文进行过滤控制,可以有效防止恶意主机盗用合法主机的IP地址来仿冒合法主机后非法访问网络,适用于局域网络中主机较多,且主机使用DHCP动态获取IP地址的网络环境 (1)配置DHCP Snooping,生成DHCP Snooping动态绑定表。 系统视图下执行命令dhcp enable,全局使能DHCP功能。 系统视图下执行命令dhcp snooping enable,全局使能DHCP Snooping功能。 接口或VLAN视图下执行命令dhcp snooping enable,使能接口或者VLAN的DHCP Snooping功能。 接口视图下执行dhcp snooping trusted或者VLAN视图下执行dhcp snooping trusted interface interface-type interface-number,配置信任接口,对于从信任接口收到的IP报文,IPSG不做匹配检查且允许通过。 (2)接口或者VLAN视图下执行命令ip source check user-bind enable,使能IPSG功能 [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable [HUAWEI-GigabitEthernet0/0/1]dhcp snooping trusted [HUAWEI-GigabitEthernet0/0/2]dhcp snooping enable [HUAWEI-GigabitEthernet0/0/2]ip source check user-bind enable [HUAWEI] vlan batch 10 [HUAWEI-GigabitEthernet0/0/1] port link-type trunk [HUAWEI-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable [HUAWEI] vlan 10 [HUAWEI-vlan10] dhcp snooping enable [HUAWEI-vlan10]dhcp snooping trusted interface gigabitethernet 0/0/1 [HUAWEI-vlan10]ip source check user-bind enable
  5. 删除静态绑定表项 (1)查看已存在的静态绑定表项 <HUAWEI> display dhcp static user-bind all
    (2)删除静态绑定表项 [HUAWEI] undo user-bind static ip-address 192.168.1.1 mac-address 0001-0001-0001 [HUAWEI] undo user-bind static interface gigabitethernet 0/0/1 [HUAWEI] undo user-bind static vlan 10