H3C交换机DHCP Snooping抑制局域网内非法dhcp

我单位有华三交换机共39台,一种核心交换机s5750-2台,ap交换机s5130-5台,楼层有线(网线)电脑交换机s5130-32台。由其中一台核心交换机做dhcp服务器,通过光纤连接所有s5130交换机的24口。核心交换机共划分了4个vlan,vlan1做管理,vlan2走ap信号,vlan3和vlan4走楼层的网线电脑交换机。
最近发现有人在办公室内私接路由器,并且因为大意,把网线插进了路由器lan口,并且还开启了dhcp,造成vlan4内台式机收到的都是非法的路由器dhcp信息,对办公影响很大。同时因为因为这个路由器有时在线有时不在线,而且我单位有6栋楼,我私下找了一个星期也没找到这个非法路由器。
于是我换了一个思路,如果不能找到它,干脆我就不找了,使用交换机的DHCP Snooping功能,直接屏蔽掉那个非法路由器就可以了。
dhcp snooping功能开启后,默认所有端口为非信任口,即忽略掉所有端口发送的dhcp报文。为了能正常使用网络,我们只需要把上联口即24口(按自己实际情况)设置为信任端口即可。设置完经测试完美达到目的。

借用一张华三的拓扑图,我单位有线网络的拓扑与这个相同。
简单网络示意图
用配置线连接交换机,打开超级通讯,或者使用telnet命令连接交换机
配置命令如下
dhcp snooping enable—开启DHCP Snooping命令(不用大写)

interface GigabitEthernet1/0/24----我的5130交换机上联光口(实际按自己的情况设置)
port link-type trunk----把光口设置成trunk模式,按自己情况非必须
port trunk permit vlan 1 to 4----vlan1-vlan4互通,按自己情况非必须
dhcp snooping trust----设置24口为信任端口,其余均默认为非信任端口。
quit
save
完毕

  • 0
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
解决IP地址冲突的完美方法--DHCP SNOOPING 使用的方法是采用DHCP方式为用户分配IP,然后限定这些用户只能使用动态IP的方式,如果改成静态IP的方式则不能连接上网络;也就是使用了DHCP SNOOPING功能。 例子: version 12.1 no service pad service timestamps debug uptime service timestamps log uptime no service password-encryption service compress-config ! hostname C4-2_4506 ! enable password xxxxxxx! clock timezone GMT 8 ip subnet-zero no ip domain-lookup ! ip dhcp snooping vlan 180-181 // 对哪些VLAN 进行限制 ip dhcp snooping ip arp inspection vlan 180-181 ip arp inspection validate src-mac dst-mac ip errdisable recovery cause udld errdisable recovery cause bpduguard errdisable recovery cause security-violation errdisable recovery cause channel-misconfig errdisable recovery cause pagp-flap errdisable recovery cause dtp-flap errdisable recovery cause link-flap errdisable recovery cause l2ptguard errdisable recovery cause psecure-violation errdisable recovery cause gbic-invalid errdisable recovery cause dhcp-rate-limit errdisable recovery cause unicast-flood errdisable recovery cause vmps errdisable recovery cause arp-inspection errdisable recovery interval 30 spanning-tree extend system-id ! ! interface GigabitEthernet2/1 // 对该端口接入的用户进行限制,可以下联交换机 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/2 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/3 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 ! interface GigabitEthernet2/4 ip arp inspection limit rate 100 arp timeout 2 ip dhcp snooping limit rate 100 --More-- 编者注:对不需要明确地址的所有人的时候是一个很好的解决办法。另外,可以查看www.cisco.com的 IP Source Guard Similar to DHCP snooping, this feature is enabled on a DHCP snooping untrusted Layer 2 port. Initially, all IP traffic on the port is blocked except for DHCP packets that are captured by the DHCP snooping process. When a client receives a valid IP address from the DHCP server, or when a static IP source binding is configured by the user, a per-port and VLAN Access Control List (PACL) is installed on the port. This process restricts the client IP traffic to those source IP addresses configured in the binding; any IP traffic with a source IP address other than that in the IP source binding will be filtered out. This filtering limits a host's ability to attack the network by claiming neighbor host's IP address.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值