VTP+STP+HSRP综合实验---转

VTP+STP+HSRP综合实验
VTP+STP+HSRP综合实验---转_第1张图片
路由器 1
en
conf t
no ip domain lo
line c 0
logg s
no exec-t
end
conf t
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
conf t
router rip
version 2
no au
net 1.1.1 .0
net 2.2.2.0
net 3.3.3.0
end
三层交换机 1
en
conf t
no ip domain lo
line c 0
logg s
no exec-t
end
vlan data
vtp domain lanren
vtp v2
vtp password 123
vtp pruning
vlan 2
vlan 3
vlan 4
exit
conf t
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
conf t
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
conf t
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
conf t
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
conf t
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
en
conf t
no ip domain lo
line c 0
logg s
no exec-t
end
conf t
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
vlan data
vtp domain lanren
vtp v2
vtp password 123
vtp pruning
vlan 2
vlan 3
vlan 4
exit
conf t
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
conf t
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
conf t
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
conf t
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
en
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vlan data
vtp domain lanren
vtp v2
vtp password 123
vtp client
exit
conf t
int range f0/14 - 15
sw mo trun
int f0/1
spanning-tree portfast
exit
spanning-tree uplinkfast
end
二层交换机 2
en
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vlan data
vtp domain lanren
vtp v2
vtp password 123
vtp client
exit
conf t
int range f0/14 - 15
sw mo trun
int f0/2
sw ac vlan 2
spanning-tree portfast
exit
spanning-tree uplinkfast
end
二层交换机 3
en
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vlan data
vtp domain lanren
vtp v2
vtp password 123
vtp client
exit
conf t
int range f0/14 - 15
sw mo trun
int f0/3
sw ac vlan 3
spanning-tree portfast
exit
spanning-tree uplinkfast
end

二层交换机 4
en
conf t
no ip domain lo
no ip routing
line c 0
logg s
no exec-t
end
vlan data
vtp domain lanren
vtp v2
vtp password 123
vtp client
exit
conf t
int range f0/14 - 15
sw mo trun
int f0/4
sw ac vlan 4
spanning-tree portfast
exit
spanning-tree uplinkfast
end
VPS
1
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

验证:
将三层交换机 1F0/0shutdown
pc1 ping pc4 ping
得通
pc1 ping 3.3.3 .3 ping
得通
说明实验成功。
 

你可能感兴趣的:(休闲,实验,STP,VTP,HSRP)