日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

CCNA重点难点:思科交换机生成树配置

發布時間:2025/3/20 编程问答 52 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CCNA重点难点:思科交换机生成树配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

后臺收到粉絲留言說講一下生成樹的配置,小微作為一個寵粉專業戶,這還不快分分鐘安排上,所以小伙伴們有想學想看的知識點都可以留言給小微,小微加更都會安排上~

附上:教學視頻+技術文檔哦,你就說棒不棒,哈

微思視頻教學:超詳細的【思科交換機生成樹配置】https://www.zhihu.com/zvideo/1454466959215218688https://www.zhihu.com/zvideo/1454466959215218688

1. 理解生成樹的運行原理

2. 掌握生成樹的配置方法

1. 根據實驗拓撲圖,完成設備的基本配置;

2. 把交換機互連的鏈路配置成Trunk,采用Dot1q封裝;

3. 分別在SW1、SW2和SW3上創建VLAN10和VLAN20,并將相應的接口劃到對應的VLAN;

4. SW1要作為VLAN10的根,VLAN20的備份根,使PC1訪問Server1的路徑通過:PC1->SW3->SW1->Server1;

5. SW2要作為VLAN20的根,VLAN10的備份根,使PC2訪問Server2的路徑通過:PC2->SW3->SW2->Server2;

步驟1:設備的基本配置

配置PC1:

VPCS> set pcname PC1 //設置主機名 PC1> ip 192.168.1.1/24 //設置IP地址

配置PC2

VPCS> set pcname PC2 PC2> ip 172.16.1.1/24 配置Server1 VPCS> set pcname Server1 Server1> ip 192.168.1.88/24 配置Server2 VPCS> set pcname Server2 Server2> ip 172.16.1.88/24

配置SW1

Switch>enable Switch#configure terminal Switch(config)#hostname SW1 SW1(config)#no ip domain-lookup SW1(config)#line console 0 SW1(config-line)#exec-timeout 0 0 SW1(config-line)#logging synchronous SW1(config-line)#end SW1#

?配置SW2

Switch>enable Switch#configure terminal Switch(config)#hostname SW2 SW2(config)#no ip domain-lookup SW2(config)#line console 0 SW2(config-line)#exec-timeout 0 0 SW2(config-line)#logging synchronous SW2(config-line)#end SW2#

配置SW3

Switch>enable Switch#configure terminal Switch(config)#hostname SW3 SW3(config)#no ip domain-lookup SW3(config)#line console 0 SW3(config-line)#exec-timeout 0 0 SW3(config-line)#logging synchronous SW3(config-line)#end SW3#

?步驟2:配置Trunk與VLAN

配置SW1: SW1(config)#interface range Eth0/0 - 1 SW1(config-if-range)#switchport trunk encapsulation dot1q SW1(config-if-range)#switchport mode trunk SW1(config-if-range)#exit SW1(config)#vlan 10 SW1(config-vlan)#name IT SW1(config-vlan)#exit SW1(config)#vlan 20 SW1(config-vlan)#name HR SW1(config-vlan)#exit SW1(config)#interface Eth0/2 SW1(config-if)#switchport mode access SW1(config-if)#switchport access vlan 10 SW1(config-if)#exit SW1(config)#end SW1#

配置SW2:

SW2(config)#interface range Eth0/1 , Eth0/3 SW2(config-if-range)#switchport trunk encapsulation dot1q SW2(config-if-range)#switchport mode trunk SW2(config-if-range)#exit SW2(config)#vlan 10 SW2(config-vlan)#name IT SW2(config-vlan)#exit SW2(config)#vlan 20 SW2(config-vlan)#name HR SW2(config-vlan)#exit SW2(config)#interface Eth0/2 SW2(config-if)#switchport mode access SW2(config-if)#switchport access vlan 20 SW2(config-if)#exit SW2(config)#end SW2#

?配置SW3:

SW3(config)#interface range Eth0/0 , Eth0/3 SW3(config-if-range)#switchport trunk encapsulation dot1q SW3(config-if-range)#switchport mode trunk SW3(config-if-range)#exit SW3(config)#vlan 10 SW3(config-vlan)#name IT SW3(config-vlan)#exit SW3(config)#vlan 20 SW3(config-vlan)#name HR SW3(config-vlan)#exit SW3(config)#interface Eth0/1 SW3(config-if)#switchport mode access SW3(config-if)#switchport access vlan 10 SW3(config-if)#exit SW3(config)#interface Eth0/2 SW3(config-if)#switchport mode access SW3(config-if)#switchport access vlan 20 SW2(config-if)#exit SW3(config)#end SW3#

步驟3:配置生成樹

配置SW1: SW1(config)#spanning-tree vlan 10 root primary SW1(config)#spanning-tree vlan 20 root secondary配置SW2: SW2(config)#spanning-tree vlan 20 root primary SW2(config)#spanning-tree vlan 10 root secondary

步驟1:檢查VLAN10的生成樹

檢查SW1

SW1#show spanning-tree vlan 10 VLAN0010Spanning tree enabled protocol ieeeRoot ID Priority 24586Address aabb.cc00.1000This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 24586 (priority 24576 sys-id-ext 10)Address aabb.cc00.1000Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 15 secInterface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Et0/0 Desg FWD 100 128.1 P2p Et0/1 Desg FWD 100 128.2 P2p Et0/2 Desg FWD 100 128.3 P2p

SW1是VLAN10的根網橋,因為SW2是VLAN10的備份根網橋,所以SW3的E0/3針對VLAN10肯定是阻塞狀態。

檢查SW3

SW3#show spanning-tree vlan 10 VLAN0010Spanning tree enabled protocol ieeeRoot ID Priority 24586Address aabb.cc00.1000Cost 100Port 1 (Ethernet0/0)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32778 (priority 32768 sys-id-ext 10)Address aabb.cc00.3000Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300 secInterface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Et0/0 Root FWD 100 128.1 P2p Et0/1 Desg FWD 100 128.2 P2p Et0/3 Altn BLK 100 128.4 P2p 針對VLAN10,SW3的E0/3是阻塞的,E0/0是轉發的,這樣PC1訪問Server1的路徑就是:PC1->SW3->SW1->Server1。步驟2:檢查VLAN20的生成樹 檢查SW2: SW2#show spanning-tree vlan 20 VLAN0020Spanning tree enabled protocol ieeeRoot ID Priority 24596Address aabb.cc00.2000This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 24596 (priority 24576 sys-id-ext 20)Address aabb.cc00.2000Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300 secInterface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Et0/1 Desg FWD 100 128.2 P2p Et0/2 Desg FWD 100 128.3 P2p Et0/3 Desg FWD 100 128.4 P2p SW2是VLAN20的根網橋,因為SW1是VLAN10的備份根網橋,所以SW3的E0/0針對VLAN20肯定是阻塞狀態。檢查SW3: SW3#show spanning-tree vlan 20 VLAN0020Spanning tree enabled protocol ieeeRoot ID Priority 24596Address aabb.cc00.2000Cost 100Port 4 (Ethernet0/3)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32788 (priority 32768 sys-id-ext 20)Address aabb.cc00.3000Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300 secInterface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Et0/0 Altn BLK 100 128.1 P2p Et0/2 Desg FWD 100 128.3 P2p Et0/3 Root FWD 100 128.4 P2p 針對VLAN20,SW3的E0/0是阻塞的,E0/3是轉發的,這樣PC2訪問Server2的路徑就是:PC2->SW3->SW2->Server2。

總結

以上是生活随笔為你收集整理的CCNA重点难点:思科交换机生成树配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。