1. 程式人生 > 實用技巧 >Spanning-tree+hsrp+ eigrp綜合實驗

Spanning-tree+hsrp+ eigrp綜合實驗


STP(spanningTreeProtocol,生成樹)就是把一個環形的結構改變成一個樹形的結構,STP協議就是用來將物理上存在環路的網路,通過一種演算法,在邏輯上,阻塞一些埠,來生成一個邏輯結構。

HSRPhoststandbyroutingprotocol,熱備路由協議)是思科私有的一種技術,它確保了當地邊緣裝置或接入裝置出現故障時,使用者通訊能迅速並透明地恢復,以此為ip網路提供冗餘性。

VTP是一種資訊協議,它使用第二層幀,在交換機之間傳遞VLAN資訊,被稱為VTP通告。

EIGRPEnhancedInteriorGatewayRoutingProtocol增強內部網管關由線路協議

Cisco公司的私有協議EIGRP結合了鏈路狀態和距離向量路由選擇協議Cisco專用協議,採用彌散修正演算法(DUAL)來實現快速收斂,可以不傳送定期的路由更新資訊以減少頻寬的佔用,支援AppletalkIPNovellNetWare等多種網路層協議。

新建實驗拓撲圖

wKiom1PkdBzS7SnJAAM2QoOcm-0578.jpg

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”檢視R1R2hsrp,可以看到

wKiom1PkdIrBoaniAAKIThykWG0710.jpg

通過命令“showspanning-treebrief”檢視到R1R2R3的生成樹,可以看到R2f1/11被阻塞了埠


wKioL1PkdgLS6gg6AAahWVzvzOc486.jpg

通過命令showvtpstatusshowVLAN-swiport檢視R3vtp管理情況。


wKiom1PkdUDhcZGxAAFJQjxBlbo626.jpg

wKioL1PkdluiGmsGAAItpvKFy-Q668.jpg



從頂部pc1ip:20.0.0.2ping通底部pc2(ip:192.168.10.100)


wKiom1PkdXOyhcg-AAJX6yCpqgI697.jpg

轉載於:https://blog.51cto.com/dragon123/1537460