防止非法DHCP服务器接入

作者: admin 分类: 网络 发布时间: 2019-04-29 00:37 浏览:866 次    

%title插图%num

1、DHCP

en

conf  t

service dhcp

ip dhcp pool  dhcptest

network 192.168.1.0 /24

default-router 192.168.1.1

dns-server 202.106.0.20

lease 7

exit

int f1/0

no switchport

ip add 192.168.1.10 255.255.255.0

no shutdown

exit

 2、非法DHCP

en

conf t

service dhcp

ip dhcp pool undhcp

network 192.168.10.0 255.255.255.0

default-router 192.168.10.1

dns 8.8.8.8

lease 7

exit

int f1/1

no switchport

ip add 192.168.10.10 255.255.255.0

no shutdown

exit

3、SW

en

conf t

ip dhcp snooping

int f1/0

ip dhcp snooping trust

end

show  ip dhcp snooping

4、测试

(1)未开启dhcp snooping之前

%title插图%num

%title插图%num

(2)开启dhcp snooping 之后并关闭DHCP

%title插图%num


温馨提示:如无特殊说明,本站文章均为作者原创,转载时请注明出处及相应链接!

发表评论