Tải bản đầy đủ (.docx) (5 trang)

tài liệu phần mềm ccna hoàng ngọc thanhs page

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (110.15 KB, 5 trang )

<span class='text_page_counter'>(1)</span><div class='page_container' data-page=1>

<b>Spanning-Tree Protocol ( STP )</b>



<b>A. STP</b>



1. Tất cả các đường mạng là 100 Mbps.


Xem địa chỉ MAC của các switch, rồi sắp xếp lại sao cho SW1 có giá trị MAC nhỏ nhất.
Thứ tự MAC của các switch như sau: SW1 < SW2 < SW3 < SW4 < SW5.


Cắm dây cho các switch.
Switch#show version


………


63488K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 000B.BE13.6878


Motherboard assembly number : 73-9832-06
Power supply part number : 341-0097-02
Motherboard serial number : FOC103248MJ
Power supply serial number : DCA102133JA
Model revision number : B0


Motherboard revision number : C0


Model number : WS-C2960-24TT
System serial number : FOC1033Z1EY
Top Assembly Part Number : 800-26671-02
………


2. Kiểm tra xem switch nào là root, cổng nào là Root Port, Designated Port, trạng thái của cổng v…v


SW1#show spanning-tree


VLAN0001


Spanning tree enabled protocol ieee
Root ID Priority 32769


Address 0001.6353.05C8 -> MAC của Root Switch


This bridge is the root -> cho biết switch SW1 này đang là Root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0001.6353.05C8 -> MAC của switch này
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


22


21
23


24


23
22
22



24


24
22


23


23 24


</div>
<span class='text_page_counter'>(2)</span><div class='page_container' data-page=2>

--- ---- --- --- ---
---Fa0/22 Desg FWD 19 128.22 P2p


Fa0/23 Desg FWD 19 128.23 P2p
Fa0/24 Desg FWD 19 128.24 P2p


SW2#show spanning-tree


VLAN0001


Spanning tree enabled protocol ieee
Root ID Priority 32769


Address 0001.6353.05C8
Cost 19


Port 23(FastEthernet0/23)


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)



Address 000A.F390.8E40


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---
---Fa0/22 Desg FWD 19 128.22 P2p


Fa0/23 Root FWD 19 128.23 P2p
Fa0/24 Desg FWD 19 128.24 P2p


SW3#show spanning-tree


VLAN0001


Spanning tree enabled protocol ieee
Root ID Priority 32769


Address 0001.6353.05C8
Cost 19


Port 24(FastEthernet0/24)


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 000A.F3D9.5255



Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---
---Fa0/22 Desg FWD 19 128.22 P2p


Fa0/23 Desg FWD 19 128.23 P2p
Fa0/24 Root FWD 19 128.24 P2p


SW4#show spanning-tree


VLAN0001


Spanning tree enabled protocol ieee
Root ID Priority 32769


Address 0001.6353.05C8
Cost 19


Port 24(FastEthernet0/24)


</div>
<span class='text_page_counter'>(3)</span><div class='page_container' data-page=3>

Address 000B.BE13.6878


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type



--- ---- --- --- ---
---Fa0/22 Altn BLK 19 128.22 P2p


Fa0/23 Altn BLK 19 128.23 P2p
Fa0/24 Root FWD 19 128.24 P2p


SW5#show spanning-tree


VLAN0001


Spanning tree enabled protocol ieee
Root ID Priority 32769


Address 0001.6353.05C8
Cost 19


Port 21(FastEthernet0/21)


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0060.4710.3E36


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---


---Fa0/21 Root FWD 19 128.21 P2p


Fa0/22 Altn BLK 19 128.22 P2p
Fa0/23 Altn BLK 19 128.23 P2p
Fa0/24 Desg FWD 19 128.24 P2p


3. Đổi tốc độ của cổng nối SW1 – SW2 và SW1 – SW5 thành 10 Mbps. Show lại STP để kiểm tra sự
thay đổi


SW1(config)#int fa0/22
SW1(config-if)#speed 10
SW1(config)#int fa0/23
SW1(config-if)#speed 10
SW2(config)#int fa0/23
SW2(config-if)#speed 10
SW5(config)#int fa0/21
SW5(config-if)#speed 10


4. Cấu hình port-fast trên các cổng còn lại. Rồi cắm PC vào kiểm tra thời gian chuyển từ đèn cam lên
đèn xanh.


Cách 1: chỉ ra các cổng sẽ cấu hình


SW1(config)#int range fa0/1 – 21 -> cấu hình các port từ 1 đến 21 trên SW1
SW1(config-if-range)#spanning-tree portfast


Cách 2: bật tính năng port-fast trên các cổng không phải là trunk port


SW2(config)#int range fa0/22-24 -> chuyển thành trunk trên các cổng nối với swich
SW2(config-if-range)#switchport mode trunk



</div>
<span class='text_page_counter'>(4)</span><div class='page_container' data-page=4>

SW2(config)#spanning-tree portfast default -> bật port-fast trên các cổng không phải là
trunk


<b>B. PVSTP+</b>



1. Tạo thêm VLAN 2,3 trên các switch.
SW1(config)#vlan 2


SW1(config-vlan)#name Sale
SW1(config-vlan)#exit


SW1(config)#vlan 3


SW1(config-vlan)#name Tech
SW1(config-vlan)#exit


SW1(config)#vtp domain lab.com
SW1(config)#vtp mode server
SW2(config)#vtp domain lab.com
SW2(config)#vtp mode client
SW3(config)#vtp domain lab.com
SW3(config)#vtp mode client
SW4(config)#vtp domain lab.com
SW4(config)#vtp mode client
SW5(config)#vtp domain lab.com
SW5(config)#vtp mode client


2. Cấu hình để VLAN2 thấy SW2 là Root, VLAN1 thấy SW5 là Root, VLAN 3 thấy SW3 là Root
SW5(config)#spanning-tree vlan 1 root primary



SW2(config)#spanning-tree vlan 2 root primary
SW3(config)#spanning-tree vlan 3 root primary
SW5#show spanning-tree vlan 1


VLAN0001


Spanning tree enabled protocol ieee
Root ID Priority 24577


Address 0060.4710.3E36
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 0060.4710.3E36


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---
---Fa0/21 Desg FWD 19 128.21 P2p


Fa0/22 Desg FWD 19 128.22 P2p
Fa0/23 Desg FWD 19 128.23 P2p
Fa0/24 Desg FWD 19 128.24 P2p



SW2#show spanning-tree vlan 2


VLAN0002


</div>
<span class='text_page_counter'>(5)</span><div class='page_container' data-page=5>

Address 000A.F390.8E40
This bridge is the root


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24578 (priority 24576 sys-id-ext 2)


Address 000A.F390.8E40


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---
---Fa0/22 Desg FWD 19 128.22 P2p


Fa0/23 Desg FWD 19 128.23 P2p
Fa0/24 Desg FWD 19 128.24 P2p


SW3#show spanning-tree vlan 3


VLAN0003


Spanning tree enabled protocol ieee
Root ID Priority 24579



Address 000A.F3D9.5255
This bridge is the root


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24579 (priority 24576 sys-id-ext 3)


Address 000A.F3D9.5255


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---
---Fa0/22 Desg LSN 19 128.22 P2p


Fa0/23 Desg LSN 19 128.23 P2p
Fa0/24 Desg LSN 19 128.24 P2p


<b>C. RSTP</b>



1. Cấu hình để các switch chuyển sang chế độ sử dụng RSTP, rồi kiểm tra lại thời gian hội tụ.
SW1(config)#spanning-tree mode rapid-pvst


SW1#show spanning-tree


VLAN0001


Spanning tree enabled protocol rstp
Root ID Priority 24577



Address 0060.4710.3E36
Cost 19


Port 22(FastEthernet0/22)


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)


Address 0001.6353.05C8


Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20


Interface Role Sts Cost Prio.Nbr Type


--- ---- --- --- ---
---Fa0/22 Root LSN 19 128.22 P2p


Fa0/23 Desg BLK 19 128.23 P2p
Fa0/24 Desg BLK 19 128.24 P2p


</div>

<!--links-->

×