Академический Документы
Профессиональный Документы
Культура Документы
Version 2.0
CONTENTS:
1. Networking Components
1.1 Hub
1.2 Switch
1.3 Router
2. Hierarchical Model
3. Switched Network Model
3.1
3.2
3.3
3.4
Version 2.0
8. Basic Exercises
8.1 Lab exercises using Cisco switches
8.1.1
8.1.2
8.1.3
8.1.4
Version 2.0
Version 2.0
Lab Exercise 1 : Configuring guard-band and maximum power on PoE enabled interface.
Lab Exercise 2 : Configuring power management on PoE enabled interface
Lab Exercise 3: Disabling a PoE interface
Lab Exercise 4 : Setting power priority on all PoE enabled interfaces
Version 2.0
1. NETWORKING COMPONENTS
Hubs, switches and routers are the most frequently used network devices which lets you connect computers,
printers, and other devices to communicate.
1.1 Hub
A hub is typically the simplest device to use. Its job is very simple: anything that comes in one
port is sent out to all other ports on the hub. Every computer connected to the hub "sees" the
same information on the network that every other computer on the hub sees.
All devices connected to a hub will be in the same collision domain as well as broadcast domain.
VLANs may be used to divide the switch in to two or more broadcast domains. VLANS do not
allow broadcasts to propagate to other VLANs on the switch network. For example, traffic
generated in VLAN1 can only be forwarded into devices connected to VLAN1.
1.2 Switch
A switch learns the physical addresses of sending devices by reading the MAC address and
mapping it to the port number through which the frame had arrived. This way, it will quickly
learn which MAC address belongs to which switch port, and stores the information in a table
(called MAC table). Then onwards, it will send a frame only to the port that connects to the
destination device (as specified in the frame). A hub or a switch is used to connect two or more
network segments.
1.3 Router
A router is used to route packets, and most complicated among the three. They work at layer-3 of
the OSI model. They route packets based on the IP addresses where as a switch forwards packets
based on the MAC addresses. A router needs to disseminate an incoming packet down to its IP
address and route it to destination based on information available in its routing table.
A router reads the destination IP address of the incoming packet, finds out which interface it
needs to go to reach desired destination (which may be several hops away) and routes the packet
appropriately.
2. Hierarchical Model
The hierarchical model simplifies the task of building a reliable and scalable hierarchical inter network. The
model defines the following three layers that has specific functions and responsibilities associated with it:
i. Access Layer : controls user access to network resources. Layer 3 devices such as routers ensure that
local server traffic does not move to the wider network and this layer is responsible for Layer 2 services,
such as VLAN membership, traffic filtering based on broadcast or MAC addresses.
ii. Distribution Layer : is the communication mechanism between access layer and core layer of the
hierarchical model. The Distribution Layer determines how packets access the core layer, provides
filtering and routing, and determine access over the campus backbone by filtering out resource updates
which are not needed. This layer is responsible for routing traffic between VLANs, Broadcast domain
Version 2.0
5000/5500; supports 100/1000Mbps Ethernet switching, and provides access for over
250 users.
EX2200 switches are available in models with either 24 or 48 built-in network ports and four up link
ports, with Power over Ethernet (PoE) either available in all built-in network ports or not available in
any built-in network port. All models provide network ports that have 10/100/1000Base-T Gigabit
Ethernet connectors and four uplink ports. These switches run under JUNOS OS for EX Series
switches. Each EX2200 switch has four uplink ports that support 1-gigabit small form-factor
pluggable (SFP) transceivers for use with fiber connections and copper connections. PoE ports
provide electrical current to devices through the network cables so that separate power cords for
devices such as IP phones, wireless access points, and security cameras are unnecessary.
Model Number
Access Ports
EX2200-24T-4G
24 Gigabit Ethernet
EX2200-24P-4G
24 Gigabit Ethernet
All 24 ports
EX2200-48T-4G
48 Gigabit Ethernet
EX2200-48P-4G
48 Gigabit Ethernet
All 48 ports
2. EX2500: The EX2500 line of Ethernet switches delivers a compact, energy efficient Ethernet solution
for 10 gigabit Ethernet GbE top-of-rack data center access deployments where high performance, low
latency and high availability are key requirements.
The EX2500 switch has 24 SFP+ ports, 2 management ports, and 1 console port. (The EX2500
switch contains 24 10-gigabit Small Form-Factor Pluggable Plus (SFP+) ports and 2 1-gigabit
management ports. The 10-gigabit SFP+ ports can accept 10-gigabit optical transceivers or Direct
Attach Cables (DACs). This 1U switch is rack mountable in either the horizontal or vertical direction,
depending on your application.)
Model Number
Description
EX2500-24F-FB
EX2500-24F-BF
Note: SFP+ Ports: 24 Small Form-Factor Pluggable (SFP+) ports are located on the front panel.
These ports accept approved optical SFP+ transceivers or direct access cables (DACs).
support.
The following Cisco catalyst switches come under the distribution layer
5000/5500; supports a considerable number of connections and the Route Switch Module
(RSM) processor module.
6000; provides 384 10/100 Ethernet connections, and 192 100FX FastEthernet connections and
130 Gigabit Ethernet ports.
2926G Switch
Version 2.0
Model
Access Ports
EX3200-24T
24 Gigabit Ethernet
First 8 ports
EX3200-48T
48 Gigabit Ethernet
First 8 ports
EX3200-24P
24 Gigabit Ethernet
All 24 ports
EX3200-48P
48 Gigabit Ethernet
All 48 ports
EX3200-24T-DC
24 Gigabit Ethernet
EX3200-48T-DC
48 Gigabit Ethernet
2. EX4200: Juniper Networks EX4200 Ethernet Switches provide connectivity for medium- and highdensity environments and scalability for growing networks.
EX4200 switches are available in models with 24 or 48 ports and with either all ports equipped for
Power over Ethernet (PoE) or only 8 ports equipped for PoE. All models provide ports that have
10/100/1000Base-T Gigabit Ethernet connectors and optional 1-gigabit small form-factor pluggable
(SFP) transceivers, 10-gigabit small form-factor pluggable (SFP+) transceivers, or 10-gigabit small
form-factor pluggable (XFP) transceivers for use with fiber connections.
Additionally, a 24-port model provides 100Base-FX/1000Base-X SFP ports. This model is typically
used as a small distribution switch.
Model
Ports
EX4200-24T
24 Gigabit Ethernet
First 8 ports
EX4200-48T
48 Gigabit Ethernet
First 8 ports
EX4200-24P
24 Gigabit Ethernet
All 24 ports
EX4200-48P
48 Gigabit Ethernet
All 48 ports
EX4200-24F
24 Gigabit Ethernet
EX4200-24T-DC
24 Gigabit Ethernet
EX4200-48T-DC
48 Gigabit Ethernet
EX4200-24F-DC
24 Gigabit Ethernet
Version 2.0
8540 Switch
8500; provides high performance switching for the Core layer. Application-Specific Integrated Circuits
(ASICs) is used to provide multiple-layer protocol support. This includes bridging, Asynchronous
Transfer Mode (ATM) switching,
Internet Protocol (IP), IP multicast, and Quality of Service (QoS).
EX4500-40F-FB
EX4500-40F-BF
EX4500-40F-FB-C
EX4500-40F-BF-C
EX4500-40F-DC-C
EX4500-40F-VC1-FB
EX4500-40F-VC1-BF
EX4500-40F-VC1-DC
Note:
1. The FB and BF in the model number indicate the direction of airflow of the chassis:
FBFront-to-back airflow
Version 2.0
10
BFBack-to-front airflow
2. The C in the model number indicates the Converged Enhanced Ethernet (CEE) status of
switch:
CCEE capable
NoneNot CEE capable
3. The DC in the model number indicates that the switch model supports DC power supply.
4. The VC in the model number indicates that the switch model can be used in a Virtual Chassis
configuration.
2. EX8200: The EX8200 line of modular Ethernet switches is a family of high-performance, highly
available platforms for use in high-density 10GbE data centers, campus aggregations and core
networks.
Juniper Networks EX8200 Ethernet line cards offer a variety of interfaces for supporting highdensity 100 Mbps, Gigabit and 10 Gigabit Ethernet (GbE) deployments. Four versions of the
EX8200 Ethernet line cards are available, each of which supports a consistent set of features and
capabilities: the EX8200-48T, the EX8200-48F, the EX8200-8XS and the EX8200-40XS.
Three of these cards are available in Extra Scale (ES) configurationsthe EX8200-48T-ES, the
EX8200-48F-ES and the EX8200-8XS-ESwhich are optimized for large-scale deployments such
as large campuses, global data centers, or cloud-based applications.
Ethernet Line Card Specifications
EX8 EX8200-48F
/
EX8200-8XS
/EX8200-48FES
/EX8200-8XSES
EX8200-40XS
EX8200-48PL
EX8200-2XS-4OP
/EX8200-48TL
/EX8200-2XS-4OT
40 RJ-45 / 4 SFP /2
SFP+
Port
quantity
and type
48
RJ45
48 SFP
8 SFP+
40 SFP/SFP+
48 RJ-45
PoE/PoE+
ports
Port speed
10 Gbps
1 Gbps/10
Gbps
10/100/1000
Mbps
10/100/1000 Mbps;
100/1000
Mbps; 10
Gbps
3. QFX3500: The Juniper Networks QFX3500 Switch is a high-speed, multipurpose switch especially
designed for next-generation data centers that provides a total switching capacity and throughput of
640 Gbps.
Version 2.0
11
48 10-Gbps access ports in the switch use small form-factor pluggable plus transceivers (SFP+) and
operate by default as 10-Gigabit Ethernet interfaces. Optionally, you can choose to configure up to
12 of the ports as 2-Gbps, 4-Gbps, or 8-Gbps Fibre Channel (FC) interfaces, and up to 36 of the ports
as 1-Gigabit Ethernet interfaces. 4 40-Gbps uplink ports in the switch use quad, small form-factor
pluggable plus (QSFP+) transceivers.
SFP+ Access Ports
The QFX3500 switch has 48 access ports (0-47) that support small form-factor pluggable plus (SFP+)
and small form-factor pluggable (SFP) transceivers, as well as SFP+ direct attach copper cables, also
known as Twinax cables.
Up to 48 of the access ports can be used for SFP+ transceivers or SFP+ direct attach copper
cables. 10-Gigabit Ethernet SFP+ transceivers and SFP+ direct attach copper cables can be used
in any access port. 2-Gbps, 4-Gbps, or 8-Gbps Fibre Channel SFP+ transceivers can be used in
ports 0 through 5 and ports 42 through 47.
Up to 36 of the access ports can be used for SFP transceivers. Gigabit Ethernet SFP transceivers
can be used in ports 6 41.
Version 2.0
12
3.4 Summary
1. Cisco Access Layer Switches
1. Cisco Catalyst 4500 E Series Switches
2. Cisco Catalyst 3750 Series Switches
3. Cisco Catalyst 3750-E Series Switches
4. Cisco Catalyst 3750-X Series Switches
5. Cisco Catalyst 3560 Series Switches
6. Cisco Catalyst 3560-E Series Switches
7. Cisco Catalyst 3560-X Series Switches
8. Cisco Catalyst 3550 Series Switches
9. Cisco Catalyst 2975 Series Switches
10. Cisco Catalyst 2960-S Series Switches
11. Cisco Catalyst 2960 Series Switches
12. Cisco Catalyst 2955 Series Switches
13. Cisco Catalyst 2950 Series Switches
14. Cisco Catalyst 2940 Series Switches
15. Cisco Catalyst 2350 Series Switches
2. Cisco Core/Distribution Layer Switches
1. Cisco Catalyst 6500 Series Switches
2. Cisco Nexus 7000 Series Switches
3. Cisco Catalyst 4500E Series Switches
4. Cisco Catalyst 3560-E Series Switch
3. Juniper Access Layer Switches
1. EX2200
2. EX2500
4. Juniper Distribution Layer Switches
1.EX3200
2.EX4200
5. Juniper Core Layer Switches
1.EX4500
2.EX8200
3.QFX3500
Note: Access, Distribution and Core layers are defined for convenience in design and implementation of
computer networks. However the devices in core, distribution and access layer may be used inter
changeably as per requirement. For example: A distribution layer switch can be used in core layer and viceverse if it meets the customers networking requirement
Version 2.0
13
Fig 2
Version 2.0
14
Fig 3
Explanation:
The switch front panel contains Ports, LEDs and the Mode button.
PORTS:
1. 10/100 Ports
These use RJ-45 Connectors and twisted-pair cabling and they can be connected to 10BASE-Tcompatible devices, such as workstations and hubs, or 100BASE-TX-compatible devices, such as
high-speed workstations, servers, hubs, routers, and other switches. The 10/100 ports can be
explicitly set to operate in any combination of half duplex, full duplex, 10 Mbps, or 100 Mbps.
2. 100BASE-FX Ports
The 100BASE-FX Ports use 50/125- or 62.5/125-micron multimode fiber-optic cabling. These ports
only operate at 100 Mbps in full-duplex mode.
You can connect a 100BASE-FX port to an SC or ST port on a target device by using one of the
MT-RJ fiber-optic patch cables
3. 10/100/1000 Ports
The 10/100/1000 ports on Catalyst 2950T-24 switches use RJ-45 connectors and twisted-pair
cabling. The ports can connect to10BASE-T-compatible devices, such as workstations and hubs or
100BASE-TX-compatible devices, such as high-speed workstations, servers, hubs, routers, and
other switches or 1000BASE-T-compatible devices, such as high-speed workstations, servers, hubs,
routers, and other switches.
LED INDICATORS:
LEDs (Light Emitting Diodes) can be used to monitor switch activity and performance. Changing
the port mode changes the information provided by each port status LED.
Refer Fig 2 above for reference
Version 2.0
15
1. System LED : Specifies whether the system is receiving power and is functioning correctly.
Color
Status
Off
Green
Amber
2. RPS (Remote Power Supply) LED: Specifies whether or not the remote power supply is in use.
Color
Status
Off
Solid green
Flashing green
Solid amber
Flashing amber
The internal power supply in a switch has failed, and the RPS is
providing power to the switch
3. Port mode LED: Indicates the current state of the mode button.
LED Mode
Port Mode
STAT
Port status
UTIL
Switch utilization
DUPLX
SPEED
Port speed
Version 2.0
Description
16
4. Port status LED: Indicates different meanings depending on the current value of the Mode LED.
* For LRE Switches
Port mode
Color
Meaning
STAT
Off
No link
Solid Green
Link Present
Flashing Green
Alternating Green-Amber
Link fault
Solid Amber
Off
Green
DUPLX
SPEED
Green
Flashing Green
2. Management Options
Catalyst 2950 switches offer these management options:
Cluster Management Suite (CMS)
CMS is made up of three web-based applications that you use to manage switches. You can use Cluster
Builder, which includes Cluster View, and Cluster Manager to create, configure, and monitor switch
clusters. You can also use Device Manager to manage individual and standalone switches.
IOS command-line interface (CLI)
You can manage switches by using command-line entries. To access the CLI, connect a PC or terminal
directly to the console port on the switch rear panel. If the switch is attached to your network, you can
use a Telnet connection to manage the switch from a remote location.
CiscoView application
You can use the CiscoView device-management application to set configuration parameters and to
view switch status and performance information. This application, which you purchase separately, can
be a standalone application or part of an Simple Network Management Protocol (SNMP) networkmanagement platform.
Version 2.0
17
You can manage switches by using an SNMP-compatible management station running platforms such
as HP OpenView and SunNet Manager. The switch supports a comprehensive set of MIB extensions
and MIB II, the IEEE 802.1D bridge MIB, and four RMON groups. For more information, refer to
the documentation that came with your SNMP application.
The figure above shows a 24-port 1900 switch with 2 Fast Ethernet ports.
10BaseT ports
The 10BaseT network ports use standard RJ-45 connectors. These ports can connect to 10BaseTcompatible devices, such as individual workstations and hubs, with Category 3, 4, or 5 cabling.
Using this type of cabling, the distance between the switch and the attached device can be up to 100
meters.
Switched 100-Mbps Ports
The switches can have any of the following high-speed ports (depends on model):
Version 2.0
18
3. Rear-Panel Description
The rear panel of a Catalyst 1900 switch consists of the following:
1. AC power connector
2. Console port
3. Redundant power system (RPS) connector and
4. A switched AUI port
4. Switching methods
1. Store-and-Forward switching: Here the LAN switch copies the entire frame into its buffers and
computes the CRC. The frame is discarded if there are any CRC errors. Giant (more than 1518 bytes0
and Runt (less than 64 bytes) frames are also dropped, if found.
2. Cut-Through (Real-Time) switching: Here, the LAN switch copies only the destination address
into its buffers. It immediately looks up the switching table and starts forwarding the frame. The
latency is very less because, the frame is forwarded as soon as the destination address is resolved.
3. Fragment-Free switching: Here, the switch waits for the collision window before forwarding the
entire frame. The collision window is 64 bytes long.
24 or 48 10/100/1000Base-T Gigabit Ethernet ports, with Power over Ethernet (PoE) not
available in EX2200-24T and EX2200-48T
24 or 48 10/100/1000Base-T Gigabit Ethernet ports, with Power over Ethernet (PoE)
available in EX2200-24P and EX2200-48P
Version 2.0
19
2. Chassis LEDs
The front panel of an EX2200 switch has two chassis status LEDs labeled SYS and ALM on the far
right side of the panel, above the uplink ports.
LED Label
Color
ALM
Unlit
There is no alarm
Amber
Red
Green
SYS
Version 2.0
20
USB port
Console port
ESD point
Air exhaust
Version 2.0
21
Version 2.0
22
23
2. Configuration Mode:
We use the Configuration mode for configuring the JUNOS software by creating a hierarchy of
configuration statements. We enter the configuration mo9+de by using the command "configure" as
shown below:
user@host>configure
Entering configuration mode
[edit]
user@host#
Issuing the commands one at a time using CLI can configure a JUNOS router or alternately, we
can configure by creating a text (ASCII) file that contains the statement hierarchy. Remember to
activate the configuration by using the command "commit" on the router.
As shown in the above example, the generic configuration prompt is user@host#. Ofcourse, we can
change the prompt by using appropriate command.
Statement Hierarchy:
We use the above configuration mode commands to create a statement hierarchy, and then configure the
JUNOS software. The term "statement hierarchy" is used to define the sequence of commands used for
configuring a particular feature (or features) of the router. An example statement hierarchy is given below:
user@host>configure
Entering configuration mode
[edit] ----Top level
user@host#edit protocols ospf
[edit protocols ospf] ----protocols ospf hierarchy level
user@host#
"set" commands are used to configure specific leaf statements.
Version 2.0
24
Version 2.0
25
Instructions:
1. Connect to switch and you should see the user mode prompt
2. Show version command displays the IOS version of the switch
3. Show interfaces command displays the interfaces of the switch
4. Show running-config displays the running configuration
SW1>enable
SW1#show version
SW1#show interfaces
SW1#show running-config
Back
26
SW1(config)#hostname cisco
Cisco(config)#
Back
Version 2.0
27
8. Basic Exercises
8.1 Lab exercises using Cisco Switches
8.1.1 : Lab Exercise 1 : Entering User EXEC prompt on a Switch, and exit
Description: A basic exercise, that shows how to enter into privileged EXEC prompt from user
mode prompt, and exit from the same.
Instructions:
1. Enter into privileged mode
2. Get back to the user mode
SW1>
SW1>enable
SW1#disable
SW1>
Back
28
4. In the privileged mode, type the command ? to view all the commands in privileged mode
5. The command show ? displays all the show commands like show banner, interfaces, ip, macaddress-table, vlan, vtp etc
6.The command show running-config displays the running configuration
7. Press space bar to view more information
8. The command exit or disable logs out the switch
SW1>
SW1>?
SW1>enable
SW1#
SW1#?
SW1#show ?
SW1#show running-config
SW1#exit
Or
SW1#disable
Back
SW1>
SW1>enable
SW1#show banner
SW1#show flash
SW1#show history
SW1#show ip interface brief
SW1#show mac-address-table
SW1#show running-config
SW1#show vlan
SW1#show vtp status
Version 2.0
Back
29
30
the same. Choose SW1 from the network diagram and exit.
Instructions
1. Enter into configuration mode
2. Get back to the operational mode
user@SW1>configure
[edit]
user@SW1#exit
user@SW1>
Back
31
Back
8.2.7 : Lab Exercise 7 : Configuring ether-options on the gigabit ethernet switch interface
Not Available in Demo Version.
Version 2.0
32
2. Which of the following can be used to view the previous command you entered into a Cisco switch?
[Select 2]
a) CTRL+F1
b) The Down Arrow
c) The Up Arrow
d) CTRL + P
3. You are working in privileged mode (at # prompt). You want to get back to user mode. Which
command would you type at the privileged mode prompt?
a) quit
b) exit
c) disable
d) end
4. What is the command used for copying the configuration from NVRAM to a running RAM?
a) copy startup running
b) copy startup-config running-config
c) copy running-config startup-config
d) write memory
Back
Note: please refer to the Appendix for Objective test Answer key
Version 2.0
33
A single physical port on a router can support one or more VLANs by use of sub-interfaces. There is
no need to have as many physical ports on a router as that of VLANs.
3. Inter-VLAN communication can occur only if the router is configured with appropriate subinterfaces. In this case, there are 4 VLANs (VLANs 100,200,300, and 400), in addition to VLAN 1
(management VLAN). Therefore, 5 sub-interfaces have to be configured on the router interface
connecting the switch.
A roll-over cable is required for connecting a terminal to the Console port of a router/switch.
ii. VTP
1. VLAN Transport Protocol (VTP) information can be distributed throughout the
network to all stations including servers, routers, and switches.
The VLAN transport protocol are:
ISL: ISL (Inter Switch Link) is the VLAN transport protocol used over Fast Ethernet trunked link.
802.1: 802.1 is the VLAN transport protocol used over FDDI trunked link.
LANE: LAN Emulation (LANE) is the VLAN transport protocol used across an ATM trunked link.
The default VTP configuration parameters for the Catalyst switch are as follows:
1. VTP domain name: None
2. VTP mode: Server
3. VTP password: None
4. VTP pruning: Disabled
5. VTP trap: Disabled
2. The VTP domain name can be specified manually or learned across a configured trunk line from a server
with a domain name configured. By default, the domain name is not set.
If you configure a VTP password, VTP does not function properly unless you assign the same password to
Version 2.0
34
From the output of show vtp status, we can observe that the domain name and the VTP version are different
for both the switches. For successfully transferring VLAN information, the version numbers must be same
on both the switches. Similarly, the VTP domain name must also be same on both the switches.
5. A VTP advertisement necessarily consists of "Configuration revision number". Every time a VTP server
updates its VLAN information, it increments the configuration revision number by one count. VTP clients,
use the revision number to enforce the VLAN configuration Update.
6. There are two different VTP versions. VTP version 1 and VTP version 2. These versions are not
interoperable. Version 1 is the default version. All switches in a given management domain should be
configured in either version 1 or version 2. Some of the advantages of VTP version 2 are as below:
1. Token Ring support: Supports Token Ring LAN switching and VLANs. If Token Ring is used, this is
the version required.
2. Version number auto propagation: In case that all switches are capable of running Version 2, only
one switch need to be Version 2 enabled, Version number is automatically propagated to others.
Version 2.0
35
7. By default, there are no passwords in VTP informational updates, and any switch that has no VTP
domain name can join the VTP domain when trunking is enabled. Also any switch that has the same VTP
domain name will join and exchange VTP information. This could enable an unwanted switch in your
network to manage the VLAN database on each of the switches. To prevent this from occurring, set a VTP
password on the switches you want to exchange information.
8. VTP pruning is a technique that enhances the available network bandwidth by reducing the broadcast,
multicast, and flooded unicast messages. These frames are not forwarded to network devices that don't have
ports associated with a given VLAN. When VTP pruning is enabled, a switch forwards the flooded traffic
across a link to another switch, only if that switch has ports associated with that VLAN.
Back
36
configuration.
Instructions:
1. Enter privileged exec mode
2. Enter global configuration mode
3. Assign IP address 172.16.2.3 mask 255.255.255.0 on VLAN1
4. Set the default gateway to 172.16.2.2
5. Save the configuration to NVRAM
SW1>enable
SW1#configure terminal
SW1(config)#interface vlan 1
SW1(config-if)#ip address 172.16.2.3 255.255.255.0
SW1(config-if)#exit
SW1(config)#ip default-gateway 172.16.2.2
SW1(config)#end
SW1#copy running-config startup-config
Back
Version 2.0
37
Version 2.0
38
Version 2.0
Back
39
40
intervals (IP RIP every 30 sec / and IPX RIP every 60 sec). A triggered update is an update sent
immediately in response to some change in the routing table. Triggered updates along with Holddown timers can be used effectively to counter routing loops.
iii. A switch, participating in Spanning-Tree protocol, passes through the following states:
1. Blocked state: This is the initial state. All ports are put in a blocked state to prevent bridging
loops.
2. Listen state: This is the second state of switch ports. Here all the ports are put in listen mode. The
port can listen to frames but can't send. The period of time that a switch takes to listen is set by "fwd
delay".
3. Learn state: Learn state comes after Listen state. The only difference is that the port can add
information that it has learned to its address table. The period of time that a switch takes to learn is
set by "fwd delay".
4. Forward state: A port can send and receive data in this state. Before placing a port in forwarding
state, Spanning-Tree Protocol ensures that there are no redundant paths or loops.
5. Disabled state: This is the state when the switch port is disabled. A switch port may be disabled
due to administrative reasons or due to switch specific problems.
2. How STP works
i. Root Bridge/Root Switch
The Root Bridge (Switch) is a special bridge at the top of the spanning tree. The first step in STP is to
elect the root switch, BPDUs are used for the election process.
(For switches that implement VLANs, the switches will have a different switch ID per VLAN and a
separate instance of STP per VLAN. Each VLAN has its own root switch and within each VLAN, STP
will run and remove loops in that particular VLAN)
Bridge ID
Bridge ID is determined by using switch priority (32768 by default and can have a value between 0
and 65,535) and switch's MAC address and it is 8 bytes long (bridge priority (2 bytes) and switch's
MAC addresses (6 bytes)).
Example:
Bridge Priority: 1000000000000000 (Binary equivalent of 32768)
MAC Address: 0001.002E.0025 H
Bridge ID in the above instance is as given: 32768.0001.002E.0025
Bridge priority is given in decimal and MAC is given in Hex for simplicity. In actual practice, both
figures are converted to binary/hex while determining the Bridge ID. Additionally, the bridge ID also
Version 2.0
41
depends on the STP protocol being used. For PVST, LAN information will also be taken in to
consideration while computing the Bridge ID. However, PVST is beyond the scope of this article.
How Root Switch is selected?
The following criteria is applied while selecting the Root Bridge:
The switch with the lowest Bridge ID is chosen as root.
Note that Bridge ID is a combination switch priority (32768 by default) and switch's MAC address.
While comparing two bridge IDs, the bridge priority is compared first. If two bridges have equal
priority value, then the MAC addresses are compared. The switch with the lowest MAC address will
be chosen as the root Bridge.
Example:
Switch A: Priority value: 32768, MAC address: 0001.002E.0025
Switch B: Priority value: 32768, MAC address: 0001.002E.0026
In the above example, Switch A will be chosen as the Root Bridge because it has the lowest MAC
address value though the priority values of both the switches are same.
Note: In a multi port bridge, the port with the lowest MAC address will be used the Bridge MAC
address.
Port Priority
Every port on a bridge will have a priority value. The default port priority is 32. However, this value
can range from 0 to 2^6.
Port Number: The port number is 10-bit long and can have values 0 to 2^10.
Port ID
Port ID is Port Priority and Port number. Each port ID is 16 bits long with two parts: a 6-bit priority
setting and a 10-bit port number.
Bridge Port Cost and Path Cost:
The port cost is inversely proportional to the port bandwidth. The more the bandwidth of a port, the
lesser the path cost. For example, a gigabit port will have less port cost than a 100mbps port.
The following table lists the Port Cost value for different port bandwidths. The table is based on IEEE
802.1d standards recommendation, and the exact criteria for computing the Cost Value given the Link
Speed is not known.
Version 2.0
Link Speed
Cost Value
10 Gbps
42
1 Gbps
100 Mbps
19
10 Mbps
100
When a packet leaves a port on a bridge, the port cost is added to the path cost. The path cost is the
accumulated port costs from a switch to the root switch.
ii. Root Port and its selection:
Once the root bridge is elected, all other switches in the switched network need communicate with the
root bridge choosing a single port on itself (known as the root port). The selection of root port is
based on the following criteria:
i. If there are two or more paths to reach the Root Bridge (Switch) select the bridge port associated
with the lowest accumulated path cost.
Example:
In the above example, there are two paths from SW3 to reach root bridge. Path Cost calculation is
given below
(SW3(Via Port1) -> SW2) + (SW2 -> SW1) = 19+4 = 23
(SW3(Via port 2) -> SW2) + (SW2 -> SW1) = 4+4 = 8
Hence port 2 on SW3 will be considered as root port.
ii. If the path cost to reach the root bridge over two or more bridge ports is same, then:
Select the neighboring switch with the lowest Switch ID value to reach the Root Bridge (Switch).
Example:
Version 2.0
43
In the above example, the path costs from SW3 to reach the root bridge is same in both cases
case 1: SW3-SW2-SW1 = 4+4 = 8
case 2: SW3-SW4-SW1 = 4+4 = 8
The port connecting the neighboring switch of SW3 with the lowest Bridge ID value will be
considered as root port, which is the port connecting to SW2 in this case.
iii. If there are two or more ports on the same bridge with the lowest path cost, then:
Select the port with the lowest Port Priority value, if you have multiple paths to reach the Root Bridge
(Switch) via same neighbor switch.
If all the ports are configured with same priority number (32 by default), select the lowest port
number on the switch.
Example:
Version 2.0
44
In the above example, there are two paths from SW3 to reach root bridge. Since the port priority is
same on both ports of SW3, the lowest port number 1 will be considered as the root port on SW3.
Hence port 1 on SW3 will be considered as root port.
Note: Root Bridge will never have a root port. If a switch has multiple paths to reach the root switch,
it must select one path and the associated port as the root port.
iii. Designated Bridge:
A designated bridge is elected on a LAN segment in accordance with the following criteria:
a. In a LAN segment, the bridge with the lowest path cost to the Root Bridge will be the Designated
Bridge.
Example:
Version 2.0
45
* Note that the figure is just for the demonstration of the spanning-tree concept and is not exactly
looped network.
In the above example, on segment SW2-->SW3, the bridge with the lowest path cost to the root
bridge is SW2, hence it is elected as Designated Bridge on that segment.
OR
b. If there are two bridges in the LAN segment with equal path cost to the Root Bridge, then the
Bridge with the lowest Bridge ID becomes the Designated Bridge.
Example
In the above example, on SW2-->SW3 segment, both the bridges SW2 and SW3 have equal path cost
to reach the root bridge, hence the bridge with lowest bridge ID becomes the designated bridge which
is SW2 in this case.
Version 2.0
46
Version 2.0
47
* Note that the figure is just for the demonstration of the spanning-tree concept and is not exactly
looped network.
ii. If a switch has redundant connections to the network segment, the switch port with the lowest port
priority (32 by default) is selected.
Example:
In this example, there is redundant connection on segment SW2-->SW3. Therefore on the designated
bridge (SW2), the port with the lowest port priority will be selected as the designated port which is
port 1 on SW2 in this case.
Version 2.0
48
iii. If there is again a tie (it can happen if the priorities of the ports on this switch are the same), then
the lowest numbered port on the switch is selected.
Example:
In this example, there is redundant connection on segment SW2-->SW3. On the designated bridge
(SW2), both the ports have same priority, therefore as per the criteria given, the lowest numbered port
on the switch will be selected as designated port which is port 1 on SW2 in this case.
3. STP on a 5-Switched Network
Explanation
Version 2.0
49
1. Root Bridge : SW1 is the root bridge because of its lowest MAC-address, thus becoming the
decisive factor because the priority is default on all the switches..
2. Root Port : RP on each switch is calculated which is the sum of the port costs from each switch to
the root switch, lowest path cost will become the root port.
Example, there are three ways to reach root bridge from SW2 as given below:
SW2-SW1 = 19 (lowest path)
SW2-SW3-SW4-SW1 = 19+19+19+19 = 76
SW2-SW5-SW4-SW1 = 19+19+19+19 = 76
Therefore, port 1 on SW2 becomes the root port. Similarly root ports on other switches are selected.
3. Designated Port : On segment SW1-->SW2, the Designated Port will be port 1 on SW1. Thats
because port 1 on SW1 has a cost of 0, while port 1 on SW2 has a cost of 19. On segment SW1->SW4, the Designated Port will be port 2 on SW1. Again, port 2 on SW1 has a cost of 0, while port 1
on SW4 has a cost of 19. Since their port cost is always 0, it should be clear that ports on the Root
Bridge will always be Designated Ports for their connected segments.
Taking Segment SW2-SW3 as an example, the path cost from SW2 to root switch is lesser than SW3
to root. As such, the Designated Port will be on SW2. And the other port which is not a designated
port will be called a non-designated port NDP like port 2 on SW3 and SW5 in the above figure, and
they will be in blocking state where frames are neither sent/received. i.e, Any active port that is not a
root port or a designated port is a blocked port (BP).
Similarly Designated Port is selected on all the other segments of the switch network.
Back
Version 2.0
50
SW1>enable
SW1#configure terminal
SW1(config)#spanning-tree vlan 1
SW1(config)#no spanning-tree vlan 1
SW1(config)#exit
SW1#
Back
Note: Spanning Tree Protocol (STP) is enabled by default on modern switches. It is possible to
disable or enable the Spanning Tree Protocol (STP) when required.
Version 2.0
51
Version 2.0
52
Note:
i. Hello-Time: Determines how often the switch broadcasts hello messages to other switches.
ii. Forward-Time: Determines how long each of the listening and learning states last before the
interface begins forwarding.
iii. Max-Age: Determines the amount of time the switch stores protocol information received on an
interface.
53
Version 2.0
54
Note: Please refer to the below network for the exercises given in this section. Also note that the spanning
tree commands are made available only on 2950 switch in the simulator.
55
is not allowed on root bridge switch. When UplinkFast is configured, the bridge priority is changed
to 49,152 so that this switch will not be selected as root.
Back
Version 2.0
56
Back
57
12.4 : Lab Exercise 4 : Setting power priority on all PoE enabled interfaces
Not Available in Demo Version.
14. Appendix
14.1 : Answer keys for Objective Test 1
Not Available in Demo Version.
58
59
1. Router-Layer 3 Device
3. PC/Workstation
Version 2.0
60
5. Circuit-Switched Serial
6. Ethernet-Icon to represent Layer 1 or 2 Ethernet cable
7. Network Cloud
Version 2.0
61