Các thực thi MSTP của Switch

I/Tổng quan : Mục tiêu của bài viết này là xem các thực thi MSTP của Switch , qua đó chúng ta có thể thử được sự hoạt động của RSTP bằng cách nối thêm 1 đường fa0/5 của Sw3 vào Sw1 . Như vậy trong bài lab này chúng ta có thể được cả hai loại protocol trên II/Các bước cấu hình : Ta sử dụng 2 Switch 3550 và 2 Switch 2950 ,các Switch này đề nằm trong VTP doamin là vnpro , VTP mode của 2 Sw1 , Sw 2 là Server còn Sw3 là mode client . Bước 1 : Xoá cấu hình cũ Switch , khi khởi động vào Bước 2 : Cấu hình trunk giữa các Switch : ta cấu hình như sau Sw1(config)#int fa0/1 Sw1(config-if)#switchport trunk encapsulation dot1q Sw1(config-if)#switchport mode trunk Sw1(config)#int fa0/3 Sw1(config-if)#switchport trunk encapsulation dot1q Sw1(config-if)#switchport mode trunk

pdf7 trang | Chia sẻ: tlsuongmuoi | Lượt xem: 2081 | Lượt tải: 0download
Bạn đang xem nội dung tài liệu Các thực thi MSTP của Switch, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
I/T ng quan : ổ M c tiêu c a bài vi t này là xem các th c thi MSTP c a Switch , qua đó chúng ta cóụ ủ ế ự ủ th th đ c s ho t đ ng c a RSTP b ng cách n i thêm 1 đ ng fa0/5 c a Sw3 vàoể ử ượ ự ạ ộ ủ ằ ố ườ ủ Sw1 . Nh v y trong bài lab này chúng ta có th đ c c hai lo i protocol trên ư ậ ể ượ ả ạ II/Các b c c u hình : ướ ấ Ta s d ng 2 Switch 3550 và 2 Switch 2950 ,các Switch này đ n m trong VTP doaminử ụ ề ằ là vnpro , VTP mode c a 2 Sw1 , Sw 2 là Server còn Sw3 là mode client .ủ B c 1 : Xoá c u hình cũ Switch , khi kh i đ ng vàoướ ấ ở ộ B c 2 : C u hình trunk gi a các Switch : ta c u hình nh sau ướ ấ ữ ấ ư Sw1(config)#int fa0/1 Sw1(config-if)#switchport trunk encapsulation dot1q Sw1(config-if)#switchport mode trunk Sw1(config)#int fa0/3 Sw1(config-if)#switchport trunk encapsulation dot1q Sw1(config-if)#switchport mode trunk Sw2(config)#int fa0/1 Sw2(config-if)#switchport trunk encapsulation dot1q Sw2(config-if)#switchport mode trunk Sw2(config)#int fa0/3 Sw2(config-if)#switchport trunk encapsulation dot1q Sw2(config-if)#switchport mode trunk Gi ng nh Sw1, Sw2 . Sw3 c u hình t ng t . ố ư ấ ươ ự B c 3 : Bây gi ta b t đ u t o các Vlan t i Sw1ướ ờ ắ ầ ạ ạ Tr c khi c u hình Vlan , ta c u hình vtp mode c a Sw1, Sw2 là server . Sw3 là client .ướ ấ ấ ủ C ba đ u có domain là vnpro .ả ề Sw1#vlan database Sw1(vlan)#vtp m server Device mode already VTP SERVER. Sw1(vlan)#vtp do Sw1(vlan)#vtp domain vnpro Changing VTP domain name from NULL to vnpro Sw1(vlan)#apply APPLY completed. Sw1(vlan)#exit APPLY completed Sw2#vlan database Sw2(vlan)#vtp server Device mode already VTP SERVER. Sw2(vlan)#vtp do Sw2(vlan)#vtp domain vnpro Domain name already set to vnpro . Sw2(vlan)#apply APPLY completed. Sw2(vlan)#con exit APPLY completed. Exiting... Sw3#vlan database Sw3(vlan)#vtp client Setting device to VTP CLIENT mode. Sw3(vlan)#vtp domain vnpro Domain name already set to vnpro . Sw3(vlan)#apply Apply not allowed when device is in CLIENT state. Sau khi c u hình vtp , ta c u hình các vlan t Switch 1 .ấ ấ ừ Sw1(vlan)#vlan 10 name Accounting VLAN 10 added: Name: Accounting Sw1(vlan)#vlan 20 name Marketing VLAN 20 added: Name: Marketing Sw1(vlan)#vlan 30 nane Engineering VLAN 30 added: Name: Engineering Sw1(vlan)#vlan 49 name HumanResouce VLAN 40 added: Name: HumanResource Sw1(vlan)#vlan 50 name GraphicDesign VLAN 50 added: Name: GraphicDesign Sau đó ki m tra các Vlan này b ng cách đánh l nh show vlan t i các Switchể ằ ệ ạ Sw2#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/2, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/15, Fa0/16, Fa0/17, Fa0/18 Fa0/19, Fa0/20, Fa0/21, Fa0/22 Fa0/23, Fa0/24, Gi0/1, Gi0/2 10 Accounting active 20 Marketing active 30 Engineering active 40 HumanResource active 50 GraphicDesign active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active B c 4 : Ch y m c đ nh c a Spanning tree là : Multiple spaning –tree s d ng RSTPướ ạ ặ ị ủ ử ụ cho s h i t t c th i . M i instance ho t đ ng đ c l p v i instance khác . C u trúcự ộ ụ ứ ờ ỗ ạ ộ ộ ậ ớ ấ này có th cung c p nhi u đ ng d n cho các traffic và chia t i .ể ấ ề ườ ẫ ả Sw1#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 000d.299a.7e00 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 000d.299a.7e00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 19 128.1 P2p Fa0/3 Desg FWD 19 128.3 P2p Ta c u hình MSTP trên Switch 1 , MSTP cho phép chúng ta nhóm các Vlan l i thànhấ ạ các Spanning-tree instance , các spanning tree khác s instance s ho t đ ng đ c l pố ẽ ạ ộ ọ ậ v i nhau , gi i pháp này là m t gi i pháp th c s đ chia t i vài gi m b t đ c sớ ả ộ ả ự ự ể ả ả ớ ượ ự ho t đ ng quá nhi u c a Spanning-tree . MSTP ch h tr 16 instance , các s instanceạ ộ ề ủ ỉ ỗ ợ ố t 1 đ n 15ừ ế T config mode , vào mst config mode : ừ Sw1(config)#spanning-tree mst configuration Sw1(config-mst)#instance 1 vlan 1-30 Sw1(config-mst)#name vnpro Sw1(config-mst)#revision 10 Dùng l nh show pending đ xem l i .ệ ể ạ Sw1(config-mst)#show pending Pending MST configuration Name [vnpro] Revision 10 Instance Vlans mapped -------- --------------------------------------------------------------------- 0 31-4094 1 1-30 Các mst có instance 1 là ch a các Vlan 1->30 , còn instance 0 ch a t t c các vlan cònứ ứ ấ ả l i . ạ T ng t c u hình cho các Sw2, Sw 3ươ ự ấ Sw2(config)#spanning-tree mst configuration Sw2(config-mst)#instance 1 vlan 1-30 Sw2(config-mst)#name vnpro Sw2(config-mst)#revision 10 Ta s d ng show spanning-tree đ xem ho t đ ng c a các spanning-tree .ử ụ ể ạ ộ ủ MST00 Spanning tree enabled protocol mstp Root ID Priority 32768 Address 000d.299a.7e00 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 0) Address 000d.299a.7e00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 200000 128.1 P2p Fa0/3 Desg FWD 200000 128.3 P2p MST01 Spanning tree enabled protocol mstp Root ID Priority 32769 Address 000d.299a.7e00 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 000d.299a.7e00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 200000 128.1 P2p Fa0/3 Desg FWD 200000 128.3 P2p C hai MST00 và MST01 đ u có root brigde là switch 1 , bây gi ta c u hình đ i v iả ề ờ ấ ố ớ MST00 thì root bridge là switch 2 . Sw2(config)#spanning-tree mst 0 root primary Dùng l nh show spanning-tree đ ki m tra trên switch 2 lúc này .ệ ể ể Sw2#show spanning-tree MST00 Spanning tree enabled protocol mstp Root ID Priority 24576 Address 000d.bd29.d080 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24576 (priority 24576 sys-id-ext 0) Address 000d.bd29.d080 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 200000 128.1 P2p Fa0/3 Desg FWD 200000 128.3 P2p MST01 Spanning tree enabled protocol mstp Root ID Priority 24577 Address 000d.299a.7e00 Cost 200000 Port 3 (FastEthernet0/3) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 000d.bd29.d080 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Altn BLK 200000 128.1 P2p Fa0/3 Root FWD 200000 128.3 P2p Nh v y đ i v i MST00 thì Switch làm root và MST01 thì v n là Sw1 . ư ậ ố ớ ẫ B c 5 : Th RSTP . Bây gi ta c m port 5 c a Sw1 v i port 5 c a Switch 3 , và sauướ ử ờ ắ ủ ớ ủ đó c u hình “ Trunk “ cho 2 port này . ấ Sw1(config)#int fa0/5 Sw1(config-if)#switchport trunk encapsulation dot1q Sw1(config-if)#switchport mode trunk Sw3(config)#int fa0/5 Sw3(config-if)#switchport trunk encapsulation dot1q Sw3(config-if)#switchport mode trunk Sau khi c u hình xong , ta show spanning-tree c 2 Sw1, Sw3ấ ở ả Sw3#show spanning-tree MST00 Spanning tree enabled protocol mstp Root ID Priority 24576 Address 000d.bd29.d080 Cost 0 Port 3 (FastEthernet0/3) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 0) Address 000d.bc33.2b00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Altn BLK 200000 128.1 P2p Fa0/3 Root FWD 200000 128.3 P2p Fa0/5 Altn BLK 200000 128.5 P2p Sw1#show spanning-tree MST00 Spanning tree enabled protocol mstp Root ID Priority 24576 Address 000d.bd29.d080 Cost 0 Port 1 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 (priority 32768 sys-id-ext 0) Address 000d.299a.7e00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Root FWD 200000 128.1 P2p Fa0/3 Desg FWD 200000 128.3 P2p Fa0/5 Desg FWD 200000 128.5 P2p --More-- MST01 Spanning tree enabled protocol mstp Root ID Priority 24577 Address 000d.299a.7e00 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24577 (priority 24576 sys-id-ext 1) Address 000d.299a.7e00 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Fa0/1 Desg FWD 200000 128.1 P2p Fa0/3 Desg FWD 200000 128.3 P2p Fa0/5 Desg FWD 200000 128.5 P2p B c ti p theo ta d t cáp c a fa0/1 c a Sw3 , lúc này root port s không còn n a ,ướ ế ự ủ ủ ẽ ữ c ng fa0/5 s chuy n lên làm root port . Do link type c a các liên k t là ( fa0/5 ) làổ ẽ ể ủ ế p2p , nên quá trình chuy n tr ng thái s b rút g n . C ng fa0/5 s chuy n tr ng tháiể ạ ẽ ị ọ ổ ẽ ể ạ r t nhanh . Ta b t các l nh debug spanning mst role và service timestamp trong modeấ ậ ệ config . Khi d t cáp t port 1 sw3ự ừ Sw3# 01:10:41: MSTP(1): Fa0/5 is now root port 01:10:41: MSTP(1): Fa0/1 is now alternate port 01:10:41: MSTP(0): updt roles 01:10:42: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down 01:10:43: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down Bây gi ta c m l i : ờ ắ ạ Sw3# 01:10:52: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up 01:10:53: MSTP(0): Fa0/1 is now designated 01:10:53: MSTP(1): Fa0/1 is now designated portcam 01:10:53: MSTP(0): updt roles 01:10:53: MSTP(0): Fa0/1 is now alternate 01:10:53: MSTP(1): Fa0/1 is now root port 01:10:53: MSTP(1): Fa0/5 is now alternate port Translating "cam"...domain server (255.255.255.255) % Unknown command or computer name, or unable to find computer address Sw3# 01:10:54: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up. Quá trình x y ra r t nhanh , có th d dàng theo dõi b ng các l nhả ấ ể ễ ằ ệ debug . Nh v y so v i STP và RSTP ta th y RSTP nhanh h n và ti n l i h n .ư ậ ớ ấ ơ ệ ợ ơ

Các file đính kèm theo tài liệu này:

  • pdfCác thực thi MSTP của Switch.pdf
Tài liệu liên quan