中小型网络完全配置实例vrrp和mstp.docx
《中小型网络完全配置实例vrrp和mstp.docx》由会员分享,可在线阅读,更多相关《中小型网络完全配置实例vrrp和mstp.docx(19页珍藏版)》请在冰点文库上搜索。
![中小型网络完全配置实例vrrp和mstp.docx](https://file1.bingdoc.com/fileroot1/2023-5/4/08aa38aa-2ca4-4ec2-8cb9-541ad4200dc0/08aa38aa-2ca4-4ec2-8cb9-541ad4200dc01.gif)
中小型网络完全配置实例vrrp和mstp
中小型网络完全配置实例(VRRP_MSTP)
实验均是在dynamips下完成的,拓扑图是在visio2007里完成的。
在这里,晚生用三个三层核心交换机相互连接,这样的好处是内网数据完全可以在
SW2-SW3之间完成,同时也起到了路由配备的功能:
路由一:
SW5<->SW3<->SW2<->SW4<->SW5
路由二:
SW5<->SW3<->SW1<->SW2<->SW4
当然有了备份路由就有了负载均衡的问题。
在这个实验中,内网间的数据我没有考虑,主要是到外网的上传与下载我进行了负载均衡(用了了MSTP与VRRP)。
VRRP是在SW2SW3上实现的。
特别声明:
由于dynimaps里不能做mstp。
我就在每一个vlan里自行指定了root设备,我想原理都是一样的。
下面是SW1的配置:
sw1#wr
Buildingconfiguration...
*Mar 102:
39:
40.107:
%SYS-5-CONFIG_I:
Configuredfromconsolebylglonconsole
[OK]
sw1#showrun
Buildingconfiguration...
Currentconfiguration:
1613bytes
!
version12.4
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnamesw1
!
boot-start-marker
boot-end-marker
!
enablesecret5$1$TPal$URu8gOi3eyzCISshPTSbz.
!
noaaanew-model
memory-sizeiomem5
!
!
ipcef
noipdomainlookup
!
spanning-treevlan200priority4096
usernamelglsecret5$1$9ldD$v05aG/XH5OpQGigXzWbYj0
!
interfaceFastEthernet0/0
descriptionlink_torouter2_f0/0
!
interfaceFastEthernet0/1
descriptionlink_tosw2_f0/1
switchportaccessvlan200
!
interfaceFastEthernet0/2
descriptionlink_tosw3_f0/2
switchportaccessvlan200
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceVlan1
noipaddress
!
interfaceVlan200
descriptionthisisaroute_vlan.
ipaddress192.168.200.1255.255.255.0
!
interfaceVlan201
descriptionthisisamanager_vlan.
ipaddress192.168.201.1255.255.255.0
!
routerospf100
log-adjacency-changes
network192.168.200.00.0.0.255area0
network192.168.201.00.0.0.255area0
!
iphttpserver
noiphttpsecure-server
!
control-plane
!
linecon0
exec-timeout00
loggingsynchronous
loginlocal
lineaux0
linevty04
exec-timeout00
loggingsynchronous
loginlocal
!
end
sw1#showvlan-s
VLANName Status Ports
----------------------------------------------------------------------------
1 default active Fa0/0,Fa0/3,Fa0/4,Fa0/5
Fa0/6,Fa0/7,Fa0/8,Fa0/9
Fa0/10,Fa0/11,Fa0/12,Fa0/13
Fa0/14,Fa0/15
200 router active Fa0/1,Fa0/2
201 manager active
1002fddi-default active
1003token-ring-default active
1004fddinet-default active
1005trnet-default active
下面是sw2的配置:
sw2#shrun
Buildingconfiguration...
Currentconfiguration:
2471bytes
!
version12.4
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnamesw2
!
boot-start-marker
boot-end-marker
!
enablesecret5$1$MhqD$jQLhOt/TJtcoGu5ckWuVw1
!
noaaanew-model
memory-sizeiomem5
!
!
ipcef
noipdomainlookup
!
!
spanning-treevlan10priority4096
spanning-treevlan20priority4096
spanning-treevlan201priority4096
usernamelglsecret5$1$Dcy8$BB9OkbojT9pFUA6ehLxmW.
!
interfaceFastEthernet0/0
!
interfaceFastEthernet0/1
descriptionlink_tosw1_f0/1
switchportaccessvlan200
!
interfaceFastEthernet0/2
!
interfaceFastEthernet0/3
descriptionlink_tosw3_f0/3
switchportmodetrunk
shutdown
!
interfaceFastEthernet0/4
descriptionlink_tosw4_f0/1
switchporttrunkallowedvlan1,10,20,30,40,200,201,1002-1005
switchportmodetrunk
!
interfaceFastEthernet0/5
descriptionlink_tosw5_f0/5
switchporttrunkallowedvlan1-9,11-19,21-1005
switchportmodetrunk
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceVlan1
noipaddress
!
interfaceVlan10
ipaddress192.168.10.1255.255.255.0
standby1ip192.168.10.254
standby1priority255
standby1preempt
!
interfaceVlan20
ipaddress192.168.20.1255.255.255.0
standby2ip192.168.20.254
standby2priority255
standby2preempt
!
interfaceVlan30
ipaddress192.168.30.2255.255.255.0
standby3ip192.168.30.254
standby3preempt
!
interfaceVlan40
ipaddress192.168.40.2255.255.255.0
standby4ip192.168.40.254
standby4preempt
!
interfaceVlan200
descriptionthisisaroute_vlan.
ipaddress192.168.200.2255.255.255.0
!
interfaceVlan201
descriptionthisisamanager_vlan.
ipaddress192.168.201.2255.255.255.0
!
routerospf100
log-adjacency-changes
network192.168.10.00.0.0.255area0
network192.168.20.00.0.0.255area0
network192.168.200.00.0.0.255area0
network192.168.201.00.0.0.255area0
!
iphttpserver
noiphttpsecure-server
!
iproute0.0.0.00.0.0.0Vlan200192.168.200.1
!
control-plane
!
linecon0
exec-timeout00
loggingsynchronous
loginlocal
lineaux0
linevty04
exec-timeout00
loggingsynchronous
loginlocal
!
!
end
sw2#showvlan-s
VLANName Status Ports
----------------------------------------------------------------------------
1 default active Fa0/0,Fa0/2,Fa0/3,Fa0/6
Fa0/7,Fa0/8,Fa0/9,Fa0/10
Fa0/11,Fa0/12,Fa0/13,Fa0/14
Fa0/15
10 subnet1 active
20 subnet2 active
30 subnet3 active
40 subnet4 active
200 router active Fa0/1
201 manager active
1002fddi-default active
1003token-ring-default active
1004fddinet-default active
1005trnet-default active
sw2#showstanbr
Pindicatesconfiguredtopreempt.
|
Interface GrpPrioPState Active Standby VirtualIP
Vl10 1 255 PActive local 192.168.10.2 192.168.10.254
Vl20 2 255 PActive local 192.168.20.2 192.168.20.254
Vl30 3 100 PStandby 192.168.30.1 local 192.168.30.254
Vl40 4 100 PStandby 192.168.40.1 local 192.168.40.254
这里便是VRRP的配置,至于上传与下载的均衡晚生下次补上。
下面是SW3的配置:
sw3#shrun
Buildingconfiguration...
Currentconfiguration:
2394bytes
!
version12.4
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnamesw3
!
boot-start-marker
boot-end-marker
!
enablesecret5$1$m5q/$gUeU1vlnQNCqBhjuyBmwK1
!
noaaanew-model
memory-sizeiomem5
!
!
ipcef
noipdomainlookup
spanning-treevlan30priority4096
spanning-treevlan40priority4096
usernamelglsecret5$1$M5lL$L.l63fiL2sfKCttvzbJX2.
!
!
interfaceFastEthernet0/0
!
interfaceFastEthernet0/1
!
interfaceFastEthernet0/2
descriptionlink_tosw1_f0/2
switchportaccessvlan200
!
interfaceFastEthernet0/3
descriptionlink_tosw2_f0/3
switchportmodetrunk
!
interfaceFastEthernet0/4
descriptionlink_tosw4f0/2
switchportmodetrunk
!
interfaceFastEthernet0/5
descriptionlink_tosw5_f0/2
switchporttrunkallowedvlan1-9,11-19,21-1005
switchportmodetrunk
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceVlan1
noipaddress
!
interfaceVlan10
ipaddress192.168.10.2255.255.255.0
standby1ip192.168.10.254
standby1preempt
!
interfaceVlan20
ipaddress192.168.20.2255.255.255.0
standby2ip192.168.20.254
standby2preempt
!
interfaceVlan30
ipaddress192.168.30.1255.255.255.0
standby3ip192.168.30.254
standby3priority255
standby3preempt
!
interfaceVlan40
ipaddress192.168.40.1255.255.255.0
standby4ip192.168.40.254
standby4priority255
standby4preempt
!
interfaceVlan200
descriptionthisisarouter_vlan
ipaddress192.168.200.3255.255.255.0
!
interfaceVlan201
descriptionthisiasmanager_vlan
ipaddress192.168.201.3255.255.255.0
!
routerospf100
log-adjacency-changes
network192.168.30.00.0.0.255area0
network192.168.40.00.0.0.255area0
network192.168.200.00.0.0.255area0
network192.168.201.00.0.0.255area0
!
ipdefault-gateway192.168.201.2
iphttpserver
noiphttpsecure-server
!
iproute0.0.0.00.0.0.0Vlan200192.168.200.1
!
control-plane
!
!
linecon0
exec-timeout00
loggingsynchronous
loginlocal
lineaux0
linevty04
exec-timeout00
loggingsynchronous
loginlocal
!
!
end
sw3#showvlan-s
VLANName Status Ports
----------------------------------------------------------------------------
1 default active Fa0/0,Fa0/1,Fa0/6,Fa0/7
Fa0/8,Fa0/9,Fa0/10,Fa0/11