灰儿 发表于 2021-9-10 09:50:41

神州数码交换机 DHCP Snooping 配置

DHCP Snooping配置

启动DHCP Snooping功能
Switch(Config)#ip dhcp snooping enable

启动DHCP Snooping绑定功能
Switch(Config)#ip dhcp snooping binding enable

在交换机端口 Ethernet0/0/16 配置静态绑定用户
Switch(Config)#ip dhcp snooping binding user 00-03-0f-12-34-56 address 192.168.1.16 255.255.255.0 vlan 1 interface Ethernet0/0/16

启动DHCP Snooping绑定 ARP 功能
Switch(Config)#ip dhcp snooping binding arp

在端口 ethernet1/1 启动绑定 DOT1X 功能
Switch(Config)#interface ethernet 0/0/1
Switch(Config- Ethernet 0/0/1)# ip dhcp snooping binding dot1x

在端口 ethernet1/1 启动绑定 USER功能
Switch(Config)#interface ethernet 0/0/1
Switch(Config- Ethernet 0/0/1)# ip dhcp snooping binding user-control
这个命令和 ip dhcp snooping binding dot1x 命令互斥

设置端口 ethernet0/0/1为 DHCP Snooping信任端口
Switch(Config)#interface ethernet 0/0/1
Switch(Config- Ethernet 0/0/1)#ip dhcp snooping trust

设置端口 ethernet0/0/1的 DHCP Snooping 防御动作为设置 blackhole,自动恢复时间为 30秒
Switch(Config)#interface ethernet 0/0/1
Switch(Config- Ethernet 0/0/1)#ip dhcp snooping action blackhole recovery 30

设置防御动作数目为 100
Switch(Config)#ip dhcp snooping action maxnum 100

设置交换机 DHCP 报文转发速率为 200pps
Switch(Config)#ip dhcp snooping limit-rate 200



DHCP Snooping典型应用举例:

Mac-AA 设备为正常用户,连接在 DCN交换机非信任端口 0/0/1上,其通过 DHCP
Client 活动 IP 1.1.1.5;DHCP Server 和 GateWay 连接在 DCN 交换机的信任端口0/0/11;0/0/12上;恶意用户 Mac-BB连接在非信任端口 0/0/10 上,试图伪装 DHCP Server(发送 DHCPACK)。在交换机上设置 DHCP Snooping将能有效发现并阻止这种网络攻击
配置序列为:
Switch#config
Switch(Config)#ip dhcp snooping
Switch(Config)#interface ethernet 0/0/11
Switch(Config-Ethernet0/0/11)#ip dhcp snooping trust
Switch(Config-Ethernet0/0/11)#exit
Switch(Config)#interface ethernet 0/0/12
Switch(Config-Ethernet0/0/12)#ip dhcp snooping trust
Switch(Config-Ethernet0/0/12)#exit
Switch(Config)#interface ethernet 0/0/1-10
Switch(Config-Port-Range)#ip dhcp snooping action shutdown
Switch(Config-Port-Range)#



防 ARP 扫描功能命令

在交换机上启动防 ARP 扫描功能
Switch(Config)#anti-arpscan enable

在交换机上配置基于端口的防 ARP 扫描速率阈值为 20个/秒
Switch(Config)#anti-arpscan port-based threshold 20
如果接收的 ARP 报文的速率超过此设定值,则关闭此端口

在交换机上配置基于 IP 的防ARP 扫描速率阈值为 6个/秒
Switch(config)#anti-arpscan ip-based threshold 6

将交换机的端口 ethernet 0/0/5配置为信任端口
Switch(config)#interface ethernet0/0/5
Switch(Config-if-ethernet 0/0/5)#anti-arpscan trust port

将192.168.1.0/24 配置为信任 IP
Switch(config)#anti-arpscan trust ip 192.168.1.0 255.255.255.0

在交换机上启动自动恢复功能
Switch(config)#anti-arpscan recovery enable

设置自动恢复时间为 3600 秒。
Switch(config)#anti-arpscan recovery time 3600

在交换机上启动防 ARP扫描的日志功能。
Switch(config)#anti-arpscan log enable

在交换机上启动防 ARP扫描的 SNMP Trap 功能。
Switch(config)#anti-arpscan trap enable

页: [1]
查看完整版本: 神州数码交换机 DHCP Snooping 配置