2019/04/09

Building Redundant Switched Topologies

2Step 1 Ensure that all VLANs exist on the switches.Also,make sure that the ports have been configured in correct VLANs based on the topology diagram.

Step2 將 SW2 調整成為 vlan 10,11,20,22 的 Route Bridge,SW2 若掛掉由 SW1 取代,SW3 為 vlan 30 的 Route Bridge。

Step3 Enable PortFast and BPDU guard on the access ports on the three switches.

SW1#sh vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- --------------------
1    default                                  active    Et0/1, Et0/2, Et0/3, Et1/3
10   VLAN0010                         active    Et0/0
11   VLAN0011                         active    Et0/0
20   VLAN0020                         active
33   VLAN0033                         active   .....>設錯,少了22、30,多33
...


SW2#sh vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                                  active    Et0/0, Et0/1, Et0/2, Et0/3, Et1/1, Et1/3
10   VLAN0010                         active
11   VLAN0011                         active
20   VLAN0020                         active
22   VLAN0022                         active
30   VLAN0030                         active
...

SW3#sh vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Et0/1, Et0/2, Et0/3, Et1/0, Et1/3
10   VLAN0010                         active
11   VLAN0011                         active
20   VLAN0020                         active
22   VLAN0022                         active
30   VLAN0030                         active    Et0/0
...

SW1(config)#vlan 22
SW1(config-vlan)#vlan 30
SW1(config-vlan)#no vlan 33
SW1(config)#do sh vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- --------------------                                      -----------
1    default                                 active    Et0/1, Et0/2, Et0/3,                                       Et1/2
                                                                Et1/3
10   VLAN0010                         active    Et0/0
11   VLAN0011                         active    Et0/0
20   VLAN0020                         active
22   VLAN0022                         active
30   VLAN0030                         active
...

SW2(config)#int e0/0
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 20
SW2(config-if)#switchport voice vlan 22
SW2(config-if)#do sh int e0/0 switchport
Name: Et0/0
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: Off
Access Mode VLAN: 20 (VLAN0020)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: 22 (VLAN0022)

SW2(config)#spanning-tree vlan 10,11,20,22 root primary

SW2#sh spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    32769
             Address     aabb.cc00.0100
             Cost        100
             Port        33 (Ethernet1/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec
...

VLAN0010
  Spanning tree enabled protocol ieee
  Root ID    Priority    24586
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24586  (priority 24576 sys-id-ext 10)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et1/0               Desg FWD 100       128.33   Shr
Et1/2               Desg FWD 100       128.35   Shr

VLAN0011
  Spanning tree enabled protocol ieee
  Root ID    Priority    24587
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24587  (priority 24576 sys-id-ext 11)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et1/0               Desg FWD 100       128.33   Shr
Et1/2               Desg FWD 100       128.35   Shr

VLAN0020
  Spanning tree enabled protocol ieee
  Root ID    Priority    24596
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24596  (priority 24576 sys-id-ext 20)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 100       128.1    Shr
Et1/0               Desg FWD 100       128.33   Shr
Et1/2               Desg FWD 100       128.35   Shr

VLAN0022
  Spanning tree enabled protocol ieee
  Root ID    Priority    24598
             Address     aabb.cc00.0200
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24598  (priority 24576 sys-id-ext 22)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 100       128.1    Shr
Et1/0               Desg FWD 100       128.33   Shr
Et1/2               Desg FWD 100       128.35   Shr

VLAN0030
  Spanning tree enabled protocol ieee
  Root ID    Priority    32798
             Address     aabb.cc00.0100
             Cost        100
             Port        33 (Ethernet1/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32798  (priority 32768 sys-id-ext 30)
             Address     aabb.cc00.0200
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et1/0               Root FWD 100       128.33   Shr
Et1/2               Desg FWD 100       128.35   Shr

SW1(config)#spanning-tree vlan 10,11,20,22 root secondary

SW3(config)#spanning-tree vlan 30 root primary

SW3#sh spanning-tree vlan 30
VLAN0030
  Spanning tree enabled protocol ieee
  Root ID    Priority    24606
             Address     aabb.cc00.0300
             This bridge is the root
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24606  (priority 24576 sys-id-ext 30)
             Address     aabb.cc00.0300
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  15  sec

Interface           Role Sts Cost      Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Et0/0               Desg FWD 100       128.1    Shr
Et1/1               Desg FWD 100       128.34   Shr
Et1/2               Desg FWD 100       128.35   Shr

SW1(config)#int e0/0
SW1(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION
%Portfast has been configured on Ethernet0/0 but will only
 have effect when the interface is in a non-trunking mode.

SW1(config-if)#spanning-tree bpduguard enable
SW1#sh spanning-tree int e0/0 detail
 Port 1 (Ethernet0/0) of VLAN0010 is designated forwarding
   Port path cost 100, Port priority 128, Port Identifier 128.1.
   Designated root has priority 24586, address aabb.cc00.0200
   Designated bridge has priority 28682, address aabb.cc00.0100
   Designated port id is 128.1, designated path cost 100
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is shared by default
   Bpdu guard is enabled
   BPDU: sent 1869, received 0

 Port 1 (Ethernet0/0) of VLAN0011 is designated forwarding
   Port path cost 100, Port priority 128, Port Identifier 128.1.
   Designated root has priority 24587, address aabb.cc00.0200
   Designated bridge has priority 28683, address aabb.cc00.0100
   Designated port id is 128.1, designated path cost 100
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is shared by default
   Bpdu guard is enabled
   BPDU: sent 1869, received 0


SW2(config)#int e0/0
SW2(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION
%Portfast has been configured on Ethernet0/0 but will only
 have effect when the interface is in a non-trunking mode.

SW2(config-if)#spanning-tree bpduguard enable
SW2(config-if)#do sh spanning-tree int e0/0 detail
 Port 1 (Ethernet0/0) of VLAN0020 is designated forwarding
   Port path cost 100, Port priority 128, Port Identifier 128.1.
   Designated root has priority 24596, address aabb.cc00.0200
   Designated bridge has priority 24596, address aabb.cc00.0200
   Designated port id is 128.1, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is shared by default
   Bpdu guard is enabled
   BPDU: sent 983, received 0

 Port 1 (Ethernet0/0) of VLAN0022 is designated forwarding
   Port path cost 100, Port priority 128, Port Identifier 128.1.
   Designated root has priority 24598, address aabb.cc00.0200
   Designated bridge has priority 24598, address aabb.cc00.0200
   Designated port id is 128.1, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is shared by default
   Bpdu guard is enabled
   BPDU: sent 984, received 0

SW3(config)#int e0/0
SW3(config-if)#spanning-tree portfast
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

%Portfast has been configured on Ethernet0/0 but will only
 have effect when the interface is in a non-trunking mode.

SW3(config-if)#spanning-tree bpduguard enable
SW3(config-if)#do sh spann int e0/0 detail
 Port 1 (Ethernet0/0) of VLAN0030 is designated forwarding
   Port path cost 100, Port priority 128, Port Identifier 128.1.
   Designated root has priority 24606, address aabb.cc00.0300
   Designated bridge has priority 24606, address aabb.cc00.0300
   Designated port id is 128.1, designated path cost 0
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is shared by default
   Bpdu guard is enabled
   BPDU: sent 2149, received 0

沒有留言: