Spanning-tree+hsrp+ eigrp綜合實驗
STP(spanningTreeProtocol,生成樹)就是把一個環形的結構改變成一個樹形的結構,STP協議就是用來將物理上存在環路的網路,通過一種演算法,在邏輯上,阻塞一些埠,來生成一個邏輯結構。
HSRP(hoststandbyroutingprotocol,熱備路由協議)是思科私有的一種技術,它確保了當地邊緣裝置或接入裝置出現故障時,使用者通訊能迅速並透明地恢復,以此為ip網路提供冗餘性。
VTP是一種資訊協議,它使用第二層幀,在交換機之間傳遞VLAN資訊,被稱為VTP通告。
EIGRP(EnhancedInteriorGatewayRoutingProtocol)增強內部網管關由線路協議,
新建實驗拓撲圖
在R1上輸入命令:
R1:
en
vlandatabase
vtpdomaindragon
vtppassword123456
vtpserver
vlan10
vlan11
vlan12
vlan13
vlan14
exit
configureterminal
interfacerangefastEthernet1/0-3
switchportmodetrunk
noshutdown
interfacerangefastEthernet1/14-15
switchportmodetrunk
channel-group1modeon
exit
spanning-treevlan10rootprimary
spanning-treevlan10priority4096
spanning-treevlan11rootprimary
spanning-treevlan11priority4096
spanning-treevlan12rootsecondary
spanning-treevlan13rootsecondary
interfacevlan10
ipaddress192.168.10.1255.255.255.0
noshutdown
standby10ip192.168.10.10
standby10priority200
standby10preempt
standby10trackf1/13100
interfacevlan11
ipaddress192.168.11.1255.255.255.0
noshutdown
standby11ip192.168.11.11
standby11priority200
standby11preempt
standby11trackf1/13100
interfacevlan12
ipaddress192.168.12.1255.255.255.0
noshutdown
standby12ip192.168.12.12
standby12priority150
interfacevlan13
ipaddress192.168.13.1255.255.255.0
noshutdown
standby13ip192.168.13.13
standby13priorit150
exit
interfacef1/13
noswitchport
ipaddress10.0.0.2255.255.255.252
noshutdown
exit
routereigrp1
network10.0.0.0
network192.168.10.0
network192.168.11.0
network192.168.12.0
network192.168.13.0
end
在R2上輸入命令
R2:
en
vlandatabase
vtpdomaindragon
vtppassword123456
vtpserver
vlan10
vlan11
vlan12
vlan13
vlan14
exit
configureterminal
interfacerangefastEthernet1/14-15
switchportmodetrunk
channel-group1modeon
exit
spanning-treevlan12rootprimary
spanning-treevlan12priority4096
spanning-treevlan13rootprimary
spanning-treevlan13priority4096
spanning-treevlan10rootsecondary
spanning-treevlan11rootsecondary
interfacevlan10
ipaddress192.168.10.2255.255.255.0
noshutdown
standby10ip192.168.10.10
standby10priority150
interfacevlan11
ipaddress192.168.11.2255.255.255.0
noshutdown
standby11ip192.168.11.11
standby11priority150
interfacevlan12
ipaddress192.168.12.2255.255.255.0
noshutdown
standby12ip192.168.12.12
standby12priority200
standby12preempt
standby12trackf1/3100
interfacevlan13
ipaddress192.168.13.3255.255.255.0
noshutdown
standby13ip192.168.13.13
standby13priority200
standby13preempt
standby13trackf1/3100
exit
interfacef1/3
noswitchport
ipaddress10.0.0.6255.255.255.252
noshutdown
exit
routereigrp1
network10.0.0.4
network192.168.10.0
network192.168.11.0
network192.168.12.0
network192.168.13.0
end
R7
en
configureterminal
interfacefastEthernet1/13
noswitchport
ipaddress10.0.0.1255.255.255.252
noshutdown
interfacefastEthernet1/3
noswitchport
noshutdown
interfacefastEthernet1/7
noswitchport
ipaddress20.0.0.1255.255.255.252
noshutdown
exit
routereigrp1
network10.0.0.0
network10.0.0.4
network20.0.0.0
End
R3:
en
vlandatabase
vtpclient
vtpdomaindragon
vtppassword123456
exit
configureterminal
intf1/1
switchportmodetrunk
intf1/11
switchportmodetrunk
exit
spanning-treevlan10
spanning-treevlan11
spanning-treevlan12
spanning-treevlan13
intf1/3
switchportaccessvlan10
end
R4-5配置與R3大致相同,只需要更改一下埠號和接受的VLAN即可。
通過命令“showstandbybrief”檢視R1和R2成hsrp,可以看到
通過命令“showspanning-treebrief”檢視到R1,R2,R3的生成樹,可以看到R2的f1/11被阻塞了埠
通過命令”showvtpstatus和showVLAN-swiport”檢視R3的vtp管理情況。
從頂部pc1(ip:20.0.0.2)ping通底部pc2(ip:192.168.10.100)
轉載於:https://blog.51cto.com/dragon123/1537460