Everything Switches do - Part 1 - Networking Fundamentals - Lesson 4
Summary
TLDRIn this lesson, we delve into the intricacies of network switches, exploring their role in facilitating data communication within networks. We learn that switches, as layer 2 devices, rely on MAC addresses and operate based on a MAC address table. The video explains the three fundamental actions of switches: learning, flooding, and forwarding. These actions ensure efficient data transfer between devices on the same network. The lesson also touches on how switches handle communication with routers and the role of switch MAC and IP addresses in network management. This foundational knowledge is crucial for understanding network operations and is set to be expanded upon in subsequent lessons.
Takeaways
- π A switch is a networking device that facilitates communication within a network by moving data.
- π Switches operate based on MAC addresses and are not concerned with IP addresses when making forwarding decisions.
- π The MAC address table is crucial for switches as it maps switch ports to MAC addresses, helping them to direct traffic efficiently.
- π‘ The process of a switch learning the MAC addresses is automatic and begins with an empty table, which gets populated as data flows through the network.
- π Switches perform three primary actions: learning, flooding, and forwarding, which are fundamental to understanding how they operate.
- π The learning action occurs when a switch updates its MAC address table with the source MAC address of incoming frames.
- π Flooding is the process where a switch sends a frame out all ports except the one it came in on, when it doesn't know the destination MAC address.
- π Forwarding is when a switch sends a frame directly to the port associated with the destination MAC address in its table.
- π Understanding unicast, broadcast, and multicast are essential for grasping how switches handle different types of network traffic.
- π VLANs (Virtual Local Area Networks) can affect how switches operate, and understanding them is important for managing network traffic.
- π The MAC and IP addresses of a switch itself are only used for traffic directed to or from the switch, not for traffic passing through it.
Q & A
What is the primary function of a switch in a network?
-The primary function of a switch in a network is to facilitate communication by moving data within the network.
What are the two types of addresses required for hosts to communicate through a switch?
-For hosts to communicate through a switch, they each need IP addresses and MAC addresses.
What is the IP network that all devices connected to a switch must belong to?
-All devices connected to a switch must belong to the same IP network, in this case, it is the 10.11.x network.
How does a switch determine where to send a frame when it first receives it?
-When a switch first receives a frame, it does not know the destination MAC address, so it uses the flooding action to send the frame out all ports except the one it came in on.
What is the purpose of a MAC address table in a switch?
-A MAC address table in a switch is a mapping of switch ports to MAC addresses, which helps the switch to learn and forward frames to the correct destination.
What are the three actions a switch performs to facilitate communication?
-The three actions a switch performs are learning, flooding, and forwarding. Learning updates the MAC address table, flooding sends a frame out all ports except the incoming one, and forwarding sends a frame directly to the destination port.
Why does a switch not forward a frame back out the port it arrived on?
-A switch does not forward a frame back out the port it arrived on because it assumes that if the frame arrived on a particular port, the destination is unlikely to be on the same port.
How does a switch update its MAC address table?
-A switch updates its MAC address table by learning the source MAC address of each frame it receives and associating it with the port on which the frame arrived.
What happens when a switch receives a frame with a destination MAC address it knows?
-When a switch receives a frame with a destination MAC address it knows, it performs the forwarding action, sending the frame directly out the port associated with that MAC address.
How does the process of a switch facilitating communication apply to a router?
-The process of a switch facilitating communication applies to a router in the same way it does to hosts. The switch does not look at the Layer 3 header, so whether the destination is a host or a router, the process remains the same.
Why might a switch's own MAC and IP addresses be involved in network communication?
-A switch's own MAC and IP addresses would be involved if you are trying to send traffic directly to or from the switch, such as for management purposes using Telnet or SSH.
Outlines
π Introduction to Switching and MAC Addressing
This paragraph introduces the fourth lesson of a networking fundamentals course, focusing on switches and their role in facilitating communication within networks. The instructor explains that switches are devices designed to move data and that they operate based on rules of switching. It's emphasized that for hosts to communicate through a switch, they must be on the same IP network. The lesson aims to illustrate how a switch enables communication between two hosts, detailing the process of data transmission and the importance of IP and MAC addresses. The switch's operation is described as being based on a MAC address table, which it uses to learn, flood, and forward frames, which are the three fundamental actions of a switch.
π The Learning, Flooding, and Forwarding Actions of a Switch
The second paragraph delves into the mechanics of how a switch operates through learning, flooding, and forwarding actions. The learning action involves the switch updating its MAC address table with the source MAC address of incoming frames. Flooding occurs when the switch does not know the destination MAC address and sends the frame out all ports except the one it came in on, ensuring the frame reaches its intended recipient. Forwarding is the process where the switch, now aware of the destination MAC address from its table, sends the frame directly to the appropriate port. The paragraph also discusses how responses are handled once the MAC address table is populated, allowing direct communication between hosts without unnecessary flooding.
π Switch Communication and MAC Address Table Utilization
The final paragraph wraps up the discussion on switches by emphasizing that they use and maintain a MAC address table for mapping switch ports to MAC addresses. It reiterates that switches perform only three actions: learning, flooding, and forwarding. The paragraph also touches on the applicability of these principles to different network devices, including routers, and explains that the switch's MAC and IP addresses are only relevant when directly communicating with the switch itself, such as for management purposes. The instructor concludes by summarizing the key takeaways and previews the topics for the next lesson, which will cover unicast flooding, VLANs, and communication across multiple switches.
Mindmap
Keywords
π‘Switching
π‘MAC Address
π‘IP Address
π‘Layer 2 Header
π‘ARP (Address Resolution Protocol)
π‘MAC Address Table
π‘Learning
π‘Flooding
π‘Forwarding
π‘VLANs (Virtual Local Area Networks)
Highlights
Introduction to Lesson Four on networking fundamentals focusing on switches.
Switches facilitate communication within networks by moving data.
A switch is a device whose primary purpose is switching.
Devices connected to a switch must belong to the same IP network.
Hosts require IP and MAC addresses to communicate through a switch.
Switches operate based on Layer 2 headers, ignoring Layer 3 headers.
Illustration of how a switch enables communication between Host A and Host D.
Switches use MAC address tables to map switch ports to MAC addresses.
MAC address table starts empty and is populated as data flows through the switch.
Switches perform three actions: learning, flooding, and forwarding.
Learning action updates the MAC address table with the source MAC address of received frames.
Flooding action duplicates frames and sends them out all ports except the receiving port.
Forwarding action delivers frames directly to the appropriate switch port based on the MAC address table.
Once the MAC address table is populated, communication between hosts is direct, bypassing flooding.
The process is the same whether Host A is speaking to another host or sending to a router for external communication.
Switches have MAC and IP addresses, but these are only used for direct communication with the switch itself.
Summary of key takeaways: understanding MAC address tables and the three actions of switches.
Anticipatory teaser for the next lesson covering unicast flooding, VLANs, and communication through multiple switches.
Transcripts
hello welcome to lesson four
of module one of my new course on
networking fundamentals
in this lesson we're going to be picking
apart switches and we're going to show
you
everything a switch does to facilitate
communication
as we discussed in the first lesson
switching is the process of moving data
within networks and a switch is simply a
device whose primary purpose
is switching we're about to show you an
illustration of a switch
and everything it does to funnel
communication between these hosts
but it's important to understand
anything that claims to do switching is
going to operate the way we describe a
switch to operate
we are simply going to be describing the
rules of switching
for these hosts to communicate with one
another they each need ip addresses and
mac addresses
now since a switch only facilitates
communication within a network
this tells us that all of these devices
that are speaking through the switch
must belong to the same ip network in
this case that ip network is the 1011.x
network
in this lesson we can illustrate
everything that the switch does to
enable communication between host a
and host d now in the last lesson we
described the host
role in all this we described that the
host is going to generate some data
to send a host d and then add a layer 3
header to that data which includes the
source of host a
and a destination of hostd's ip address
then host a is going to perform arp
to figure out the mac address which
correlates to that destination ip
address
then host a is going to add a layer 2
header which indicates host a's mac
address and host d's mac address
all of that we described in the last
lesson and all of that still applies
in this lesson we're just going to be
focusing on the switch
and if you recall a switch is a layer 2
device which means they're only going to
be using the layer 2 header to make
their decisions
which means the switch doesn't look at
the layer 3 header at all
in fact everything after the layer 2
header from the perspective of the
switch
is simply considered data you and i know
there's a layer 3 header in here but
from the switches perspective
it doesn't care about that layer 3
header it's just going to make the
decision
based upon the layer 2 header in fact we
can actually get rid of
anything ip related on this topology
because if all we're doing is focusing
on the switch
we don't actually need to consider the
ip addresses that are communicating
we're going to show you everything that
happens to get this data to host d
through the switch now i want to point
out that we are starting from the
position that host
a already knows the mac address it's
trying to speak to normally host a would
have to discover this using arp
but for our illustration we're going to
assume host a
already knows the mac address it's
trying to speak to so we can leave arp
out of this illustration entirely
with that said let's go ahead and
explain how switches facilitate
communication
within networks switches use and
maintain
a mac address table a mac address table
is a mapping of switchboards to mac
addresses
each of the hosts in our topology are
plugged into this switch in a particular
port
for instance host c is plugged into port
6. now every different switch out there
uses different numbering schemes for
their ports for the sake of
illustrations i'm just going to use
these numbers
5 6 7 and 8. a mac address table then is
going to include
the mapping of a particular switch port
and the device that's connected to that
port
meaning it's going to know that out port
7 exists a device with the mac address
b2b2
now this mac address table doesn't start
out populated in fact it starts out
empty and as data is flowing through
this topology the switch will populate
this mac address table
beyond this mac address table the switch
is only ever going to perform
three actions learning flooding
and forwarding if you understand these
three actions
then you'll understand how switching
works every switch you come across
regardless of the platform regardless of
the vendor regardless of the code
version is only going to do
three actions these are actually the
rules of switching in general
so let me show you how they work so host
a is going to start
by putting this information on the wire
that will arrive on the switch on port 5
and this is going to allow the switch to
perform its first
action which is to learn the learning
action
has the switch update its mac address
table with a mapping of the switch port
and the source mac address of the
received frame
meaning on port 5 this switch just
received a frame
with a source mac address of a1a1 which
allows the switch to update its mac
address table
indicating that the device on port 5
owns the mac address a181
that is the learning action and the
switch is going to try to learn
the source mac address for every frame
the switch receives
now the switch has to figure out what
it's going to do with this frame
it's going to look at the destination
address of that frame to determine that
this is meant to be delivered
to the device that has the mac address
d4 d4
you and i know that that device exists
over here but this mac address table
lists everything that the switch knows
so at this point in time the switch does
not know
what port the mac address d4 d4 exists
out of
which means the switch's only option is
to duplicate that frame
and send it out all ports this is the
only way the switch can ensure
that whatever owns that mac address does
get this frame
and notice that the switch did not
forward the frame back out port 5.
when it duplicates the frame and sends
it out all ports it's going to set it
about all ports
except the port that received the frame
initially the idea there is that if this
frame
arrived on port 5 there's a good chance
that the destination does not exist back
out port 5.
so that is the flooding action and all
other hosts in this network are going to
receive a copy
of this frame and when host b and host c
receive this frame
they're going to look at the destination
mac address to determine that they are
not the intended recipient for that
frame they are therefore simply going to
silently discard that frame
host d however will be looking at the
destination mac address to realize it
is destined to host d and host d will
accept that frame for processing
and that is how data will get from host
a to host d
now inevitably host d is going to
generate a response to send back to host
a
this response is going to have a source
mac address of hostd's mac address and a
destination mac address host a's mac
address
host d is going to put this response on
the wire where it'll arrive on the
switch on port 8.
this will allow the switch to once again
perform its learning action
it's going to update its mac address
table indicating that something just
arrived on port 8
with a source mac address of d4 d4 this
allows the switch to create this
mapping now the switch is going to try
and figure out what it's going to do
with this frame
and once again it's going to look at the
destination mac address a1a1 to
determine
where to send this frame next the
difference however
is that now the switch knows how to
deliver a frame
to a1a1 it knows that a1a1
exists out port 5 this will allow the
switch to simply forward
that frame out the appropriate switch
port
that is the third action of the switch
the forwarding action
the forwarding action allows the switch
to deliver a frame directly to the
appropriate switchboard
because the destination mac address
exists in the mac address table
this will allow the switch to send that
frame directly to host a
and that is how the response data will
go from host d
to host a now at this point
anything else that a and d need to send
to each other will simply go
directly to each other now that the mac
address table is populated with either
of those host's mac address
anything a and d send to each other is
going to go directly to each other
without having to do the flooding action
which means host c
and host b will not get a copy of any of
that data
and that wraps up our discussion of how
switches work
again switches use and maintain a mac
address table which is a mapping of a
switchboard to a mac address
and switches perform only these three
actions if you understand these three
actions
you now understand how any switch for
any vendor
on any platform facilitates
communication within
a network but before i let you go
there are two more ideas i want to leave
you with
our illustration involved host a sending
a packet to another host
but everything we just showed you would
still apply if this wasn't actually a
host and it was instead
a router and host a was trying to send
something to the router
in order to speak to something else out
on the internet
the only thing that would be different
would be the layer 3 header and as we
discussed the switch doesn't even look
at the layer 3 header to do its job
which means this process is exactly the
same whether host a is speaking to
a host on the local network or trying to
send something to a router in order to
speak to something on a foreign network
the second idea i want to leave you with
is that we showed you how traffic flows
through the switch we illustrated host a
sending something through the switch
initially to host d
understand that switches have mac
addresses again any nic
has a mac address but you'll notice that
this mac address was completely
uninvolved
for any communication going through the
switch
but what if you wanted to send something
to the switch
well if you're trying to send something
to the switch then this mac address
would be involved
but not only would the switch need a mac
address it would also need an ip address
and at this point if you've configured
an ip address on the switch
and you're trying to send traffic to the
switch the switch is essentially acting
as a host on the local network it's
going to follow
all the rules that we described in the
prior lessons that hosts follow
in order to communicate on a network the
switch's mac address
and also its ip address will only be
used if you're sending traffic to
or receiving traffic from the switch
perhaps you're trying to log into the
switch using telnet or ssh in order to
manage the switch but for any traffic
going
through the switch the switch mac
address and
ip address will be completely uninvolved
in the process
the switch is merely going to perform
these actions over here
in order to facilitate communication
within the network
and that wraps up part one of our lesson
on switches
in the next lesson we're going to unpack
three more ideas
we're going to describe unicast flooding
and explain how that's different from a
broadcast
we're going to briefly define vlans and
show you how these actions are different
or not if vlans are being used and
finally we're going to show you
how communication flows through multiple
switches showing you
how these actions are still the same
regardless of how many switches
data is flowing through either way your
key takeaways from this lesson are
understanding these first two bullets up
here
i hope you enjoyed this video i want to
thank you for watching and we'll see you
in the next one
hey youtube i hope you enjoyed that free
lesson for my new course on networking
fundamentals
i'll be releasing the entire first
module for free here on youtube
i want this course to be the ultimate
networking fundamentals course and since
i'm still scoping out the outline you
could have a say in what topics will be
covered
let me know in the comments below what
subjects you want included in this
course
otherwise remember to like and subscribe
and of course if you learned something
from this video the best way to thank me
is to share this video
it's a small act of gratitude but one i
appreciate greatly
i hope you enjoyed this lesson i want to
thank you for watching and we'll see you
in the next one
Browse More Related Video
Network Switching Overview - CompTIA Network+ N10-007 - 1.3
Layer 2 vs Layer 3 Switches
Hub, Switch, & Router Explained - What's the difference?
Everything Hosts do to speak on the Internet - Part 2 - Networking Fundamentals - Lesson 3
Network Devices
OSI Model: A Practical Perspective - Networking Fundamentals - Lesson 2a
5.0 / 5 (0 votes)