Tag: STP

 

Spanning-Tree,spt process explained, LAN switching

Spanning-Tree,spt process explained, LAN switching

[wpanchor id=”stpup”]

  1.  Election of a root bridge
  2. Election of a root port for each non-root switch
  3. Election of designated port for each segment
  4. Port transition to forwarding or blocking state.
Spanning-Tree,spt process explained, LAN switching

In a layer 2 switched LAN, all links are running at 100 Mbps. STP uses all default port cost configuration.

1- Election of a root bridge. [wpanchor id=”rootbridge”]
1.1 The switch with the lowest bridge ID. You can have ONLY one root bridge by broadcast domain.
This example

 Switch  SW1  SW2  SW3 SW4 VLAN
 Priority 32769 32769 32769 32769 1
 MAC address 00D0.D37C.B651 0050.0FC8.74DB 0090.2B8C.C439 0007.EC41.0465 1

From the table above you can noticed that  all the switches have the same bridge priority(the default value:32769), so the priority is tied, so check the next condition

“Lowest MAC address will be the root bridge”

1.2 The switch with lowest MAC address will be the Root Bridge. Again from the table above, the lowest MAC address of the 4 switches is switch SW4 with MAC address of 0007.EC41.0465,

The switch SW4 is the root bridge for the VLAN 1, because it has the lowest MAC address(0007.EC41.0465)

 

Go up

2- Election of root port. [wpanchor id=”electionrooport”]The root port is that used by the rest of switches in the STP to reach the switch that is elected as root bridge.

Every non-root switch(SW1,SW2,and SW3) will have a root.

SW2’s Fa04 and SW1’s Fa0/4 all receive a zero-cost BPDU from the root switch SW4, making them a root port each switch.

The determine to root port with lowest cost back to the root bridge. For example here is the process to election the root port on switch 1, from the image of network diagram the switch SW1 has connected to LAN

All links are FastEthernet running at 100 Mbps, with default port cost of 19

 Port Cost to reach root bridge(SW4)
 FastEthernet0/2  38
 FastEthernet0/3 38
 FastEthernet0/4 19
 FastEthernet0/11  No participated in STP is acces port

The port FastEthernet 0/4 will be the root port, because it has the lowest root cost

SW1#show spanning-tree interface FastEthernet 0/4
Vlan Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
VLAN0001 Root FWD 19 128.4 P2p

Finally, the show spanning-tree vlan 1
SW1#show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0007.EC41.0465
Cost 19
Port 4(FastEthernet0/4)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.D37C.B651
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20

Interface Role Sts Cost Prio.Nbr Type
—————- —- — ——— ——– ——————————–
Fa0/11 Desg FWD 19 128.11 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/4 Root FWD 19 128.4 P2p
Fa0/2 Altn BLK 19 128.2 P2p

Go up
3-Election of Designated port by segment.[wpanchor id=”electiondesignatedport”] Is the port with lowest cost to reach the root bridge.

The ports of the switch elected as root bridge are automatically elected as Designated for their segment.

4- Port transition to forwarding or blocking. [wpanchor id=”porttransition”]The designated and root ports will pass to forwarding state and the rest of the ports will be blocked for sending and receiving frames.

Spanning-Tree,spt process explained, LAN switching
Interface Role Sts Cost Prio.Nbr Type
SW3
Fa0/1 Altn BLK 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 P2p
Fa0/13 Desg FWD 19 128.13 P2p

SW1
Fa0/2 Altn BLK 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/4 Root FWD 19 128.4 P2p
Fa0/11 Desg FWD 19 128.11 P2p

SW2
Fa0/4 Root FWD 19 128.4 P2p
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/12 Desg FWD 19 128.12 P2p
Fa0/24 Desg FWD 19 128.24 P2p

SW4
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/14 Desg FWD 19 128.14 P2p
Go up

Download a lab used to explain the spanning-tree process or practice the CCNA exam online
[download id=”4462″]

 

Complete simulate lab CCNA, ICNDv2,done Cisco Packet Tracer

Complete simulate lab CCNA, ICNDv2,done Cisco Packet Tracer

This lab simulate the LAN switching technologies, IPv4 and IPv6 routing technologies, WAN technologies.

LAN switching technologies.
1.2 VTP, the switch SW1 is configured as VTP server and the rest of switches(SWD1, SWD2,SCORE1, SCORE2,SCORE3) are configured as client
SW1#show vtp status
VTP Version : 2
Configuration Revision : 6
Maximum VLANs supported locally : 255
Number of existing VLANs : 8
VTP Operating Mode : Server
VTP Domain Name : CompleteCCNA
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled

1.3 DTP
The switch SW1, as the port from FastEthernet0/0 to 0/7 are configured as “Access port” links between SW1 and SWD1 and SWD1 are configured as “Trunk port”.
SW1(config)#interface FastEthernet0/2
SW1(config-if)#switchport access vlan 10
SW1(config-if)# switchport mode access

SWD1(config)#interface GigabitEthernet0/1
SWD1(config-if)# switchport mode dynamic desirable

SWD2(config)#interface GigabitEthernet0/2
SWD2(config-if)#switchport mode dynamic desirable

Note: Configuring one side as dynamic desirable, the other end must be configured as “Trunk” or “Dynamic auto”(Review the DTP)
1.3 Spanning-tree protocols
The spanning-tree protocols is configured to use Cisco RPVST+) on the switches. (SWD1, SWD2,SCORE1, SCORE2,SCORE3). The PVST+ is default spanning-tree protocols that is compatible with RPVST+.
SW1(config)#spanning-tree mode rapid-pvst
1.4 PostFast and BPDU guard
The interfaces from FastEthernet0/0 to FastEthernet0/0 of the switch SW1, because they are access port, are configured with PortFast feature and BPDU guard.
SW1(config-if-range)#spanning-tree ?
bpduguard Don’t accept BPDUs on this interface
guard Change an interface’s spanning tree guard mode
link-type Specify a link type for spanning tree protocol use
portfast Enable an interface to move directly to forwarding on link up
vlan VLAN Switch Spanning Tree

1.4a Configuring PortFast
SW1(config-if-range)#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 will be configured in 6 interfaces due to the range command
but will only have effect when the interfaces are in a non-trunking mode.
1.4b Configuring bpduguard
SW1(config-if-range)#spanning-tree bpduguard enable

1.5 Etherchannel
1.5a Etherchannel static
The interfaces FastEthernet0/23 and FastEthernet0/24 are bundle together as etherchannel
SWD1>enable
SWD1# configure terminal
SWD1(config)#interface range fa0/23-24
SWD1(config-if-range)#channel-group 3 mode ?
active Enable LACP unconditionally
auto Enable PAgP only if a PAgP device is detected
desirable Enable PAgP unconditionally
on Enable Etherchannel only
passive Enable LACP only if a LACP device is detected

SW1(config-if-range)channel-group 3 mode on
1.5b PAgP – The Port Agregation Protocol by Cisco
SWD1(config-if-range)#channel-group 2 mode auto

If one side is configured as “auto” the other must be “desirable”, in that case on SCORE2.

SCORE2>enable
SCORE2# configure terminal
SCORE2(config)#interface range fa0/1-5
SCORE2(config-if-range)#channel-group 2 mode desirable

1.5c LACP
The LACP is configured between the switch SWD2 and SCORE1

SWD2>enable
SWD2# configure terminal
SWD2(config)#interface range fa0/1-5
SWD2(config-if-range)#interface Port-channel 1 mode active

If one side is configured as “active” the other must be “active” or “passive”, in that case on SCORE1.

2 Routing technologies
2.1a Router on a stick
The subinterface Gi0/1.10,Gi0/1.20 and Gi0/1.30, is configured to allow the VLAN 10, VLAN 20 and VLAN 30 respectively on the router R2
R2#enable
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface fa0/1.10
R2(config)#interface GigabitEthernet0/1.10
R2(config-subif)#encapsulation dot1Q 10
R2(config-subif)#ip address 192.168.10.1 255.255.255.0

2.1b SVI – Switched Virtual Interface
The list of SVI by switches are
SCORE1
SVI 33 192.168.33.1/28
SVI 27 192.168.27.1/24
SCORE2
SVI 41 192.168.41.1/24
SVI 44 192.168.44.1/24
SCORE3 40 192.168.40.1/24

SCORE3(config)#interface vlan 40
SCORE3(config-if)#ip address 192.168.40.1 255.255.255.0
SCORE3(config-if)#no shut
SCORE3(config-if)#

2.2 Routing protocols
2.2.1 Configure OSPFV2 for IPV4

An example of configure OSPFv2
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 172.16.2.0 0.0.0.3 area 0
R1(config-router)#network 192.168.10.0 0.0.0.255 area 0
R1(config-router)#network 192.168.20.0 0.0.0.255 area 0
R1(config-router)#network 192.168.30.0 0.0.0.255 area 0
R1(config-router)#network 172.16.4.0 0.0.0.3 area 1
R1(config-router)#network 172.16.3.0 0.0.0.3 area 1
R1(config-router)#network 172.16.2.4 0.0.0.3 area 2

2.2.2 Configure EIGRP
An example of configure EIGRP
R3(config)#router eigrp 13
R3(config-router)#eigrp router-id 3.3.3.3
R3(config-router)#network 172.16.5.0 0.0.0.255
R3(config-router)#network 172.16.2.4 0.0.0.3

 

3.0 WAN Technologies
3.1 Configure and very eBGP
An example of configuring the BGP as eBGP between the router R7(AS 65535) and the router ISP3(64000)
3.1.1 BGP on router R7
R7(config)#router bgp 65535
R7(config-router)#neighbor 198.198.8.1 remote-as 64000
R7(config-router)#network 198.198.8.0 mask 255.255.255.0

3.1.2 BGP on router ISP3
router bgp 64000
ISP3(config-router)#neighbor 198.198.8.2 remote-as 65535
ISP3(config-router)#network 6.6.3.0 mask 255.255.255.0
ISP3(config-router)#network 198.198.8.0 mask 255.255.255.0

4.0 Infrastructure services

[download id=”4292″]

Port States for RSTP, 802.1w

Port States for RSTP, 802.1w

802.1wportstatesRSTP

Read more

The list of STP Standards

The list of STP Standards

802.1D-1998: The legacy standard for bridging and STP.
CST: Assumes one spanning-tree instance for the entire bridged network, regardless of the number of VLANs.
PVST+: A Cisco enhancement of STP that provides a separate 802.1D spanning-tree instance for each VLAN configured in the network.
802.1D-2004: An updated bridging and STP standard.
802.1s (MST): Maps multiple VLANs into the same spanning-tree instance.
802.1w (RSTP): Improves convergence over 1998 STP by adding roles to ports and enhancing BPDU exchanges.
PVRST+: A Cisco enhancement of RSTP using PVST+ or Rapid PVST+