eve模拟器实验:PC1是合法的电脑,使用ip地址192.168.10.1, 现在要防止其他电脑占用此ip地址。
eve模拟器实验:PC1是合法的电脑,使用ip地址192.168.10.1, 现在要防止其他电脑占用此ip地址。
(1)拓扑图
(2)基础配置
dhcp server:
vlan batch 20
#
dhcp enable
#
ip pool 10
gateway-list 192.168.10.254
network 192.168.10.0 mask 255.255.255.0
excluded-ip-address 192.168.10.1 192.168.10.10
lease day 0 hour 2 minute 0
dns-list 223.5.5.5 114.114.114.114
#
ip pool 20
gateway-list 192.168.20.254
network 192.168.20.0 mask 255.255.255.0
excluded-ip-address 192.168.20.1 192.168.20.10
lease day 0 hour 2 minute 0
dns-list 223.5.5.5 223.6.6.6
#
ip pool 30
gateway-list 192.168.30.254
network 192.168.30.0 mask 255.255.255.0
lease day 0 hour 2 minute 0
dns-list 223.5.5.5 223.6.6.6
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 192.168.20.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.20.254
sw1:
vlan batch 10 20 30
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
dhcp select relay
dhcp relay binding server ip 192.168.20.1
#
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
#
interface Vlanif30
ip address 192.168.30.254 255.255.255.0
interface GE1/0/1
undo shutdown
port default vlan 10
#
interface GE1/0/2
undo shutdown
port default vlan 10
#
interface GE1/0/3
undo shutdown
port default vlan 10
#
interface GE1/0/4
undo shutdown
port default vlan 10
#
interface GE1/0/5
undo shutdown
port default vlan 30
#
interface GE1/0/6
undo shutdown
port default vlan 30
interface GE1/0/8
undo shutdown
port link-type trunk
port trunk allow-pass vlan 2 to 4094
sw3:
vlan batch 10 20 30
#
interface GE1/0/1
undo shutdown
port default vlan 30
#
interface GE1/0/2
undo shutdown
port default vlan 10
#
interface GE1/0/8
undo shutdown
port link-type trunk
port trunk allow-pass vlan 2 to 4094
(3.1)测试pc1上网,pc2先不要接网线
(3.2)测试pc2上网,pc1先不要接网线
pc2自动获取ip是可以上网,现在把pc2配置为192.168.10.1,现在的pc1的网线是拔掉的。
(3.3)测试pc3上网
(3.4)测试pc4上网
(3.5)测试pc5上网
(3.6)测试pc6上网
(3.7)测试pc7上网
自动获取ip上网:
配置固定ip地址上网:
(3.8)测试pc8上网
自动获取ip上网:
配置固定ip地址上网:
(4.1)pc1把启用网络后,提示与ip冲突
在网关交换机上:
(5.1)配置IPSG:配置IP+MAC静态绑定
http://www.zh-cjh.com/wangluoanquan/4147.html
http://www.zh-cjh.com/wangluoanquan/4150.html
[sw1]
[sw1]user-bind static ip-address 192.168.10.1 mac-address aaaa-aaaa-aa01
Info: 1 static user-bind item(s) added.
[sw1]vlan 10
[sw1-vlan10] ip source check user-bind enable
(5.2)测试
还是与没有配置前一样,pc1还是上不网,pc2还是在占用ip地址,pc1与pc2重启也是一样。
[sw1]display ip source check user-bind
IPSG VLAN ID : 10
IPSG check items : Interface | IP | MAC
[sw1]
(5.3)配置dhcp snooping
2、本资源基本为原创,部分来源其他付费资源平台或互联网收集,如有侵权请联系及时处理。
3、本站大部分文章的截图来源实验测试环境,请不要在生产环境中随意模仿,以免带来灾难性后果。
转载请保留出处: www.zh-cjh.com珠海陈坚浩博客 » eve模拟器实验:PC1是合法的电脑,使用ip地址192.168.10.1, 现在要防止其他电脑占用此ip地址。
作者: cjh
手机扫一扫,手机上查看此文章: |
一切源于价值!
其他 模板文件不存在: ./template/plugins/comment/pc/index.htm