This document discusses bridging and switching concepts, including:
- Bridges connect network segments at layer 2 and forward frames based on MAC addresses. Switches are hardware-based bridges that provide higher performance.
- Switches learn MAC addresses, make forwarding/filtering decisions, and avoid loops using protocols like STP. They can operate in cut-through, fragment-free, or store-and-forward modes.
- Configuring a switch involves setting passwords, the hostname, IP information, interface settings, and protocols like STP, VLANs, and VTP to extend VLANs across switches.
2. Objectives
• Understand purpose of using bridges and switches.
• Explain functions of switch at layer 2.
• Understand different switching mode.
• Understand how to configure a switch.
• Understand Spanning Tree Protocol.
• Explain Virtual LAN.
• Understand VLAN Trunk Protocol.
CMC Limited
3. Bridges
Bridges are data communication devices that operate
principally at Layer 2 of the OSI reference model.
Bridges are full-fledged packet switches that forward and
filter frames using the LAN destination addresses.
A bridge connects two segments of the same network.
There are several functions provided by bridges: traffic
isolation, frame forwarding and filtering.
CMC Limited
4. Bridges contd..
When a frame comes into a bridge interface, the bridge
examines the layer-2 destination address of the frame and
attempts to forward the frame on the interface that leads to
the destination.
CMC Limited
5. Bridges contd..
In order to make better use of the network and reduce the
number of collisions, we may use network bridge. The
purpose of the bridge was to segment the network in a
number of smaller collision domains. The job of a bridge was
simply to help ensure that the “scope” of collisions was
made smaller.
MAC Interface
Address
Computer 1 A
Computer 2 A
Computer 3 B
Computer 4 B
Computer 5 C
Computer 6 C
CMC Limited
6. Bridges contd..
A bridge will always forward all frames with “unknown”
destination MAC addresses to all connected interfaces,
besides the one the transmission originated on.
One limitation of a bridge is that they typically support no
more than 16 interfaces.
CMC Limited
7. Bridges contd..
Types of Bridges
Bridges can be grouped into categories based on various
product characteristics.
Using one popular classification scheme, bridges are either
local or remote.
Local bridges provide a direct connection between multiple
LAN segments in the same area.
Remote bridges connect multiple LAN segments in different
areas, usually over telecommunications lines.
CMC Limited
9. Bridges contd..
Bridge Forwarding and Filtering
Filtering is the ability of a bridge to determine whether a
frame should be forwarded to some interface or should just
be dropped.
Forwarding is the ability to determine the interfaces to
which a frame should be directed. Bridge filtering and
forwarding are done with a bridge table.
A nodes entry in the bridge table contains:
• LAN address of the node
• bridge interface that leads toward the node
• time at which the entry for the node was placed into the
table
CMC Limited
10. Switches
Switching technology has emerged as the evolutionary heir
to bridging-based internetworking solutions.
Superior throughput performance, higher port density,
lower per-port cost and greater flexibility have contributed
to the emergence of switches as replacement technology
for bridges.
When you think of a switch, simply consider it to be a faster
bridge with more ports.
CMC Limited
12. Bridging vs. Switching
• Bridges are software based, while switches are
hardware based because they use ASIC (Application-
Specific Integrated Circuit) chips to help make filtering
decisions.
• Switches have a higher number of ports than most
bridges.
• Bridges can only have one spanning-tree instance per
bridge, while switches can have many.
• Both bridges and switches forward layer-2 broadcasts.
• Both bridges and switches make forwarding decisions
based on layer-2 addresses.
CMC Limited
13. Switch Functions at Layer 2
There are three distinct functions of layer 2 switching.
• Address learning
• Forward/filter decisions
• Loop avoidance
CMC Limited
14. Switch Functions at Layer 2 Contd..
Address Learning
If a device answers and sends a frame back, then the
switch will take the source address from that frame and
place the MAC address in the database, associating this
address with the interface that received the frame.
Node 1 Transmits Data to Node 2 for First Time.
Internal Digital Bus
NODE 1
(Transmitting) NODE 4
NODE 2 NODE 5
(Receiving)
NODE 3 NODE 6
CMC Limited
15. Address Learning Contd..
Node 2 Sends a Frame to Node 1:
Internal Digital Bus
NODE 1
NODE 4
(Receiving)
NODE 2 NODE 5
(Transmitting)
NODE 3 NODE 6
Frame Path after MAC/Port is known:
Internal Digital Bus
NODE 1
(Transmitting) NODE 4
NODE 2 NODE 5
(Receiving)
NODE 3 NODE 6
CMC Limited
16. Switch Functions at Layer 2 Contd..
Forward/Filter Decision
When a frame arrives at the switch, the first step is to
check the destination hardware address, which is
compared to the forward/filter MAC database.
If a device answers to the broadcast, then the MAC
address of that device is added to the MAC database of the
switch.
CMC Limited
17. Switch Functions at Layer 2 Contd..
Loop Avoidance
If multiple connections between switches are created for
redundancy purpose, network loops can occur.
Server
Port 1 Port 1
Switch A Switch B
Port 2 Port 2
Two switches which have been placed in the network
to provide redundancy in case one fails.
CMC Limited
18. Loop Avoidance contd..
Things will work fine until a broadcast come along and
causes a lot of trouble.
Server
First Round
Second Round
Port 1 Third Round Port 1
Switch A Switch B
Port 2 Port 2
First Round
CMC Limited
19. Switch Types
Switches are fast, therefore have low latency. This latency
does vary and depends on what type of switching mode the
switch is operating at.
There are three switching modes:
• Cut-through
• Fragment Free
• Store-and-forward
CMC Limited
20. Switch Types Contd..
Cut-through
In this mode the switch reads the frame until it learns the
destination MAC address of the frame it’s receiving.
This method has the following features:
• Lowest latency
• Lowest error checking
• Highest frame forwarding speed
CMC Limited
21. Switch Types Contd..
Fragment Free
The Fragment free switching method is mainly used to
check for frames which have been subject to a collision.
The frame’s first 64 bytes are only checked before
forwarding the frame out of the designated port.
Store-and-forward
In this mode, when the switch receives a frame from one
of it’s ports, it will store it in memory, check it for errors
and corruption, and if it passes the test, it will forward the
frame out of the designated port, otherwise, if it discovers
that the frame has errors or is corrupt, it will discard it.
CMC Limited
22. Switch Types Contd..
Different Switching Modes within a Frame.
Up to 1500
6 bytes 1 byte 6 bytes 6 bytes 2 bytes bytes 4 bytes
Start of Frame
Frame Destination Source Check
Preamble Delimiter Hardware Hardware Length DATA Sequence
(SFD) Address Address (FCS)
Cut-through: No error checking
Fragment Free: Checks for collisions
Store-and-forward: All errors filtered; has highest latency
CMC Limited
23. Configure a Switch
The Catalyst 1900 switch can now use a command line
interface (CLI) to configure the Cisco Internetworking
Operating System (IOS) on the switch. Before the CLI was
available, the 1900 switch could only be configured through
a menu system.
There are two types of operating systems that run on Cisco
switches:
• IOS-based: In this system, you can configure the switch
from a CLI.
• Set-based: This system uses older CLI configuration
commands (you can use the set command to configure
the switch).
CMC Limited
24. Configure a Switch Contd..
Switch Startup
You have to check the following before you power on the
switch for the first time:
• You have plugged in all the network cables securely.
• You have connected a terminal to the console port.
• You have configured your terminal software correctly.
When the 1900 switch is first powered on, it runs through a
power-on self-test (POST). After the POST runs and you
have a console cable connected to the switch, the menu
shown next appears.
CMC Limited
25. Switch Startup contd..
1 user(s) now active on Management Console.
User Interface Menu
[M] Menus
[K] Command Line
[I] IP Configuration
Enter Selection: K
CLI session with the switch is open.
To end the CLI session, enter [Exit].
>
By pressing K, you can use the command-line interface,
and when you press M, you will be allowed to configure the
switch through a menu system. Pressing I allows you to
configure the IP configuration of the switch.
CMC Limited
26. Configure a Switch Contd..
Setting Password
The first thing that you should configure on a switch is the
passwords. You don’t want unauthorized users connecting
to the switch.
The following output is an example of how to set both the
user-mode and enable-mode passwords on the 1900
switch.
(config)#enable password level 1 rahul
(config)#enable password level 15 rahull
(config)#exit
#exit
CMC Limited
27. Setting Password contd..
To enter the user-mode password, use level 1. To enter the
enable-mode password, use level 15. Always remember
the password must be at least four characters, but not
longer than eight characters.
Enable Secret Password
The enable secret password is a more secure password
and supercedes the enable password if set. If you have an
enable secret set, you don’t even need to bother setting the
enable-mode password.
(config)#enable secret rahul2
CMC Limited
28. Setting Password contd..
You can use the command show running-config to see the
current configuration on the switch.
#sh run
Building configuration...
Current configuration:
enable secret 5 $1$FMFQ$wFVYVLYn2aXscfB3J95.w.
enable password level 1 “RAHUL”
enable password level 15 “RAHUL1”
CMC Limited
29. Configure a Switch Contd..
Setting Hostname
It is helpful to set a hostname on a switch so that you can
identify the switch when connecting to it.
You can use the hostname command to set the hostname
in the 1900 switch.
>en
Enter password: ******
#config t
Enter configuration commands, one per line.
End with CNTL/l
(config)#hostname Rahul1900EN
Rahul1900EN(config)#
CMC Limited
30. Configure a Switch Contd..
Setting IP Information
You do not have to set any IP configuration on the switch to
make it work. You can manage the switch via Telnet or
other management software, or if you wanted to configure
the switch with different VLANs and other network
functions.
By using the command show ip (or sh ip), you can see the
default IP configuration of the switch.
CMC Limited
31. Setting IP Information contd..
To set the IP configuration on a 1900 switch, use the ip
address command. The default gateway should also be set
using the ip default-gateway command.
Rahul1900EN#config t
Enter configuration commands, one per line.
End with CNTL/Z
Rahul1900EN(config)#ip address 172.16.10.16
255.255.255.0
Rahul1900EN(config)#ip default-gateway
172.16.10.1
Rahul1900EN(config)#
CMC Limited
32. Configure a Switch contd..
Verify IP Connectivity
It is important to test the switch IP configuration. You can
use the Ping program, and you can telnet into the 1900
switch.
Rahul1900EN#ping 172.16.10.10
Sending 5, 100-byte ICMP Echos to 172.16.10.10, time out
is 2 seconds:
! ! ! ! !
Success rate is 100 percent (5/5), round-trip
min/avg/max
0/2/10/ ms
CMC Limited
33. Configure a Switch contd..
Verify IP Connectivity
It is important to test the switch IP configuration. You can
use the Ping program, and you can telnet into the 1900
switch.
Configure Switch Interfaces
It is important to understand how to access switch ports.
The 1900 switch uses the type slot/port command.
Interface Descriptions
You can administratively set a name for each interface on
the 1900 switch.
You cannot use spaces with the description command, but
you can use underscores if you need to.
CMC Limited
34. Configure a Switch contd..
Port Duplex
By using duplex command in the interface configuration
you can set the duplex on the 1900 switch.
Erasing Switch Configuration
The switch configuration is stored in NVRAM. You cannot
view the startup-config, or contents of NVRAM. You can
only view the running-config.
CMC Limited
35. Configure a Switch contd..
LAN Switch Type
You can change LAN switch type with the switching-mode
command from global configuration mode.
MAC Address Table
The switches use MAC (hardware) addresses burned into a
host’s network interface card (NIC) to make forwarding
decisions.
CMC Limited
36. Spanning Tree Protocol (STP)
Spanning Tree allows you to implement redundancy in a
switched or bridged network without needing to worry about
the broadcast storm.
Operation of the Spanning Tree Protocol
The job of STP is to find all links in the network and shut
down any redundant once, thereby preventing network
loops from occurring.
CMC Limited
37. Spanning Tree Protocol (STP) contd..
Root Bridge Selection
At the boot-up all of the bridges think of themselves as the
Root Bridge.
Election of Designated Ports
The bridge containing the designated port for a given
segment is referred to as the designated bridge for that
segment.
CMC Limited
38. Spanning Tree Protocol (STP) contd..
Spanning Tree Port States
Each port on a bridge or switch using Spanning-Tree
Protocol exists in one of the following five states:
• Blocking
• Listening
• Learning
• Forwarding
• Disabled
Convergence
Convergence occurs when bridges and switches have
transitioned to either the forwarding or blocking modes.
CMC Limited
39. Virtual LAN (VLAN)
VLAN is a networking technology that allows networks to
be segmented logically without having to be physically
rewired.
Extending VLANs Between Switches
In order to extend VLANs across different switches, a trunk
link must interconnect the switches.
A trunk link is implemented between fast switch ports on
two different switches using a crossover cable.
CMC Limited
40. Switches – the Core of VLANs
Switches are one of the core components of VLAN
communications.
Switches provide the intelligence to group users, ports, or
logical addresses into common communities of interest.
LAN switches offer significant increases in performance
and dedicated bandwidth across the network, with the
intelligence necessary for VLAN segmentation.
CMC Limited
41. VLAN Memberships
VLANs are usually created by an administrator, who then
assigns switch ports to each VLAN. Such a VLAN is called
a static VLAN.
Static VLANs
Static VLANs are the usual way of creating VLANs, and
they’re also the most secure.
Dynamic VLANs
A dynamic VLAN determines a node’s VLAN assignment
automatically.
CMC Limited
42. Configure VLANs on a Switch
You can create up to 64 VLANs on a 1900 switch. A
separate spanning-tree instance can be configured per
VLAN.
Assigning Switch Ports to VLANs
You can configure each port to be in a VLAN by using the
vlan-membership command.
You can only configure VLANs one port at a time. There is
no command to assign more than one port to a VLAN at a
time with the 1900 switch.
CMC Limited
43. Configure VLANs on a Switch contd..
VLAN Benefit
There are several benefits to using VLANs. To summarize,
VLAN architecture benefits include:
• Increased performance
• Improved manageability
• Network tuning and simplification of
software configurations
• Physical topology independence
• Increased security options
CMC Limited
44. Configure VLANs on a Switch contd..
VLAN Limitation
There are a few limitations to using VLANs, some of them
are as follows
• Broadcast limitations
• Device limitations
• Port constraints
CMC Limited
45. VLAN Trunk Protocol (VTP)
The goal of VLAN Trunk Protocol (VTP) is to manage all
configured VLANs across a switched internetwork and to
maintain consistency throughout that network.
Following are the list of some of the benefits VTP has to offer:
• Consistent VLAN configuration across all switches in
the network.
• Allowing VLANs to be trunked over mixed networks,
like Ethernet to ATM LANE (Asynchronous Transfer
Mode LAN emulation) or FDDI (Fiber Distributed Data
Interface).
• Accurate tracking and monitoring of VLANs.
• Dynamic reporting of added VLANs to all switches
• Plug-and-Play VLAN adding.
CMC Limited
46. VLAN Trunk Protocol (VTP) contd..
VTP Mode
VTP-capable devices can be configured to operate in the
following three modes:
• Server
• Client
• Transparent
VTP Domain Name
In order to use VTP, you must assign a VTP domain name
to each switch. VTP information will remain only within the
same VLAN domain.
CMC Limited
47. Configuring Trunk Ports
The 1900 switch only runs the Dynamic Inter-Switch Link
(DISL) encapsulation method.
To configure trunking on a Fast Ethernet port, use the
interface command trunk parameter.
Clearing VLANs from Trunk Links
All VLANs are configured on a trunked link unless cleared
by an administrator.
Use the clear trunk command if you don’t want a trunked
link to carry VLAN information.
CMC Limited
48. Configuring Trunk Ports contd..
Verifying Trunk Links
To verify your trunk ports, use the show trunk command.
If you have more than one port trunking and want to see
statistics on only one trunk port, you can use the show
trunk port-number command.
CMC Limited
49. VTP Configuration on Catalyst Switches
To configure VTP, first configure the domain name you
want to use.
Once you configure the VTP information on a switch, you
need to verify the configuration.
CMC Limited
50. VTP Configuration on Catalyst Switches contd..
Configuring the Domain
When you create the VTP domain, you have the option to
set the domain name, password, operating mode, and
pruning capabilities of the switch.
Adding to a VTP Domain
You need to be careful when adding a new switch into an
existing domain.
If a switch is inserted into the domain and has incorrect
VLAN information, the result could be a VTP database
propagated throughout the internetwork with false
information.
CMC Limited
51. VTP Configuration on Catalyst Switches contd..
VTP Pruning
If you turn VTP pruning on in a VTP server, you turn it on
for the whole domain as well.
This will not send VTP broadcasts down a trunked link if no
VLANs configured on this switch are present down the link.
CMC Limited