Sem 3 .PDF?? ??
Sem 3 .PDF?? ??
( Faculty of ICT )
B.Sc. IT-IMS and Cloud Management
Course Code : 10930904
ENTERPRISE
NETWORK
2
Sr. Teaching Weightage
Topics
No. Hrs. (%)
Accessing the Cisco Catalyst Switch CLI. Cisco Catalyst 5 12.5
1 Switches. Accessing the Cisco IOS CLI. Cabling the
Console Connection. Accessing the CLI with Telnet
and SSH. User and Enable (Privileged) Modes.
6 STP and RSTP Basics. The Need for Spanning Tree. What 5 12.5
Spanning Tree Does. How Spanning Tree Works. The STP
Bridge ID and Hello BPDU. Electing the Root Switch.
Choosing Each Switch’s Root Port. Choosing the Designated
Port on Each LAN Segment. Configuring to Influence the STP
Topology. Details Specific to STP (and Not RSTP). STP Activity
When the Network Remains Stable. STP Timers That
Manage STP Convergence. Changing Interface States with
STP. Rapid STP Concepts. Comparing STP and RSTP. RSTP and
the Alternate (Root) Port Role. RSTP States and Processes.
RSTP and the Backup (Designated) Port Role. RSTP Port 5
Types. Optional STP Features. EtherChannel. PortFast. BPDU
Guard.
7 Understanding RSTP Through Configuration. The Need 5 12.5
for Multiple Spanning Trees. STP Modes and Standards.
The Bridge ID and System ID Extension. How Switches
Use the Priority and System ID Extension. RSTP
Methods to Support Multiple Spanning Trees. Other
RSTP Configuration Options. Configuring Layer 2
EtherChannel. Configuring a Manual Layer 2
EtherChannel. Configuring Dynamic EtherChannels.
6
Prepared By : Sandip Jadav
Unit 1
There are two types of LANs as shown in the following illustration: SOHO
LAN and Enterprise LAN.
Circuit Switching
14
Circuit Switching
Circuit switching is a method of implementing an end-to-end circuit (communication)
channel between nodes before establishing the actual connection. In this method, a
dedicated path is established across the sender and the receiver. This is maintained
for the entire duration of the communication session.
15
Packet Switching
In the Packet Switching method, data is divided into packets. Each packet includes:
A header
Source
Destination
Intermediate device address information
There are two types of Packet Switching methods commonly in use as shown in
the figure 2.3.3
Packet Switching
19
Ethernet Addressing
In networking terminology, Ethernet addressing is referred to as the ‘MAC
address’. The MAC address is a unique 48-bit hexadecimal address
assigned to a NIC (Network Interface Controller) that is attached to the
system. Observe the following figure:
Data Transmission
Unicast
Broadcast
Unicast: Transmits a frame or packet from one host direct to another host
(destination)
Bridges: Bridges operate at layer 2. This is the Data link layer, commonly used
to connect multiple LAN segments. Bridges have both the address learning
mechanism and maintain MAC tables. Since bridges are full-duplex, a two-
way communication is possible
Switches: Switches are layer2 devices that connect computers, printers and
servers within a segment, building or campus. A switch serves as a controller,
enabling networked devices to communicate to each other efficiently. There 24
are two types of Switches, namely:
1. Manmanaged Switches. 2. Managed Switches.
Unmanaged Switches These types of Switches are used in SOHO
networking. Unmanageable switches cannot be configured. They possess a
preinstalled default configuration.
25
Bridges vs. Switches
Performance of a network is normally affected when an Ethernet
environment is using hubs that have a large collision domain. Bridges
were developed to avoid this issue.
Functions of a Bridge
A bridge isolates one collision domain from another while still connecting
Functions of a Switch
A switch is a bigger, faster bridge. Every port on a switch or bridge is its
own collision domain. Switches also perform the same functions as a
bridge, but connect multiple network segments together; they have a
large buffer memory with multi ports. Switches have a dedicated chip
called ASIC for address learning to forward the Ethernet frames. They can
26
also have different port speeds like Fast Ethernet or Gigabit.
Bridges vs. Switches
Bridging Switching
28
Address Learning
When a new switch is powered on, it does not have a MAC-table
populated in its memory. Once the host transmits data to other hosts, the
switch broadcasts the frame to all the connected ports. When the other
host replies, it learns the MAC address of both the hosts and stores it in
the MAC table.
31
Cut-through The Cut-through switching mode provides fastest switching functions
with the lowest latency. The Switch copies the destination MAC address to its
memory and reads only the first 6 bytes of the frame. Once the frame reaches the
destination, the switch then checks its MAC table in order for the port to forward the
frame. It then sends it on its way. There is no error checking in the cut-through
mode.
Store and Forward The Store and Forward is a default switching mode for the
distribution layer switches. The entire frame is read and copied to memory. A
complete Cyclic Redundancy Check (CRC) will take place to check for errors in order
to compare the frame’s FCS value with the CRC output value.
32
Inspecting and connecting to your hardware
Before configuring your Cisco switch, you’ll need to be able to identify the power
cable, switch ports, console ports. In addition, all Cisco switches come with LEDs that
let you know the current state of your switch.
Connect the switch’s power cable to the power source, and wait for the lights to
come up.
Check the front side of the switch. The switch’s (SYST) System’s LEDs are as follow:
33
Inspecting and connecting to your hardware
Check the lights. They vary according to the Cisco Switch series, but generally, you
should see the System light (as displayed above), along with other lights like
Console, Active, RPS, Stack, PoE, Duplex, Speed, etc.
Check the backside of the switch. Behind the switch, you should be able to see the
power supply and console port. The console port of switches can be either, Serial or
34
How to connect to a Cisco Switch?
Connect to the console (management) port using a console cable.
Depending on the console port of the Cisco Switch, you should use different
adapters. Generally, there are two types of cable adapters: a Serial DB-9/Ethernet
RJ45 Console cable (as shown below) and a USB/Serial DB-9 adapter (if your
computer does not have a serial port).
Ensure you are connected to the console port of the Cisco switch using the correct
cable, as shown in the previous section.
36
How to connect to a Cisco Switch?
Look for the COM (communication port) established by your computer. A COM port
is the name of the serial port interface on PCs. It refers to physical ports and
emulated ports like those of USB adapters. So, if you are using a USB/RJ45 adapter,
you’ll need to find the COM port. To do this, go to Windows Device Manager and
check your Ports. Then, locate the cable (with driver) that you are using and record
the COM number (in this case, COM 1).
38
Command Modes
The hostname “Switch” is the current name of the switch, and the “>” means you
40
Flash : This memory store iOS of Router/Switch
Switch#sh flash
router#sh start
42
User Mode and Privileged Mode Security
In this lesson, we’ll take a look at how you can secure user mode and privileged
(enable) mode. By default, there is no authentication required. If you connect a Cisco
console cable to your switch or router, here’s what happens:
Once you press the enter button, we end up in user mode right away. There’s no
password or anything. The same thing applies to the enable mode:
Switch>enable
Switch#
43
User Mode Security
Simple Password
The most simple option to protect user mode is to add a password. Here’s how to do
this:
Switch(config)#line console 0
First, we need to enter the console settings. Here’s where we have to add two
We configure a password (cisco) and use the login command to tell Cisco IOS to
prompt for this password. Next time you open the console, this will happen:
Switch(config)#line console 0
Switch(config-line)#login local
Under the console settings, we use the login local command to tell the switch to refer
to a local database of usernames and passwords for authentication. In the global
config, we create a username “admin” with password “cisco”.
45
Next time you open the console, here’s what you see:
46
Enable Mode Security
What about enable mode / privileged mode? We can also add a password there. You
need to do this from the configuration mode:
Switch#configure terminal
Let’s see if our password “cisco” works. Let’s get out of enable mode:
Switch#disable
Switch>enable Password:
Cisco IOS has a command that lets you encrypt all clear text passwords in your
configuration. Here’s how:
Switch(config)#service password-encryption
48
Switch#show running-config | include password
service password-encryption
enable password 7 13061E010803
username admin password 7 110A1016141D
49
Secret
Cisco IOS supports something called a secret as an alternative to the password. Let’s
try this for the enable mode:
Switch(config)#enable secret ?
0 Specifies an UNENCRYPTED password will follow
5 Specifies a MD5 HASHED secret will follow
Above you can see this switch supports MD5, PBKDF2 and SCRYPT hashes.
Older IOS devices only support MD5 authentication.
Let’s give this a try:
MD5 is not considered secure nowadays. It’s very easy to brute force simple
passwords. For example, try this website for the MD5 hash that was created for
my secret “cisco”. It will only take a few seconds to recover.
Let’s try one of the other algorithms that are considered secure nowadays.
Here’s how you can select the algorithm for the enable mode:
Switch(config)#enable algorithm-type ?
md5 Encode the password using the MD5 algorithm
scrypt Encode the password using the SCRYPT hashing algorithm 51
sha256 Encode the password using the PBKDF2 hashing algorithm
Let’s try the PBKDF2 (SHA256) hashing algorithm:
My username now uses SHA256 as well for password “cisco”. Here’s what it looks
like:
Authorization
Authorization follows authentication. During authorization, a user can be
granted privileges to access certain areas of a network or system. The areas
and sets of permissions granted a user are stored in a database along with
the user’s identity. The user’s privileges can be changed by an
administrator. Authorization is different from authentication in that
authentication only checks a user’s identity, whereas authorization dictates
54
what the user is allowed to do.
For example, a member of the IT team may not have the privileges
necessary to change the access passwords for a company-wide virtual
private network (VPN). However, the network administrator may choose
to give the member access privileges, enabling them to alter the VPN
passwords of individual users. In this manner, the team member will be
authorized to access an area they were previously barred from.
Accounting may be used to analyze user trends, audit user activity, and
provide more accurate billing. This can be done by leveraging the data
collected during the user’s access. For example, if the system charges
users by the hour, the time logs generated by the accounting system can
report how long the user was logged in to the router and inside the 55
router>en
router#conf t
router(config)#hostname RRR
RRR(config)#enable password cisco
60
How to Configure DHCP Server on Cisco Switches
The DHCP service allows hosts to automatically obtain their IP configuration from the
DHCP server. The DHCP service is available on Cisco switches. If you have a Cisco
switch in your network, you can also use it as a DHCP server.
The following table lists the commands that are required to configure a switch to act
as a DHCP server.
Switch>enable
Switch#configure terminal
To view IP addresses leased by the DHCP server, use the 'show ip dhcp binding' 61
To view DHCP pool statistics and information, use the 'show ip dhcp pool
Configuring Switch Interfaces. Configuring Speed,
An access port belongs to and carries the traffic of only one VLAN. Traffic is
received and sent in native formats with no VLAN tagging. Traffic arriving on an
access port is assumed to belong to the VLAN assigned to the port. If an access
port receives an802.1P- or 802.1Q-tagged packet for the VLAN assigned to the
port, the packet is forwarded. If the port receives an 802.1P- or 802.1Q-tagged
packet for another VLAN, the packet is dropped, the source address is not learned,
You can identify physical interfaces by physically checking the interface location
on the switch. You can also use the IOS show privileged EXEC commands to
display information about a specific interface or all the interfaces on the switch.
The remainder of this chapter primarily provides physical interface configuration
procedures.
This section describes how to configure all types of interfaces and how to 65
You can use the interface range global configuration command to configure
66
Configuring and Using Interface-Range Macros
68
Configuring Interface Speed and Duplex Mode
On the Catalyst 2950 LRE switch, the copper media (10/100/1000) of the
Gigabit interface operate in 10/100 full-duplex or half-duplex mode and 1000
Mbps only in full-duplex mode. The fiber-optic media of the Gigabit interface
only operate in 1000 Mbps and full-duplex mode.
You can configure duplex mode on any Fast Ethernet interfaces that are not
set to autonegotiate; you cannot configure duplex mode on 100BASE-FX,
1000BASE-SX, and GBIC-module interfaces. The 10/100/1000 interfaces can
operate only in full-duplex mode.
69
Configuration Guidelines
When configuring an interface speed and duplex mode, note these guidelines:
•Ethernet ports set to 1000 Mbps should always be set to full duplex.
•Gigabit Ethernet ports that do not match the settings of an attached device can
lose connectivity and do not generate statistics.
70
Configuration Guidelines
•When Spanning Tree Protocol (STP) is enabled and a port is reconfigured, the
switch can take up to 30 seconds to check for loops. The port LED is amber while
STP reconfigures.
71
Configuration Guidelines
Switch(config-if)# speed 10
Switch(config)# end
72
Configuring Media Types for Gigabit Interfaces
73
Configuring IEEE 802.3X Flow Control on Gigabit Ethernet Ports
•receive on (or desired) and send on: Flow control operates in both directions;
both the local and the remote devices can send pause frames to show link
congestion.
•receive on (or desired) and send desired: The port can receive pause frames and
•receive on (or desired) and send off: The port cannot send pause frames but can
operate with an attached device that is required to or can send pause frames; the
port can receive pause frames.
•receive off and send on: The port sends pause frames if the remote device
supports flow control but cannot receive pause frames from the remote device.
•receive off and send desired: The port cannot receive pause frames but can
send pause frames if the attached device supports flow control.
•receive off and send off: Flow control does not operate in either direction. In 75
case of congestion, no indication is given to the link partner, and no pause frames
are sent or received by either device.
Switch# configure terminal
Switch(config)# interface gigabitethernet0/1
Switch(config-if)# flowcontrol receive off
Switch(config-if)# flowcontrol send off
Switch(config-if)# end
Switch# show running-config
76
Monitoring Interface and Controller Status
Commands entered at the privileged EXEC prompt display information about the
interface, including the version of the software and the hardware, the controller
status, and statistics about the interfaces. Table lists some of these interface
monitoring commands. (You can display the full list of show commands by using the
show ? command at the privileged EXEC prompt.) These commands are fully
described in the Cisco IOS Interface Command Reference for Release 12.1.
Virtual LAN (VLAN) is a concept in which we can divide the devices logically on
layer 2 (data link layer). Generally, layer 3 devices divide the broadcast domain
but the broadcast domain can be divided by switches using the concept of VLAN.
VLAN ranges:
VLAN 0, 4095: These are reserved VLAN which cannot be seen or used.
VLAN 1: It is the default VLAN of switches. By default, all switch ports are in
VLAN. This VLAN can’t be deleted or edit but can be used.
VLAN 2-1001: This is a normal VLAN range. We can create, edit and delete
these VLAN.
VLAN 1002-1005: These are CISCO defaults for fddi and token rings. These
VLAN can’t be deleted. 80
Vlan 1006-4094: This is the extended range of Vlan.
VLANs offer several features and benefits, including:
•Improved network security: VLANs can be used to separate network traffic and
limit access to specific network resources. This improves security by preventing
unauthorized access to sensitive data and network resources.
•Cost savings: VLANs can help reduce hardware costs by allowing multiple virtual
networks to share a single physical network infrastructure.
1. Trunk Link
2. Access link
It connects VLAN-unaware devices to a VLAN-aware bridge. All frames on the
access link must be untagged.
3. Hybrid link
It is a combination of the Trunk link and Access link. Here both VLAN-unaware and
VLAN-aware devices are attached and it can have both tagged and untagged
frames.
82
Advantages
• Performance –
The network traffic is full of broadcast and multicast. VLAN reduces the need to
send such traffic to unnecessary destinations. e.g.-If the traffic is intended for 2
users but as 10 devices are present in the same broadcast domain, therefore,
all will receive the traffic i.e. wastage of bandwidth but if we make VLANs, then
the broadcast or multicast packet will go to the intended users only.
• Formation of virtual groups –
2) Limited scalability: VLANs are limited by the number of available VLAN IDs,
which can be a constraint in larger cloud computing environments.
4) Limited interoperability: VLANs may not be fully compatible with all types of
network devices and protocols, which can limit their usefulness in cloud
computing environments.
5) Limited mobility: VLANs may not support the movement of devices or users
between different network segments, which can limit their usefulness in
mobile or remote cloud computing environments.
1.Voice over IP (VoIP) : VLANs can be used to isolate voice traffic from data traffic,
which improves the quality of VoIP calls and reduces the risk of network congestion.
3.Remote Access : VLANs can be used to provide secure remote access to cloud-
based applications and resources, by isolating remote users from the rest of the
network.
4.Cloud Backup and Recovery : VLANs can be used to isolate backup and recovery
traffic, which reduces the risk of network congestion and improves the performance
of backup and recovery operations.
5.Gaming : VLANs can be used to prioritize gaming traffic, which ensures that gamers
receive the bandwidth and resources they need for a smooth gaming experience.
85
6.IoT : VLANs can be used to isolate Internet of Things (IoT) devices from the rest of
the network, which improves security and reduces the risk of network congestion.
VLAN Configuration Command
switch1(config)#vlan 2
switch1(config-vlan)#vlan accounts
86
What is trunk and what is trunking in networking?
A network trunk is a communications line or link designed to carry
multiple signals simultaneously to provide network access between two points.
Trunks typically connect switching centers in a communications system. The signals
can convey any type of communications data.
A networking trunk can consist of several wires, cables or fiber optic strands
bundled together in a single physical cable to maximize the available bandwidth.
Trunk ports. In switch port mode trunk setting, a port will concurrently carry traffic
between several VLAN switches on the same physical link. A trunk port adds special
identifying tags to isolate traffic on the different switches. IEEE (Institute of
Electrical and Electronics Engineers) open standard 802.1Q describes the vendor-
agnostic encapsulation protocol for VLAN tagging. A tag gets placed
on Ethernet frames as they pass between switches. This ensures each frame is
routed to its intended VLAN at the other end of the trunked link. A trunk port is
commonly used for connecting two switches, connecting switches to servers and
routers, and connecting hypervisors to switches.
87
What is trunk and what is trunking in networking?
VLAN Identification methods – If the frame is forwarded out to a trunk link then a
header or tag is added to the frame header which specifies the VLAN to which the
frame belongs. The frame is encapsulated at the sender’s switch and removed at the
89
receiver’s switch and then forwarded out to the ports which belongs to that VLAN
(according to the processing of switch). There are 2 VLAN identification methods:
Inter-Switch Link (ISL) and IEEE 802.1Q
Inter-Switch Link (ISL) – This is a VLAN identification method in which VLAN
information is explicitly tagged onto Ethernet frame. ISL is proprietary to CISCO
switches. ISL functions at layer 2 by encapsulating a data frame with a new header
and by performing a new cyclic redundancy check (CRC). In ISL, the original frame is
encapsulated and an additional header is added before the frame is carried over a
trunk link. At the receiving end, the header is removed and the frame is forwarded
to the assigned VLAN. ISL supports upto 1000 vlans. The concept of native VLAN is
The ISL frame encapsulation is of 30 bytes, 26 byte header, and a 4 byte FCS (frame
check sequence) are inserted. Hence a total of 30 Bytes of overhead. Therefore, it is
less preferred. Even Cisco advises to use 802.1Q. Configuration (ISL):
90
Configuration of Router on a stick
91
Router On a Stick :
The Router’s interface is divided into sub-interfaces, which acts as a default gateway
to their respective VLANs.
Router(config)#int fa0/0.1
Router(config)#int fa0/0.2
Router(config-subif)#encapsulation dot1Q 3
Router(config-subif)#ip add 192.168.10.9 255.255.255.248
Router(config-subif)#no shut
Router(config-subif)#exit
93
Switch configuration
Switch>en
Switch#conf t
Switch(config)#int fa0/2
Switch(config-if)#exit
Switch(config)#vlan 2
Switch(config-vlan)#name sales
Switch(config-if)#int fa0/1 94
The VTP is disabled by default on the device. You can enable and configure VTP
using the command-line interface (CLI). When VTP is disabled, the device does
not relay any VTP protocol packets.
95
VTP - Modes
•Server— Allows you to create, remove, and modify VLANs over the entire
network. You can set other configuration options like the VTP version and also
turn on or off VTP pruning for the entire VTP domain. VTP servers advertise
their VLAN configuration to other switches in the same VTP domain and
synchronize their VLAN configuration with other switches based on messages
received over trunk links. Beginning with Release 5.1(1), the server mode is
the default mode. The VLAN information is stored on the bootflash and is not
erased after a reboot.
96
VTP - Modes
•Client— Allows you to create, change, and delete VLANs on the local device.
In VTP client mode, a switch stores the last known VTP information including
the configuration revision number, on the bootflash. A VTP client might or
might not start with a new configuration when it powers up.
•Off— Behaves similarly to the transparent mode but does not forward any
97
Switch configuration
For Server Switch---------------------------------------
Switch>en
Switch#conf t
Switch(config)#vlan 2
Switch(config-vlan)#name sales
Switch(config-vlan)#vlan 3
Switch(config-vlan)#name mkt
99
Introduction to Spanning-Tree
Spanning-tree is a protocol that runs on our switches that helps us to solve
loops. Spanning-tree is one of the protocols that you must understand as a
network engineer and you will encounter it for sure if you decide to face
the Cisco CCNA R&S exam. This lesson is an introduction to spanning-tree,
you will learn why we need it, how it works and how you can check the
spanning-tree topology on your Cisco switches.
1.H1 sends an ARP request because it’s looking for the MAC address of H2. An ARP
request is a broadcast frame.
2.SW1 will forward this broadcast frame on all it interfaces, except the interface
where it received the frame on. 101
1.It will forward it from every interface except the interface where it received the
frame.
2.This means that the frame that was received on interface Fa0/0 will be forwarded
on Interface Fa1/0.
Do you see where this is going? We have a loop! Both switches will keep forwarding
over and over again until the following happens:
Ethernet frames don’t have a TTL (Time to Live) value, so they will loop around
forever. Besides ARP requests, many frames are broadcasted. For example,
whenever the switch doesn’t know about a destination MAC address, it will be
flooded. 102
How spanning-tree solves loops
Spanning-tree will help us to create a loop-free topology by blocking certain
interfaces. Let’s take a look at how spanning-tree work! Here’s an example:
•MAC address
•Priority
104
Spanning-tree requires the bridge ID for its calculation. Let me explain how it works:
•First of all, spanning-tree will elect a root bridge; this root bridge will be the one that
has the best “bridge ID”.
•The switch with the lowest bridge ID is the best one.
•By default, the priority is 32768, but we can change this value if we want.
107
What are STP port states?
When STP is enabled on a network bridge, each port is set to one of five states to
control frame forwarding:
1.Disabled. The port does not participate in frame forwarding or STP operations.
2.Blocking. The port does not participate in frame forwarding and discards frames
received from the attached network segment. However, the port continues to listen
3.Listening. From the blocking state, the port transitions to the listening state. The
port discards frames from the attached network segment or forwarded from another
port. However, it receives BPDUs and redirects them to the switch module for
processing.
4. Learning. The port moves from the listening state to the learning state. It listens
for and processes BPDUs but discards frames from the attached network segment or
forwarded from another port. It also starts updating the address table with the
information it's learned. In addition, it processes user frames but does not forward
those frames.
108
What are STP port states?
5. Forwarding. The port moves from the learning state to the forwarding state and
starts forwarding frames across the network segments. This includes frames from
the attached network segment and those forwarded from another port. The port
also continues to receive and process BPDUs, and the address table continues to
be updated.
Disadvantages:
•Lesser optimisation as the path calculated as the best cost to root bridge might
not be the best path to reach a network.
•No load balancing.
111
Per VLAN Spanning Tree + (PVST+) – It is a spanning tree standard developed by
Cisco for its devices which finds the root bridge per VLAN. It is a Cisco default
version of STP. It finds separate 802.1d spanning tree instance for each VLAN. It
also provides backward comparability with 802.1d or CST. This is more optimized
to the IEEE because it provides optimal path selection as separate instance of
STP per VLAN is find. This is as slow as CST.
Disadvantages:
•This is slow as CST i.e. convergence time is slow. By default, Cisco switches take
50 seconds for converging.
Advantages:
•Prevents network loops.
4. Rapid Per VLAN Spanning Tree + (RPVST+) –This Spanning Tree standard is
developed by Cisco which provides faster convergence than PVST+ and finds
separate instance of 802.1w per VLAN. It requires much more CPU and memory
than other STP standards.
113
5. 802.1s (Multiple Spanning Tree) :-This standard is developed by IEEE in which
grouping of VLANs is done and for each single group, RSTP is run. This is basically
a Spanning Tree Protocol running over another Spanning Tree Protocol.
Advantages:
•High redundancy
•load balancing can be achieved.
Disadvantages:
•More configuration is required and not easy to implement.
114
STP timers
There are several STP timers, as this list shows:
Hello — The hello time is the time between each bridge protocol data unit (BPDU)
that is sent on a port. This time is equal to 2 seconds (sec) by default, but you can
tune the time to be between 1 and 10 seconds.
Forward delay — The forward delay is the time spent in the listening and learning
state. This time is equal to 15 seconds by default, but you can tune the time to be
Max age — The max age timer controls the maximum length of time that passes
before a bridge port saves its configuration BPDU information. This time is 20
seconds by default, but you can tune the time to be between 6 and 40 seconds.
Each configuration BPDU contains these three parameters. In addition, each BPDU
configuration contains another time-related parameter that is known as the message
age. The message age is not a fixed value. The message age contains the length of
time that has passed since the root bridge initially originated the BPDU. The root
bridge sends all its BPDUs with a message age value of 0, and all subsequent
switches add 1 to this value. Effectively, this value contains the information on how
far you are from the root bridge when you receive a BPDU. 115
Understanding RSTP Through Configuration. The
Need for Multiple Spanning Trees. STP Modes and
Standards. The Bridge ID and System ID Extension.
How Switches Use the Priority and System ID
Extension. RSTP Methods to Support Multiple
116
EtherChannel
EtherChannel works by grouping two or more physical links between switches into
a single logical link. This logical link is treated as a single entity, with the switches
treating it as a single link. Traffic is distributed across the physical links in the
logical link, providing increased bandwidth and improved load balancing.
117
Here is a topology in which two switches are connected with one PC
each. The link between the switches and PC is 1000mb/s and the link
between the switches is 100mb/s.
But, as you connect the switches with more than one link, STP (Spanning
Tree Protocol) will block the least redundant link. As we have made an
EtherChannel, all the links (that are grouped as one logical link k) will be
118
treated as single logical links therefore no link will be blocked and also, it
will provide us high-speed link and redundancy in our network.
Criteria – To form an EtherChannel, all ports should have:
1.Same duplex
2.Same speed
3.Same VLAN configuration (i.e., native VLAN and allowed VLAN should be same)
4.Switch port modes should be the same (access or trunk mode)
1. ON: In this mode, the interface will be a part of EtherChannel but no negotiation
takes place.
2. Desirable: In this mode, the interface will continuously attempt to convert the
other side interface into an EtherChannel.
3. Auto: In this mode, the interface will become a part of EtherChannel if and only if
it is requested by the opposite interface.
122
Link Aggregation Control Protocol (LACP)
2. Link Aggregation Control Protocol (LACP) –
Link Aggregation Control Protocol is an IEEE protocol, originally defined in
802.3ad, used to form an EtherChannel. This protocol is almost similar to Cisco
PAgP. There are different modes in which you can configure your interface. These
are namely:
2. Active: In this mode, the interface will continuously attempt to convert the
other side interface into an EtherChannel.
3. Passive: In this mode, the interface will become a part of EtherChannel if and
only if it is requested by the opposite interface.
123
Taking the same topology, you will now configure LACP on both switches. First,
124
Now, configuring for S2:
125
EtherChannel has several advantages, including
Increased bandwidth: By combining multiple physical links into a single logical link,
EtherChannel provides increased bandwidth between switches. This can help
improve network performance and reduce bottlenecks.
126
EtherChannel Load Balancing
EtherChannel supports load balancing. However, it does not mean that the traffic
is distributed equally among the links. The traffic that goes through the port-
channel interface is not forwarded on a round-robin basis. Instead, EtherChannel
load balancing uses a hash algorithm to forward packets.
The calculated load balancing hash determines which physical interface will be
127
EtherChannel Load Balancing
dst-ip – Destination IP address
dst-mac – Destination MAC address
dst-port – Destination TCP/UDP port
dst-mixed-ip-port – Destination IP address and destination TCP/UDP port
src-ip – Source IP address
Changing the hash may result in a different distribution ratio among the
links if they are unevenly distributed. Let’s say a port channel is formed
129
EtherChannel Load Balancing
EtherChannel Load Balancing Configuration
In our example below, you’ll see that we’ve got a router, two switches, and two
PCs. Switch2 has got the default configuration of ‘src-mac’, which is fine because
there are two PCs that have different MAC addresses. PC1’s traffic will be sent
down Switch2’s G0/0 interface, for example, and PC2’s traffic will be sent down
Switch2’s G0/1 interface. We’ve got two PCs and two physical links, therefore
depending on the traffic volume, it’s close to a 1:1 EtherChannel distribution
With Switch1, this is not the same case. Since there’s a single router, which
means a single MAC address, using the default algorithm of ‘src-mac’ would be
unfavorable. A single link will be used, either G0/0 or G0/1, for the traffic coming
from Router1.
In this way, the traffic from Router1 will be load balanced depending on the
destination MAC address. It could be that the traffic going to PC1 will be sent
down to Switch1’s G0/1 interface, and the traffic going to PC2 will be sent down
to Switch1’s G0/0 interface. Now, the two physical links are utilized.
131
EtherChannel Load Balancing Verification
To check the EtherChannel load balancing algorithm, we can use the command
‘show EtherChannel load-balance’. It will also show the traffic load balancing
method based on its type, non-IP, IPv4, or IPv6.
To check the link usage, ‘show EtherChannel port’ command is used. It is under the
Load in hex values and it is used to determine the traffic distribution on the 132
different EtherChannel interfaces.