路由器 1 en conf t conf t 三层交换机1 en vlan data vtp v2 conf t conf t conf t conf t conf t en conf t vlan data conf t conf t conf t conf t en vlan data vtp v2 conf t 二层交换机2 en vlan data conf t 二层交换机3 en vlan data vtp v2 conf t en vlan data conf t VPS 1 将三层交换机1的F0/0口shutdown,
conf t
no ip domain lo
line c 0
logg s
no exec-t
end
int f0/0
ip add 1.1.1.1 255.255.255.0
no shut
int f1/0
ip add 2.2.2.2 255.255.255.0
no shut
int lo 0
ip add 3.3.3.3 255.255.255.0
end
router rip
version 2
no au
net 1.1.1.0
net 2.2.2.0
net 3.3.3.0
end
conf t
no ip domain lo
line c 0
logg s
no exec-t
end
vtp domain lanren
vtp password 123
vtp pruning
vlan 2
vlan 3
vlan 4
exit
int range f0/11 - 14
sw mo trun
int range f0/5 - 6
channel-group 1 mode on
exit
int port-channel 1
sw mo trun
end
int f0/0
no sw
ip add 1.1.1.2 255.255.255.0
no shut
int vlan 1
ip add 192.168.1.254 255.255.255.0
no shut
int vlan 2
ip add 192.168.2.254 255.255.255.0
no shut
int vlan 3
ip add 192.168.3.254 255.255.255.0
no shut
int vlan 4
ip add 192.168.4.254 255.255.255.0
no shut
end
router rip
version 2
no auto
net 1.1.1.0
net 192.168.1.0
net 192.168.2.0
net 192.168.3.0
net 192.168.4.0
end
spanning-tree vlan 1 root pri
spanning-tree vlan 2 root pri
spanning-tree vlan 3 root sec
spanning-tree vlan 4 root sec
spanning-tree backbonefast
end
int vlan 1
standby 1 ip 192.168.1.1
standby 1 pri 200
standby 1 preempt
standby 1 track f0/0 50
int vlan 2
standby 1 ip 192.168.2.1
standby 1 pri 200
standby 1 preempt
standby 1 track f0/0 50
int vlan 3
standby 2 ip 192.168.3.1
standby 2 pri 180
standby 2 preempt
int vlan 4
standby 2 ip 192.168.4.1
standby 2 pri 180
standby 2 preempt
end
三层交换机2
conf t
no ip domain lo
line c 0
logg s
no exec-t
end
int range f0/11 - 14
sw mo trun
int range f0/5 - 6
channel-group 1 mode on
int port-channel 1
sw mo trun
end
vtp domain lanren
vtp v2
vtp password 123
vtp pruning
vlan 2
vlan 3
vlan 4
exit
int f0/0
no sw
ip add 2.2.2.1 255.255.255.0
no shut
int vlan 1
ip add 192.168.1.253 255.255.255.0
no shut
int vlan 2
ip add 192.168.2.253 255.255.255.0
no shut
int vlan 3
ip add 192.168.3.253 255.255.255.0
no shut
int vlan 4
ip add 192.168.4.253 255.255.255.0
no shut
end
router rip
version 2
no auto
net 2.2.2.0
net 192.168.1.0
net 192.168.2.0
net 192.168.3.0
net 192.168.4.0
end
spanning-tree vlan 3 root pri
spanning-tree vlan 4 root pri
spanning-tree vlan 1 root sec
spanning-tree vlan 2 root sec
spanning-tree backbonefast
end
int vlan 1
standby 1 ip 192.168.1.1
standby 1 pri 180
standby 1 preempt
int vlan 2
standby 1 ip 192.168.2.1
standby 1 pri 180
standby 1 preempt
int vlan 3
standby 2 ip 192.168.3.1
standby 2 pri 200
standby 2 preempt
standby 2 track f0/0 50
int vlan 4
standby 2 ip 192.168.4.1
standby 2 pri 200
standby 2 preempt
standby 2 track f0/0 50
end
二层交换机1
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vtp domain lanren
vtp password 123
vtp client
exit
int range f0/14 - 15
sw mo trun
int
spanning-tree portfast
exit
spanning-tree uplinkfast
end
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vtp domain lanren
vtp v2
vtp password 123
vtp client
exit
int range f0/14 - 15
sw mo trun
int f0/2
sw ac vlan 2
spanning-tree portfast
exit
spanning-tree uplinkfast
end
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vtp domain lanren
vtp password 123
vtp client
exit
int range f0/14 - 15
sw mo trun
int f0/3
sw ac vlan 3
spanning-tree portfast
exit
spanning-tree uplinkfast
end
二层交换机4
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vtp domain lanren
vtp v2
vtp password 123
vtp client
exit
int range f0/14 - 15
sw mo trun
int f0/4
sw ac vlan 4
spanning-tree portfast
exit
spanning-tree uplinkfast
end
ip 192.168.1.10 192.168.1.1 24
2
ip 192.168.2.10 192.168.2.1 24
3
ip 192.168.3.10 192.168.3.1 24
4
ip 192.168.4.10 192.168.4.1 24
验证:
pc1 ping pc4 ping得通
pc1 ping 3.3.3.3 ping得通
说明实验成功。
VTP+STP+HSRP综合实验
精选 转载上一篇:让进程在后台可靠运行的几种方法
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章