Mô tả: Bài thực hành sử dụng 3 switch Catalyst 3550, thực hành về những ích lợi của rstp so với stp thông thường. Bài lab sẽ xem xét những vấn đề như các state của rstp, cách cấu hình, thời gian hội tụ, cách chuyển đổi giữa các trạng thái



tải về 15.92 Kb.
Chuyển đổi dữ liệu14.08.2016
Kích15.92 Kb.
#19320
Mô tả:

Bài thực hành sử dụng 3 switch Catalyst 3550, thực hành về những ích lợi của RSTP so với STP thông thường. Bài lab sẽ xem xét những vấn đề như các state của RSTP, cách cấu hình, thời gian hội tụ, cách chuyển đổi giữa các trạng thái.




Cấu hình:

RootSwitch


version 12.1
!
hostname Root
!
enable password cisco
!
!
spanning-tree mode mst <- Bật tính năng RSTP trên switch này
spanning-tree extend system-id
!
interface FastEthernet0/1
switchport mode access
spanning-tree link-type point-to-point <- bật kiểu liên kết trên interface này là P2P
!
interface FastEthernet0/2
switchport mode access
no ip address
spanning-tree link-type point-to-point
!
interface FastEthernet0/3
switchport mode access
no ip address
spanning-tree link-type point-to-point
!
interface Vlan1
ip address 192.168.1.1 255.255.255.0
!
end

SwitchA
!


version 12.1
!
hostname SwitchA
ip subnet-zero
!
spanning-tree mode mst
spanning-tree extend system-id
spanning-tree vlan 1 priority 61440 <-- bảo đảm Root Switch là switch
spanning-tree mst 0 priority 61440
!
!
!
interface FastEthernet0/1
switchport mode access
no ip address
spanning-tree link-type point-to-point
!
interface FastEthernet0/2
switchport mode access
no ip address
spanning-tree link-type point-to-point
spanning-tree cost 18
!
interface FastEthernet0/4
switchport mode access
no ip address
spanning-tree link-type point-to-point
!
interface FastEthernet0/6
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/7
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/8
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/9
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/10
switchport mode access
no ip address
spanning-tree portfast
!
interface FastEthernet0/11
switchport mode access
no ip address
!
interface FastEthernet0/12
switchport mode access
no ip address
!
!
interface Vlan1
ip address 192.168.1.2 255.255.255.0
!
ip classless
ip http server
end

SwitchB
!


hostname SwitchB
!
ip subnet-zero
!
spanning-tree mode mst
spanning-tree extend system-id
spanning-tree vlan 1 priority 61440 <-- bảo đảm Root Switch là switch
spanning-tree mst 0 priority 61440
!
interface FastEthernet0/1
switchport mode access
!
interface FastEthernet0/2
switchport mode access
spanning-tree link-type point-to-point
!
interface FastEthernet0/3
switchport mode access
spanning-tree link-type point-to-point
!
interface FastEthernet0/4
switchport mode access
!
interface FastEthernet0/5
switchport mode access
!
interface FastEthernet0/6
switchport mode access
!
interface FastEthernet0/7
switchport mode access
!
interface FastEthernet0/8
switchport mode access
!
interface GigabitEthernet0/1
switchport mode dynamic desirable
!
interface GigabitEthernet0/2
switchport mode dynamic desirable
!
interface Vlan1
ip address 192.168.1.3 255.255.255.0
!
!
end

Thực hiện:

1. Cấu hình switch root, bật tính năng RSTP trên switch này, mặc định switch sẽ chạy PVST, do đó để thay đổi và cho phép chạy RSTP, ta phải bật MST lên, vì khi bật MST thì sẽ kích hoạt luôn cả RSTP.

Root(config)#spanning-tree mode mst

Sau đó, cấu hình trên các liên kết của switch ở dạng liên kết P2P.

Root(config)#int fa0/1
Root(config-if)#spanning-tree link-type point-to-point
Root(config-if)#int fa0/2
Root(config-if)#spanning-tree link-type point-to-point
Root(config-if)#int fa0/3
Root(config-if)#spanning-tree link-type point-to-point

Chú ý: Một trong những chi tiết giúp tăng tốc độ hội tụ của RSTP là nó đặt ra 2 thông sồ: edge port và link-type.

Edge port: là các port được kết nối với end user, và do đó sẽ không nhận các BPDU trên các kết nối này, ở RSTP thì edge port được xem là các port có bât tính năng portfast, tuy nhiên có 1 điểm cải tiến là, không giống như portfast bình thường, edge port khi nhận được BPDU sẽ tự động chuyển sang trạng thái port bình thường chứ không bị shutdown như portfast của STP.Khi có sự thay đổi topo thì các portfast sẽ không bị tác động, và switch chỉ block những non-edgeport khi có ự thay đổi diễn ra.

· Link-Type: thông số thứ 2 là link type, khi có sự thay đổi diễn ra thì các port được cấu hình ở liên kết p2p sẽ nhanh chóng chuyển dịch trạng thái(sẽ được khảo sát sau), mà không mất thời gian listenning, learning. Mặc định các liện kết full-duplex sẽ là P2P, còn half-duplex sẽ là sharelink.Khi có sự thay đổi xảy ra, sẽ có các gói tin proposal và agreement được trao đổi trên liên kết p2p, và nhanh chóng sẽ biết được trạng thái port của nó mà không cần tính toán lại STP.

2. Cấu hình tương tự trên 2 switch A,B, chỉ khác là ta phải xác định lại bridgeID để đảm bảo root luôn là root:

SwitchA(config)#spanning-tree mode mst


SwitchA(config)#spanning-tree vlan 1 priority 61440
SwitchA(config)#spanning-tree mst 0 priority 61440
Sau đó cấu hình link type P2P trên các port 1,2,4 của switch A, và các port 2,3 của switchB.

Kiểm tra:

Để tiến hành kiểm tra, ta bật service timestamp trên các switch để xem các thông số thời gian khi debug.Bật debug spanning-tree mst roles trên các switch.

Các cách thử:
Trên switchA:
· Switch A có 2 liên kết đến root, ta thử dựt 1 trong 2 liên kết đến root, dựt cả 2 liên kết, rồi xem sự chuyển dịch trạng thái trên switch.Cắm 1 pc vào các edge port.
SwitchA(config)#service timestamps
SwitchA#debug spannin mst role
SwitchA#sh spa

MST00
Spanning tree enabled protocol mstp


Root ID Priority 32768
Address 000d.bc33.2b00
Cost 0
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 61440 (priority 61440 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 Root FWD 200000 128.1 P2p
Fa0/2 Altn BLK 18 128.2 P2p
Fa0/4 Altn BLK 200000 128.4 P2p
Ta thấy hiện tại các port 2,4 trên switchA đang ở chức năng Alternate và trạng thái là block, nguyên nhân là do nó đã có 1 đường đến root là qua port 1.
Sau đó, ta dựt port 1 ra, xem debug:
01:16:24: MSTP(0): updt roles
01:16:24: MSTP(0): Fa0/4 is now root port<--port 4 lập tức chuyển lên trạng thái forwarding
01:16:24: MSTP(0): Fa0/1 is now alternate
01:16:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
01:16:26: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down
Sau đó cắm lại port 1, xem debug:
01:16:35: MSTP(0): Fa0/1 is now designated
01:16:35: MSTP(0): updt roles
01:16:35: MSTP(0): Fa0/1 is now root port<--lập tức port 1 chuyển thành root
01:16:35: MSTP(0): Fa0/4 is now alternate<-- và port 4 chuyển về trạng thái block
01:16:37: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
01:16:38: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Sau đó, tương tự dựt, và cắm lại port 4
01:17:47: MSTP(0): Fa0/4 is now designated
01:17:47: MSTP(0): updt roles
01:17:47: MSTP(0): Fa0/4 is now alternate<--port 4 vẫn ở alternate, port 1 vẫn là root
01:17:48: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
01:17:49: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down

Sau đó cắm 1 pc vào port 9, sau đó dựt port 1:

SwitchA#
01:18:16: MSTP(0): updt roles
01:18:16: MSTP(0): Fa0/4 is now root port
01:18:16: MSTP(0): Fa0/1 is now alternate
01:18:17: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
01:18:18: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down
SwitchA#sh spa

MST00
Spanning tree enabled protocol mstp


Root ID Priority 32768
Address 000d.bc33.2b00
Cost 0
Port 4 (FastEthernet0/4)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 61440 (priority 61440 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/2 Altn BLK 18 128.2 P2p
Fa0/4 Root FWD 200000 128.4 P2p
Fa0/9 Desg FWD 200000 128.9 Edge P2p
Sau đó cắm lại port 1:
SwitchA#
01:19:13: MSTP(0): Fa0/1 is now designated
01:19:13: MSTP(0): updt roles
01:19:13: MSTP(0): Fa0/1 is now root port
01:19:13: MSTP(0): Fa0/4 is now alternate
01:19:15: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
01:19:16: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
SwitchA#
SwitchA#sh spa

MST00
Spanning tree enabled protocol mstp


Root ID Priority 32768
Address 000d.bc33.2b00
Cost 0
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 61440 (priority 61440 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 Root FWD 200000 128.1 P2p
Fa0/2 Altn BLK 18 128.2 P2p
Fa0/4 Altn BLK 200000 128.4 P2p
Fa0/9 Desg FWD 200000 128.9 Edge P2p
Cuối cùng dựt cả 2 port1,4, xem nó có chuyển qua port 2 để về root hay không:
SwitchA#
01:19:29: MSTP(0): updt roles
01:19:29: MSTP(0): Fa0/4 is now root port
01:19:29: MSTP(0): Fa0/1 is now alternate
01:19:30: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
01:19:31: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to down
SwitchA#
01:19:39: MSTP(0): updt roles
01:19:39: MSTP(0): Fa0/2 is now root port
01:19:39: MSTP(0): Fa0/4 is now alternate
01:19:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/4, changed state to down
01:19:41: %LINK-3-UPDOWN: Interface FastEthernet0/4, changed state to down
Ta thấy, ngay lập tức sau khi dựt port1,4 switch chuyển liền sang port 2 làm root.
Trên switchB:
Ta cũng thử tương tự:
Dựt port3, xem nó có chuyển sang port 2 để về switch root hay không:
SwitchB#sh spa

MST00
Spanning tree enabled protocol mstp


Root ID Priority 32768
Address 000d.bc33.2b00
Cost 0
Port 3 (FastEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 61440 (priority 61440 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/2 Desg FWD 200000 128.2 P2p
Fa0/3 Root FWD 200000 128.3 P2p
witchB#
01:23:24: MSTP(0): updt roles
01:23:24: MSTP(0): updt roles
01:23:24: MSTP(0): Fa0/2 is now root port
01:23:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
SwitchB#
01:23:26: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
Ngay lập tức nó sẽ chuyển port 2 làm root port khi tháo cáp port 3 ra.

Cắm lại port 3:


SwitchB#
01:23:37: MSTP(0): Fa0/3 is now designated
01:23:37: MSTP(0): updt roles
01:23:37: MSTP(0): Fa0/3 is now root port
01:23:37: MSTP(0): Fa0/2 is now designated
SwitchB#
01:23:39: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
01:23:40: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Каталог: Hoc%20Tap -> BCMSN-SWITCH
Hoc%20Tap -> GIỚi thiệu về multicast
BCMSN-SWITCH -> Độ ưu tiên cao nhất (mặc định là 100, trong tầm từ 1-255) sẽ xác định router, với cơ chế pre-emption bị tắt
Hoc%20Tap -> Point to Point Protocol (ppp) ppp được xây dựng dựa trên nền tảng giao thức điều khiển truyền dữ liệu lớp cao (High-Level Data link Control (hdlc)) nó định ra các chuẩn cho việc truyền dữ liệu các giao diện dte và dce của mạng wan như V
Hoc%20Tap -> Cấu hình Application Port-Mapping với cbac mục tiêu: Cấu hình để router nhận ra các ứng dụng không sử dụng port chuẩn. Mô hình
Hoc%20Tap -> ĐẢng cộng sản việt nam đẢng ủy phưỜng 04
Hoc%20Tap -> CiR = Bc / Tc
Hoc%20Tap -> Mean command : ip ospf mtu-ignore Diagram : Problems
Hoc%20Tap -> R1# ip route 0 0 0 0 FastEthernet0/0 R2# show run

tải về 15.92 Kb.

Chia sẻ với bạn bè của bạn:




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương