1.fundamentals of Ethernet Switching
1.fundamentals of Ethernet Switching
1.fundamentals of Ethernet Switching
Fundamentals
1
Ethernet Switching
➢ Ethernet protocol is working at layer-2 of OSI Model.
➢ Ethernet switching means that the switch receives Ethernet frames on a certain port and
forwards it to appropriate port base on MAC address.
➢ If size of a transmitted frame is less than the minimum or greater than the maximum, the
receiving device drops the frame
Switching Method
➢ Store-and-Forward
▪ Store-and-Forward is that Store-and-Forward receives the whole frame before forwarding.
➢ Cut-Through:
▪ Cut-Through switching will begin forwarding the frame as soon as the destination address
is identified. Cut-through switching is enabled by default in Cisco switches.
Slides are created by Cisco Systems, Inc. & updated by BIM Trainings 4
Hubs
➢ Legacy
➢ Layer 1 devices
➢ Multi-port repeaters
➢ Shared bandwidth
Collision ➢ Half-duplex
➢ CSMA/CD
Sending host
➢ Layer 2 devices
➢ Dedicated bandwidth
➢ Full-duplex
➢ Image Unified network services: Combining the best elements of wireless and wired
networking allows you to consistently connect to any resource or person with any device. 10
Gigabit Ethernet technology and Power over Ethernet (PoE) technology support new
applications and devices.
➢ Image Integrated security: LAN switches provide the first line of defense against internal
network attacks and prevent unauthorized intrusion.
➢ Image Operational manageability: To more easily manage the network, IT staff must be able
to remotely configure and monitor network devices from a central location.
Functions of a Switch
➢ MAC Address Learning
▪ Remember the source hardware address an interface.
➢ Forward/Filter Decisions
▪ frame is only forwarded out the specified destination port.
➢ Loop avoidance
▪ Spanning Tree Protocol (STP) is used to stop layer-2 loops.
Media Access Control (MAC) address
➢ MAC address is unique and working at layer-2 of OSI model.
➢ 12-digit hexadecimal numbers (48 bits in length). The first 24 BITS is the ID of manufacturer
and the last 24 bits presents the serial number.
▪ Example – “00:60:2F:3A:07:BC” The prefix 00602F indicates Cisco.
How Does a Switch work?
MAC Address Tables on Connected Switches
MAC Address Tables on Connected Switches
S1 MAC Address Table S2 MAC Address Table
Port MAC Address Port MAC Address
Internet
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
A B C
X MAC
00-0D
MAC
00-0A
MAC
00-0B
MAC
00-0C
X
Destination MAC Source MAC
Type Data FCS
00-0B 00-0A
MAC Address Tables on Connected Switches
S1 MAC Address Table S2 MAC Address Table
Port MAC Address Port MAC Address
Internet
1 00-0A 1 00-0A
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
MAC
A B C 00-0D
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A
MAC
B
MAC
X MAC
C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A
MAC
B
MAC
X MAC
C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A
MAC
B
MAC
X MAC
C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
00-0D
A
MAC
B
MAC
X MAC
C
X
00-0A 00-0B 00-0C
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
S1 1 2 3 4 S2 1 2 3 4 1 Router
2
MAC
A B C 00-0D
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
The target IPv4 is not me.
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
The target IPv4 is not me. Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B The target IPv4 is me!
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
ARP Operation - ARP Reply
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B The target IPv4 is me!
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.50 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120 Here is my MAC address
PC-A’s ARP Cache B MAC 00-0B for the IPv4 address you
IPv4 Address MAC Address were looking for!
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120 Here is my MAC address
PC-A’s ARP Cache B MAC 00-0B for the IPv4 address you
IPv4 Address MAC Address were looking for!
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
192.168.1.50 00-0C
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Sender IPv4 Sender MAC
00-0A 00-0C 192.168.1.50 00-0C
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 192.168.1.50
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
192.168.1.50 00-0C
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
MAC 00-0D
Internet
R1
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
The target IPv4 is not me.
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address The target IPv4 is not me.
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Request
Destination MAC Source MAC Target IPv4 Target MAC
FF-FF 00-0A 192.168.1.1 ???
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
A C
192.168.1.110 192.168.1.50
192.168.1.1 MAC 00-0C
Here is myMAC
MAC00-0A
address for the
Default Gateway: 192.168.1.1 MAC 00-0D
IPv4 address you were looking
for! Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-0A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-0A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
192.168.1.1 00-0D
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Ethernet Header ARP Reply
Destination MAC Source MAC Target IPv4 Target MAC
00-00A 00-0D 192.168.1.1 00-0D
Ethernet Header IP Packet
On Destination MAC Source MAC Source IP Destination IP
Hold ??? 00-0A 192.168.1.110 10.1.1.10
192.168.1.120
PC-A’s ARP Cache B MAC 00-0B
IPv4 Address MAC Address
192.168.1.1 00-0D
A C
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
192.168.1.110 192.168.1.50
MAC 00-0A 192.168.1.1 MAC 00-0C
Default Gateway: 192.168.1.1 MAC 00-0D
Internet
R1
Emmalia
Lucia, I see by your address Santa Cruz, Ca
that you are somewhere
else. So I have to take your Rick
letter to the Post Office. Santa Cruz, Ca
Lucia Emmalia
Capitola, Ca Santa Cruz, Ca
• Even if two houses are on the same street, you only know the address
so must take it to the local post office
Configuring MAC Address Table in Cisco Switch
➢ Cisco switch dynamically builds the MAC address table by using the source MAC address of
frames received.
➢ By default in Cisco switch, dynamic MAC address aging time is 5 mins.
➢ Verify the MAC Address Configuration by using below commands
Command Purpose
switch# show mac-address-table aging-time Displays the MAC address aging time for all
VLANS defined in the switch.
switch# show mac-address-table Displays the contents of the MAC address
table.
Slides are created by Cisco Systems, Inc. & updated by BIM Trainings 63
Configuring MAC Address Table in Cisco Switch
➢ Configuring a Static MAC Address
Command Purpose
switch(config-)# mac-address-table Specifies a static address to add to the MAC
static mac_address vlanvlan- address table. If you enable the auto-learn option,
id { drop | interface { type slot / port } the switch will update the entry if the same MAC
| port-channel number } [ auto-learn ] address is seen on a different port.
Slides are created by Cisco Systems, Inc. & updated by BIM Trainings 64
Switch Performance
➢ Check below link for Cisco Switch throughput & performance
▪ http://kb.sleepyshark.com/article.php?id=100
➢ Mpps is how many packets the switch can forward per second.
➢ The switch fabric capacity(backplane), is the internal bandwidth that connects all the ports.
Slides are created by Cisco Systems, Inc. & updated by BIM Trainings 65