HSRP实验

193334614.png

===================================================================================================================

Gateway

!

!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnameGateway
!
boot-start-marker
boot-end-marker
!
!
memory-sizeiomem5
noaaanew-model
ipsubnet-zero
noipicmprate-limitunreachable
iptcpsynwait-time5
!
!
noipdomainlookup
!
!
ipcef
ipipspomax-events100
noftp-serverwrite-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interfaceLoopback0
ipaddress3.3.3.3255.255.255.0
!
interfaceFastEthernet0/0
ipaddress1.1.1.1255.255.255.0
duplexauto
speedauto
!
interfaceFastEthernet1/0
ipaddress2.2.2.2255.255.255.0
duplexauto
speedauto
!
interfaceFastEthernet2/0
noipaddress
shutdown
duplexauto
speedauto
!
routereigrp100
network1.0.0.0
network2.0.0.0
network3.0.0.0
noauto-summary
!
noiphttpserver
noiphttpsecure-server
ipclassless
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
linecon0
exec-timeout00
privilegelevel15
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
login
!
!
end
================================================================================================

SW1

!

!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnameSW1
!
boot-start-marker
boot-end-marker
!
!
memory-sizeiomem5
noaaanew-model
ipsubnet-zero
noipicmprate-limitunreachable
iptcpsynwait-time5
!
!
noipdomainlookup
!
!
ipcef
ipipspomax-events100
noftp-serverwrite-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-treebackbonefast
spanning-treevlan1priority8192
spanning-treevlan2priority8192
spanning-treevlan3priority16384
spanning-treevlan4priority16384
!
!
!
!
!
!
!
interfacePort-channel1
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/0
noswitchport
ipaddress1.1.1.2255.255.255.0
!
interfaceFastEthernet0/1
noipaddress
shutdown
!
interfaceFastEthernet0/2
noipaddress
shutdown
!
interfaceFastEthernet0/3
noipaddress
shutdown
!
interfaceFastEthernet0/4
noipaddress
shutdown
!
interfaceFastEthernet0/5
switchportmodetrunk
noipaddress
channel-group1modeon
!
interfaceFastEthernet0/6
switchportmodetrunk
noipaddress
channel-group1modeon
!
interfaceFastEthernet0/7
noipaddress
shutdown
!
interfaceFastEthernet0/8
noipaddress
shutdown
!
interfaceFastEthernet0/9
noipaddress
shutdown
!
interfaceFastEthernet0/10
noipaddress
shutdown
!
interfaceFastEthernet0/11
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/12
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/13
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/14
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/15
noipaddress
shutdown
!
interfaceVlan1
ipaddress192.168.1.254255.255.255.0
standby1ip192.168.1.1
standby1priority200
standby1preempt
standby1trackFastEthernet0/050
!
interfaceVlan2
ipaddress192.168.2.254255.255.255.0
standby2ip192.168.2.1
standby2priority200
standby2preempt
standby2trackFastEthernet0/050
!
interfaceVlan3
ipaddress192.168.3.254255.255.255.0
standby3ip192.168.3.1
standby3priority180
standby3preempt
!
interfaceVlan4
ipaddress192.168.4.254255.255.255.0
standby4ip192.168.4.1
standby4priority180
standby4preempt
!
routereigrp100
network1.0.0.0
network192.168.1.0
network192.168.2.0
network192.168.3.0
network192.168.4.0
noauto-summary
!
noiphttpserver
noiphttpsecure-server
ipclassless
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
linecon0
exec-timeout00
privilegelevel15
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
login
!
!
end

================================================================================================

SW2

!

!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnameSW2
!
boot-start-marker
boot-end-marker
!
!
memory-sizeiomem5
noaaanew-model
ipsubnet-zero
noipicmprate-limitunreachable
iptcpsynwait-time5
!
!
noipdomainlookup
!
!
ipcef
ipipspomax-events100
noftp-serverwrite-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-treebackbonefast
spanning-treevlan1priority16384
spanning-treevlan2priority16384
spanning-treevlan3priority8192
spanning-treevlan4priority8192
!
!
!
!
!
!
!
interfacePort-channel1
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/0
noswitchport
ipaddress2.2.2.1255.255.255.0
!
interfaceFastEthernet0/1
noipaddress
shutdown
!
interfaceFastEthernet0/2
noipaddress
shutdown
!
interfaceFastEthernet0/3
noipaddress
shutdown
!
interfaceFastEthernet0/4
noipaddress
shutdown
!
interfaceFastEthernet0/5
switchportmodetrunk
noipaddress
channel-group1modeon
!
interfaceFastEthernet0/6
switchportmodetrunk
noipaddress
channel-group1modeon
!
interfaceFastEthernet0/7
noipaddress
shutdown
!
interfaceFastEthernet0/8
noipaddress
shutdown
!
interfaceFastEthernet0/9
noipaddress
shutdown
!
interfaceFastEthernet0/10
noipaddress
shutdown
!
interfaceFastEthernet0/11
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/12
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/13
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/14
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/15
noipaddress
shutdown
!
interfaceVlan1
ipaddress192.168.1.253255.255.255.0
standby1ip192.168.1.1
standby1priority180
standby1preempt
!
interfaceVlan2
ipaddress192.168.2.253255.255.255.0
standby2ip192.168.2.1
standby2priority180
standby2preempt
!
interfaceVlan3
ipaddress192.168.3.253255.255.255.0
standby3ip192.168.3.1
standby3priority200
standby3preempt
standby3trackFastEthernet0/050
!
interfaceVlan4
ipaddress192.168.4.253255.255.255.0
standby4ip192.168.4.1
standby4priority200
standby4preempt
standby4trackFastEthernet0/050
!
routereigrp100
network2.0.0.0
network192.168.1.0
network192.168.2.0
network192.168.3.0
network192.168.4.0
noauto-summary
!
noiphttpserver
noiphttpsecure-server
ipclassless
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
linecon0
exec-timeout00
privilegelevel15
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
login
!
!
end

================================================================================================

SW2-1

!

!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnameSW2-1
!
boot-start-marker
boot-end-marker
!
!
memory-sizeiomem5
noaaanew-model
ipsubnet-zero
noiprouting
noipicmprate-limitunreachable
iptcpsynwait-time5
!
!
noipdomainlookup
!
!
noipcef
ipipspomax-events100
noftp-serverwrite-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-treeuplinkfast
!
!
!
!
!
!
interfaceFastEthernet0/0
noipaddress
shutdown
!
interfaceFastEthernet0/1
noipaddress
spanning-treeportfast
!
interfaceFastEthernet0/2
noipaddress
shutdown
!
interfaceFastEthernet0/3
noipaddress
shutdown
!
interfaceFastEthernet0/4
noipaddress
shutdown
!
interfaceFastEthernet0/5
noipaddress
shutdown
!
interfaceFastEthernet0/6
noipaddress
shutdown
!
interfaceFastEthernet0/7
noipaddress
shutdown
!
interfaceFastEthernet0/8
noipaddress
shutdown
!
interfaceFastEthernet0/9
noipaddress
shutdown
!
interfaceFastEthernet0/10
noipaddress
shutdown
!
interfaceFastEthernet0/11
noipaddress
shutdown
!
interfaceFastEthernet0/12
noipaddress
shutdown
!
interfaceFastEthernet0/13
noipaddress
shutdown
!
interfaceFastEthernet0/14
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/15
switchportmodetrunk
noipaddress
!
interfaceVlan1
noipaddress
noiproute-cache
!
noiphttpserver
noiphttpsecure-server
ipclassless
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
linecon0
exec-timeout00
privilegelevel15
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
login
!
!
end

================================================================================================

SW2-2

!

!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnameSW2-2
!
boot-start-marker
boot-end-marker
!
!
memory-sizeiomem5
noaaanew-model
ipsubnet-zero
noiprouting
noipicmprate-limitunreachable
iptcpsynwait-time5
!
!
noipdomainlookup
!
!
noipcef
ipipspomax-events100
noftp-serverwrite-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
spanning-treeuplinkfast
!
!
!
!
!
!
interfaceFastEthernet0/0
noipaddress
shutdown
!
interfaceFastEthernet0/1
switchportaccessvlan2
noipaddress
spanning-treeportfast
!
interfaceFastEthernet0/2
noipaddress
shutdown
!
interfaceFastEthernet0/3
noipaddress
shutdown
!
interfaceFastEthernet0/4
noipaddress
shutdown
!
interfaceFastEthernet0/5
noipaddress
shutdown
!
interfaceFastEthernet0/6
noipaddress
shutdown
!
interfaceFastEthernet0/7
noipaddress
shutdown
!
interfaceFastEthernet0/8
noipaddress
shutdown
!
interfaceFastEthernet0/9
noipaddress
shutdown
!
interfaceFastEthernet0/10
noipaddress
shutdown
!
interfaceFastEthernet0/11
noipaddress
shutdown
!
interfaceFastEthernet0/12
noipaddress
shutdown
!
interfaceFastEthernet0/13
noipaddress
shutdown
!
interfaceFastEthernet0/14
switchportmodetrunk
noipaddress
!
interfaceFastEthernet0/15
switchportmodetrunk
noipaddress
!
interfaceVlan1
noipaddress
noiproute-cache
!
noiphttpserver
noiphttpsecure-server
ipclassless
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
linecon0
exec-timeout00
privilegelevel15
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
login
!
!
end

================================================================================================

SW2-3

SW2-4

这两个二层交换机跟前面两个二层交换机配置大同小异,只是划分vlan的归属不同面已,在这里就省略了。

================================================================================================

PC1

pc2,pc3,pc4,与pc1配置配置一样,所配置的IP就是图中的IP了。

!

!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnamePC1
!
boot-start-marker
boot-end-marker
!
!
memory-sizeiomem5
noaaanew-model
ipsubnet-zero
noiprouting
noipicmprate-limitunreachable
iptcpsynwait-time5
!
!
noipdomainlookup
!
!
noipcef
ipipspomax-events100
noftp-serverwrite-enable
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interfaceFastEthernet0/0
ipaddress192.168.1.10255.255.255.0
noiproute-cache
duplexauto
speedauto
!
ipdefault-gateway192.168.1.1
noiphttpserver
noiphttpsecure-server
ipclassless
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
linecon0
exec-timeout00
privilegelevel15
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
login
!
!
end

========================================================