top of page

LAB 6 : Configuring STP - CCNA

โจทย์ : จาก Network Diagram ทำการตั้งค่าบน STP บน Switch ตามหัวข้อดังต่อไปนี้


1. หา Root Bridge, Root Port, Designated Port และ Nonedesignated Port(Block Port)

1.1 ด้วยการคำนวณ

1.2 ด้วย Command Line

2. ตั้งค่า Spanning Tree Portfast กับ Port ที่เชื่อมต่อกับ Host

3. เปลี่ยน Root Bridge โดยการแก้ค่า Priority ที่ None Root Bridge เป็น 4096

4. Change mode Spanning Tree เป็น Rapid-PVST


ดู Video :



Download ไฟล์ LAB คลิกด้านล่างนี้ :

#LAB 6 CONFIGURING STP
.rar
ดาวน์โหลด RAR • 227KB

Task and Configuration


1. หา Root Bridge, Root Port, Designated Port และ Nonedesignated Port(Block Port)

1.1 ด้วยการคำนวณ

(ดู Video ตาม link ด้านบน)


1.2 ด้วย Command Line

ที่ CORE-SW1

บน CORE-SW-1 ทำการหาค่า Priority ของ Root Bridge, MAC Address ของ Root Bridge, ค่า Priority ของ Switch, MAC Address ของ Switch, Root Port, Designated Port, Nondesignated Port(Block Port)

CORE-SW1#show spanning-tree
VLAN0001
 Spanning tree enabled protocol ieee
 Root ID Priority 32769
 Address 0001.C745.0891
 Cost 4
 Port 25(GigabitEthernet0/1)
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
 Address 000A.41A6.EC31
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24    Desg FWD 19   128.24   P2p
Gi0/1     Root FWD 4    128.25   P2p
Gi0/2     Desg FWD 4    128.26   P2p

ค่า Priority ของ Root Bridge 32769

MAC Address ของ Root Bridge 0001.C745.0891

ค่า Priority ของ Switch 32769

MAC Address ของ Switch 000A.41A6.EC31

Root Port คือ Gi0/1

Designated Port คือ Gi0/2, Fa0/24

Nondesignated Port(Block Port) ไม่มี


ที่ CORE-SW2

บน CORE-SW-2 ทำการหาค่า Priority ของ Root Bridge, MAC Address ของ Root Bridge, ค่า Priority ของ Switch, MAC Address ของ Switch, Root Port, Designated Port, Nondesignated Port(Block Port)

CORE-SW2#show spanning-tree
VLAN0001
 Spanning tree enabled protocol ieee
 Root ID Priority 32769
 Address 0001.C745.0891
 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 0001.C745.0891
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/1     Desg FWD  4   128.25   P2p 
Gi0/2     Desg FWD  4   128.26   P2p

ค่า Priority ของ Root Bridge 32769

MAC Address ของ Root Bridge 0001.C745.0891

ค่า Priority ของ Switch 32769

MAC Address ของ Switch 0001.C745.0891

Root Port ไม่มี

Designated Port คือ Gi0/2, Gi0/2

Nondesignated Port(Block Port) ไม่มี


ที่ SW1

บน SW1 ทำการหาค่า Priority ของ Root Bridge, MAC Address ของ Root Bridge, ค่า Priority ของ Switch, MAC Address ของ Switch, Root Port, Designated Port, Nondesignated Port(Block Port)

SW1#show spanning-tree
VLAN0001
 Spanning tree enabled protocol ieee
 Root ID Priority 32769
 Address 0001.C745.0891
 Cost 8
Port 26(GigabitEthernet0/2)
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
 Address 0002.4ACC.11CC
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- -------
Fa0/1     Desg FWD  19  128.1    P2p
Gi0/1     Altn BLK  4   128.25   P2p
Gi0/2     Root FWD  4   128.26   P2p

ค่า Priority ของ Root Bridge 32769

MAC Address ของ Root Bridge 0001.C745.0891

ค่า Priority ของ Switch 32769

MAC Address ของ Switch 0002.4ACC.11CC

Root Port คือ Gi0/2

Designated Port คือ Fa0/1

Nondesignated Port(Block Port) คือ Gi0/1


ที่ SW2

บน SW2 ทำการหาค่า Priority ของ Root Bridge, MAC Address ของ Root Bridge, ค่า Priority ของ Switch, MAC Address ของ Switch, Root Port, Designated Port, Nondesignated Port(Block Port)

SW2#show spanning-tree
VLAN0001
 Spanning tree enabled protocol ieee
 Root ID Priority 32769
 Address 0001.C745.0891
 Cost 4
 Port 25(GigabitEthernet0/1)
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
  Address 000A.414C.2316
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1     Desg FWD 19   128.1    P2p
Gi0/1     Root FWD 4    128.25   P2p
Gi0/2     Desg FWD 4    128.26   P2p

ค่า Priority ของ Root Bridge 32769

MAC Address ของ Root Bridge 0001.C745.0891

ค่า Priority ของ Switch 32769

MAC Address ของ Switch 000A.414C.2316

Root Port คือ Gi0/1

Designated Port คือ Gi0/2, Fa0/1

Nondesignated Port(Block Port) ไม่มี


2. ตั้งค่า Spanning Tree Portfast กับ Port ที่เชื่อมต่อกับ Host

ที่ SW1

เข้าสู่โหมด Interface

SW1(config)#interface FastEthernet 0/1

ตั้งค่าเป็น Spanning-tree Portfast

SW1(config-if)#spanning-tree portfast

ที่ SW2

เข้าสู่โหมด Interface

SW2(config)#interface FastEthernet 0/1

ตั้งค่าเป็น Spanning-tree Portfast

SW2(config-if)#spanning-tree portfast


ตรวจสอบตั้งค่า Spanning Tree Portfast กับ Port ที่เชื่อมต่อกับ Host โดยทำการ Unplug และ Plug สาย LANของ Client Interface ที่ Config Portfast ไว้


3. เปลี่ยน Root Bridge โดยการแก้ค่า Priority ที่ None Root Bridge เป็น 4096

ที่ CORE-SW1

ตั้งค่า Spanning-tree –ของ Vlan 1 ให้มี Priority เท่ากับ 4096

CORE-SW1(config)#spanning-tree vlan 1 priority 4096

ตรวจสอบการตั้งค่า Root Bridge โดยการแก้ค่า Priority ที่ None Root Bridge เป็น 4096

CORE-SW1#show spanning-tree
VLAN0001
 Spanning tree enabled protocol rstp
 Root ID Priority 4097
 Address 000A.41A6.EC31
This bridge is the root
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
 Address 000A.41A6.EC31
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Aging Time 20
Interface Role Sts Cost Prio.Nbr Type

จะเห็นได้ว่า CORE-SW1 เป็น Root Bridge เรียบร้อยแล้ว โดยสังเกตุที่ข้อความ "This bridge is the root"


4. เปลี่ยน Root Bridge โดยการแก้ค่า Priority ที่ None Root Bridge เป็น 4096

CORE-SW1, CORE-SW2, SW1, SW2

เปลี่ยนโหมดการทำงานของ Spanning-tree เป็น rapid-pvst

CORE-SW1(config)# spanning-tree mode rapid-pvst

CORE-SW2(config)# spanning-tree mode rapid-pvst

SW1(config)# spanning-tree mode rapid-pvst

SW2(config)# spanning-tree mode rapid-pvst

ตรวจสอบดูด้วยคำสั่ง” show spanning-tree” ก็จะพบว่า ทำงานเป็น rapid-pvst เรียบร้อยแล้ว

CORE-SW1#show spanning-tree
VLAN0001
 Spanning tree enabled protocol rstp
 Root ID Priority 4097
 Address 000A.41A6.EC31
 This bridge is the root
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
 Address 000A.41A6.EC31
 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
 Aging Time 20

จะเห็นได้ว่า Mode ของ STP เปลี่ยนเป็น RSTP เรียบร้อยแล้ว


ดู 356 ครั้ง0 ความคิดเห็น
bottom of page