What You'll Learn in This Episode
This video breaks down the fundamental role of routers in networking, using a practical lab scenario where 'Johnny' wants to access a coffee website on a different network.
Why Switches Aren't Enough
- Switches connect devices within the same network using MAC addresses (Layer 2)
- Routers connect separate networks using IP addresses (Layer 3)
- Networks are defined by IP address ranges – devices in different ranges cannot communicate without a router. For more on how these devices differ, check out the Complete CCNA 200-301 Course: Network Devices & Fundamentals Explained.
The Router's Job: Connecting Networks
- Routers act as the gateway between different IP networks
- Each device has a default gateway (the router's IP on their network)
- When a device wants to reach an IP outside its network, it sends traffic to the gateway
Step-by-Step: How Johnny Gets Coffee
- ARP Discovery for Gateway: Johnny sends an ARP broadcast to find his router's MAC address
- Packet Forwarding: The router receives the packet, checks its routing table (
show ip route), and forwards it toward the destination network. This process relies on CCNA Routing Fundamentals: Connected and Local Routes Explained. - DNS Resolution: Johnny asks the DNS server for the IP address of networkchuck.coffee
- HTTP Request: After getting the IP, Johnny sends an HTTP GET request through the router to the web server
- Response: The web server responds, and the router forwards the reply back to Johnny
Key Networking Concepts Demonstrated
- ARP (Address Resolution Protocol): Maps IP addresses to MAC addresses on the local network
- Broadcast vs Unicast: ARP requests are broadcast; actual data frames are unicast
- Layer 2 vs Layer 3: Switches handle frames (MAC addresses); routers handle packets (IP addresses)
- Routing Tables: Routers maintain maps of networks (shown via
show ip routecommand) - DNS: Translates human-friendly domain names to IP addresses
Hands-On Lab Takeaways
- The lab uses Cisco Packet Tracer for realistic network simulation. If you need help getting started, see How to Use Cisco Packet Tracer for Network Simulation.
- Routers remember MAC addresses in cache (no need to re-ARP for each packet)
- Public internet routing is far more complex, involving many interconnected routers using protocols like BGP
Why This Matters
Every time you visit a website, this exact process happens:
- Your device (like Johnny) sends data through your home router
- The router forwards packets across multiple networks until reaching the destination
- Responses follow the reverse path back to you
Pro Tip: Try downloading the lab file (link in video description) and follow along in Packet Tracer to see each packet move in real-time! For a simpler starting lab, you can also try the Free Cisco CCNA Lab: Basic Router Security with Enable Password Encryption.
Continue Learning
This episode builds on foundational concepts from the first video. To see how switches fit into the picture, revisit CCNA Day 1: How Switches Work vs Hubs & Hands-On Packet Tracer Lab.
this is episode 2 of my free ccna course and a huge shout out to boson software the official sponsor of
the ccna course they are the reason this can be made available for free so i highly encourage
you to go check them out they have the absolute best ccna ccnp labs and practice exams
this is a router but what is it routers connect us to the internet they also connect this to other networks
in this video we're going to see why we need them and what they do in our networks
and why i have so many of them holy junk sauce and of course we're going to be lobbying
we're going to watch how a frame and then a packet will go across a network access a web server and then give us
information back this is how the internet works you're going to learn that today let's
get started [Music] oh by the way i'm giving away some bozon
netsim today on this video don't know what netsim is what's the best ccna and ccnp
labbing software in the business so if you're going for your ccna or ccnp enterprise or anything that you're doing
cisco it's what you want it's what you need i'm giving away five copies of any of those products
link below to enter the contest hurry up it's going away soon johnny wants some coffee and we're gonna
help him get it check this out in our last video we talked about this guy right here
a switch he's got multiple ports you connect your computers to him and they can talk and that's exactly
what's happening here johnny mark denny and lisa are all on the same network and the switch allows them to
talk to each other and in our last video we explored how the switch actually helps them talk
what goes on inside this thing and it's it's pretty cool but you see now johnny this is
this is johnny in real life he's a he's a raspberry pi johnny doesn't want to just talk to lisa mark and denny
johnny wants coffee the coffee is actually way over here on a completely different network and
johnny's over here not good right how does johnny get coffee and when i say johnny wants coffee of course he wants
to go out to networkchuck.coffee and order some coffee but this server where this website lives
networkchuck.coffee is on a different network here the switch can't help him he needs help from somebody else
he needs a router this guy right here oh this guy this is a cisco 2911 router one of my favorites oh it's beautiful
now routers come in all shapes and sizes this is just one type of cisco router this is a ubiquiti router looks very
different and then typically your home routers look nothing like what i just showed you a router is the perfect
solution for this because a router's job is to connect networks let's put one on there this is
actually a virtual version of a 2911 router look just like the one i showed you how neat
so we'll put the router in between and notice on a cisco router there's no ports on the front they're all in the
back so let me turn that slicker around now plug johnny's switch in to the router
and then i'll plug the copy network into the router as well let's do that in virtual world bam bam
and once more now before we keep going i want to ask you a question do we actually need this
router i mean why can't we just do this let's take away our connections
move this router out of the way and then let's just connect our switches directly to each other
that should work right no no well here's why i mean we could connect these two
switches and make them one giant switch and that's essentially what would happen but the reason these guys over here and
then my coffee server over here on different networks isn't because they're connected to two
different switches that's not it it's because of these guys right here their ip addresses we will go more in
depth on this later because there's a lot more to it but just know that when we talk about a network
we're normally referring to ip addresses and a group of ip addresses so notice i have two groups of ip
addresses here 10.1.1.0 through 10.1.1.255. with my configuration as long as you
have an ip address in that range you're on the same network now this right here 23.27.38.0 through 232738255
that's a completely separate network but you know what don't take my word for it let's actually try this let's see if
it'll work let's go back to packet tracer now as a quick 30 second refresher on how a
switch works we'll have johnny try to ping mark over here and then we'll have him try to ping my
copy server over here and see what happens so i'll click on johnny wake him up come on johnny let me get this stuff
out of the way we'll go to his desktop we'll go to his command prompt and let's bring up a simulation real
quick so we'll click on the simulation button at the bottom right so we can watch this stuff happen in
bullet time and i'm going to show you something that i did not show you on the last video
and that's how johnny will learn mark's mac address now why is it so important for johnny to learn
mark's mac address well if you recall from our last video the switch the only language he speaks is layer two
that's all he knows mac addresses this layer two address right here now when johnny pings mark
he's gonna be pinging his ip address so his message when he gets it ready we'll be pinging
10.1.1.2 if johnny were writing a letter that's what he would put as the address but if that's all johnny had when he
sent this message to the switch the switch would be like why is this envelope blank i can't even
see ip addresses who is this going to that's what would happen so johnny must know the mac address of mark
in order for the switch to know how to get it to anywhere but how this is what happens so from johnny i'm
going to ping mark's ip address 10.1.1.2 and boom let's watch what happens all right johnny's got some envelopes he's
ready to send them out these are frames right now notice we have a new message we're dealing with
it's called arp or addressed resolution protocol essentially it's a way that johnny can find out
what mac address is tied to 10.1.1.2 because he has to know that to be able to send it to mark let's open that up
and see what's inside let's click on that and again we're dealing with layer 2 mac
addresses but also notice down here we have some information about this arp packet like for example the source ip is
johnny's source ip 10.1.1.3 and then the destination ip right here 10.1.1.2 that's the missing mac address
he's trying to find out mark's mac address and then of course because this is a layer 2 frame we're talking about
mac addresses so the source mac address that the switch will use is johnny's mac address but then look at the destination
what the junk is that ffffffff this is what's called a broadcast address it's the layer 2 switch equivalent of someone
going who belongs to 10.1.1.2 when he sends it to that mac address
it's going to go out to everybody watch what happens we'll click next it goes to the switch let's open up that
packet and take a look or frame i'm sorry see it happens now look at this this is so cool so
over here the switch receives it and then it's about to send it out and notice
it's going to go out all these ports on layer one which remember layer one's the physical it's these
ah i just unplug something out oh that sound it's all the physical stuff so let's click next
and boom art message is going everywhere and what will happen is lisa will go oh i'm not 10.1.1.2 and neither
am i says denny but mark yeah mark is 10.1.1.2 so he says hey that's me i'm your guy i'm over here
johnny so we'll step forward in time mark is the only one who responds saying yes that is me so he'll send and then
the switch sends that to johnny so johnny now knows mark's mac address so we can send him a ping if i open that
frame up that's sent to the switch we see the source is johnny's mac address and the destination is
mark's mac address and if we click continue it'll go to mark mark will respond bam johnny gets it if
we check our terminal real quick our command prompt it's happening if you click real time it will just
continue so that's what happens when someone's on the same network johnny knows
that mark is on the same ip network but what happens when johnny tries to get to the network
coffee company let's see let's have him ping it so we'll open up johnny once more here
go to his command prompt and we'll ping the ip address of my copy server so ping 23.227.38.65
let's go to our simulation so we can watch this in real time and let's hit enter boom okay so far so
good we have an arp frame that johnny's getting ready to find out where my coffee server lives maybe his mac
address let's open it up and see click on that message and huh do you notice anything weird here you
know what pause the video right now and see if you notice anything that might be strange
unpause okay here we go so just like before johnny's sending a frame to a broadcast address to say hey
who's got this ip address but he's not asking about the ip address of my coffee server
no no look here this is a source ip this is his ip address but he's trying to discover the ip
address or the mac address rather of 10.1.1.1 why because when he tried to find out
mark's mac address this right here was 10.1.1.2 that was the destination why is this
different because johnny knows johnny knows the coffee server is not on his network
so he's not even gonna try to connect to that coffee server on layer two he's not gonna try to
discover his mac address he gives up immediately watch what happens let's step forward in time so johnny sends
this arp message saying anyone out there are you 10.1.1.1 and the switch will send this
out and as we step forward in time stepping forward stepping forward stepping
forward no one responds johnny keeps sending out arp request does anybody have 10.1.1.1
does anybody have it and no one responds who is 10.1.1.1 and why is johnny trying to talk to him
let's find out it comes down to how we configure johnny let's open up johnny real quick
go to his config and the answer is right here there it is 10.1.1.1 is his gateway gateway is
another word in the networking world we use for router as i said before johnny knows
that people in his network are 10.1.1.0 through 10.1.1
johnny knows that if anyone has an ip address in that range they're in his network
they're in his neighborhood he can just walk over and talk to him find out where they are like yeah i know bill he just
lives two doors down i can walk over there and talk to him but if johnny tries to reach an ip
address outside that range he knows it's not in his network and he's gonna need some help he needs help
connecting to a different network and that's where a router comes in so let's throw the router back in there and
have some fun this is gonna be so cool watch this now before we move on it's important for you to know that i did
pre-configure this router not a crazy amount of configuration but i did add some configuration to make this work
for the most part switches work out of the box no problem a router's a bit more complicated because it has to know how
to route between networks he's a router he has the map of how to get to things i'll
show you what i mean check this out we're going to have johnny here once again try to peeing
networkchuck.coffee let's open up his command prompt so i'll go to his command prompt we'll go back to our
simulation we're in simulation mode bullet time mode and let's watch some crazy router magic
happen so we're gonna ping the coffee server and go now same story as before johnny knows that this is not
on his network he knows that bob lives in another state and he can't just walk over there he's like i gotta use my
gateway i gotta find my router and his router will be connected to his network watch what happens a step forward in
time the art message is sent out to the broadcast and keep in mind the same reason that
johnny's sending an art packet for the router is the same reason he had to send one
for mark he doesn't know the mac address for 10.1.1.1 and he must know the mac address so the
switch will know how to get his stuff to the router the switch sends it out to everyone and lisa
denney mark this server right here which i can talk about here in a moment they're all like yeah that's not me but
then the router's like that's me i'm 10.1.1.1 and he sends a reply back saying yep that
is me the switch tells johnny hey this guy lives here that's his address walk on over so johnny does if we open
up that frame that just arrived at the switch we can see the source is indeed johnny
and the destination is the router and then we'll step forward in time it arrives at the router and
then we have something blinking and flashing let me let me zoom in on that this is so cool what's happening right
here let's open up the freaking out guy right now isn't that working fun oh my gosh okay
here's what's happening now what are the router receive right here well if you just look at layer one and layer two we
know that he received this frame on his gigabit zero zero interface as this little message says right here but
because we have layer three involved we know that to be called a packet remember that's what routers do man they
are all about layer three they are layer three devices they can handle the ip addresses
that's the language they speak so this is what the router received notice it's from
the mac address that belongs to johnny right here and it's to his interface but then look
what he's sending out and notice what's missing layer two now according to his layer
three map he knows that two two three.227.38.65 is that way but that's layer three he
doesn't know where he lives at layer two and because he's about to send this frame to the switch he doesn't know how
to tell the switch how to get to him and that's important and that's the reason we have this freak out message like i i
don't i don't know what his layer two address is so how does the router find out
well how did johnny find out an art message he says hey where is 23 blah blah and he
broadcast that out watch right next to the freakout message we have the art message right here
from the router to the broadcast and we're looking for anyone that has this ip address
anybody got this anybody out there and let's step forward in time and watch this happen
so he sends the art message to the switch the switch broadcast it out and because the server is the only one that
is on the network he receives it the server's like hey that's my name that's me i'm over
here so he sends the response to the switch the switch is like yeah i know where
this guy is hey router i found him i know that everyone knows where everyone is johnny's ready to send his message so
if you open up johnny's message over here i want you to pick up on this in the
layer 3 header johnny has his ip address as the source the coffee server as the destination but
on the layer 2 level we have his mac address as the source and then the destination is the mac
address of the router so layer 3 right here is directions for the router saying hey router this is
where i want my message to go and then layer 2 right here is directions for the switch saying hey
switch this is where i want my frame to go it's going to go to the router and the router will take care of the rest
let's watch it happen step forward in time the switch receives it if we open that message up we can see it's only
layer 2 because the switch can only see layer 2. it's going straight to the router so we
send it to the router this is so cool isn't it it's amazing let's open up that router's
message and look at that this is the message he received so layer two it's from mark's mac address
to his mac address layer three it's from mark's ip address to networkchuck.coffee's ip address and
now for the outbound message because he learned where the coffee server's mac address is
he can send it out so here's the layer three and then for the switch he's got the directions right here
from his mac address to the coffee server's mac address which ended in one ac7 if you look at that yet
it matches up right there let's watch it happen boom the switch sends it out and the
coffee server got it and then the coffee server replies and sends it back the router
sends it through the switch gets it and then johnny gets it isn't that amazing and this happens millions of
times every day across networks across the world isn't that just crazy now i want to show
you one more thing it's kind of a sneak preview to what we're going to be talking about later but obviously
johnny he wants to order some coffee from networkchuck.coffee but you can't order coffee
by just pinging the web server you have to visit the website and we can do that let's have johnny do that right now so
i'm going to reset everything and we'll get this thing ready this is going to be amazing
don't let this overwhelm you we will go over the details of how this works later on but i just want to i just want
to show you because it's so neat i i can't help myself so we're still in simulation mode let's open up johnny
real quick and instead of going to the command prompt we can go to his web browser so
i'll click on web browser right there and the website is network chuck dot coffee now the main difference here
is that we're not using an ip address at least to start with it's this friendly name that we know we normally
use like facebook.com youtube.com but how does that work we know the switch loves mac addresses
and that's what he talks that's the language he talks layer two the router loves layer three ip
addresses who deals with names like this well the short answer is no one johnny must know the ip address
or rather johnny's computer must know the ip address so when he types this networkcheck.coffee url in there's got
to be some way that his computer can find out what the real ip address is which we just pinged
moments earlier that's called dns and that's what our dns server here is for let's watch it happen
i'll click go and boom oh whoops i forgot to configure the dns server if i go to config
under his uh default gateway we have dns server which stands for domain name service
and i'll put in the ip address of our dns server up there 10.1.1.50 this guy right here so let's go back to
our our web browser and try it again go and here we go all over again we have another art packet because johnny
needs to get the information on networkchuck.coffee he needs to learn the ip address and he knows that this
server the dns server knows the information that's 10.1.1.50 and that's his first job so he has to go
through the process again of learning the mac address of the dns server let's walk through that now
stepping forward in time sends an art message the switch will broadcast that to everyone
the dns server responds because that's his ip address and he's like here's my mac address that's me
the switch sends that to johnny and johnny's like yes so now johnny can send his dns query to
find out where networkchuck.coffee is what's the ip address so he'll get that message ready so we
sends it out it goes to the dns server we'll take a quick little peek inside that real quick and we'll open that up
and a lot of stuff going on there that's the other layers we'll talk about don't worry about that but essentially
the server's like yeah i know where that is here you go johnny here's the information so he sends it to the switch
the switch sends it to johnny johnny learns where this is let's open it up real quick i'll show
you let's open that up and we'll go to the inbound pdu details again don't worry about that
just yet we'll scroll down all the way to the bottom we can see that the information
the dns answer is right here the name networkcheck.coffee and then here's the
response the ip address of our server so we'll step forward in time
johnny will send his http get request we'll cover more on that later to the router to the switch now what you
might be noticing is that we didn't go through the whole process of learning the mac address of the router and the
router learned the mac address of the the coffee server no no it remembered it puts that in its cache
and it stores it so we don't have to do it all over again now i will eventually forget that information so it can
relearn it but again more on that later so let's step forward in time it goes to the
server the server gets it responds back and you know what i'm going to switch to real
time let's open up our web page and there it is you need to drink coffee right now
and there's our website as you can tell it's been expertly designed and by the way that's real if you want to buy my
coffee network coffee it's delicious that's what i'm drinking right now
it's real now i've got this lab and a link below if you didn't follow along with me throughout this go and open it
now and try it for yourself it's really cool to walk through all this and just see it happen like this is
how the internet works this is what what happens when you get on your computer and you go to
youtube.com this process happens this right here is your home router
you're johnny now the real internet isn't this simple right the the real internet is a is
going to be like this router connected to another router connected to another
router connected to another router and then eventually getting to my coffee website as we covered in the first video
but the process is still the same the router is connecting these two separate networks i remember
when i say network i'm referring to the ip addresses layer 3. these guys over here have a different
group of ip addresses than these guys over here your home network will be a different group of ip addresses from
the rest of the world and that's why you need a router to connect to the internet and inside of this router's brain if you
pop him open he has a map to other networks and to the internet like you know let's take a look
let's have you enter another cisco cli command right now let's pop it open let's do this
i'm going to click on the router we'll jump on over to his cli tab we'll hit enter and then type in enable
to see his map his map of ip addresses and where to reach different networks we'll do
show ip route this is a command that network engineers use all the time you're already doing
networking right now let's hit enter and boom i'm going to expand this out a little bit here
and this might look a little overwhelming but here's all it's saying the group of ip addresses that johnny
belongs to is right here 10.1.1.0 24. that's just a shorthand way referring to
10.1.1.0 through 255. and in the router's map he knows that it's actually directly
connected to his interface gigabit ethernet one or i'm sorry zero zero and the same goes
for my coffee network over here there's the network and again it's a shorthand way of saying 23.227.38.03255. and
that's actually directly connected to gigabit 01. so when johnny said hey i want some coffee i want to order it
right now and he sent his packet to the router saying here it is i want to go to this
guy the router's like oh well let me check my map oh there it is there's the network it's
actually connected to my gigabit zero one interface i'm gonna send it out that interface
that's how the router knew now this is very simplistic routing routing gets crazy like if you were to look at a
router on the internet you know let me show you real quick this is actually one of the routers on the
internet check this out i'll enter the command show bgp which is a routing protocol
we'll learn more about those later ipv4 unicast and let's see what we got and all of
these are routes to different networks on the internet like i can keep going i mean look at this this is insane
this is this router's map this router is probably huge very expensive router but this is an example of a how
big the internet is and b what a router can do why it's so powerful all right we'll never reach the
end of this i'm just going to stop and that was episode two now i changed it from days to episodes
makes more sense for me if you have any comments or questions let me know below i would love to hear your feedback on
this if you need help don't be shy ask some questions below either myself or some
others will join in and help you out or hey join my discord we've got so many professionals in there who are willing
to help out with really any questions you have and if you want to help me do more of this
create free training along with david bomble check out the this is it membership link
below by joining you help us create more free content there's also some amazing content on the site
for myself david and and others coming very soon not to mention if you're a this is it army member you're gonna have
your names at the end of this video so look at it and if you haven't already try some networks coffee
the official copy of the ccna i'm gonna claim it that's what's happening right now
and of course a huge thank you to boson software for sponsoring this free ccna course they're the reason this can
be made free so go check them out and enter my contest below alright that's all i've got episode two
done i'll see you in episode three [Music]
A switch connects devices within the same network using MAC addresses at Layer 2, while a router connects separate networks using IP addresses at Layer 3. Routers are essential when devices are in different IP network ranges, as they can forward traffic between them using routing tables.
Each device is configured with a default gateway, which is the router's IP address on its local network. When a device wants to reach an IP outside its own network, it sends the traffic to the default gateway (the router), which then forwards it toward the destination.
ARP (Address Resolution Protocol) maps IP addresses to MAC addresses on the local network. Johnny sends an ARP broadcast to find the MAC address of his router (the default gateway), so he can encapsulate the packet into a frame and send it to the router.
The router receives the packet, checks its routing table (shown with 'show ip route'), and forwards it towards the destination network. Johnny also uses DNS to resolve the website's IP address, then sends an HTTP GET request through the router to the web server, which sends back a response.
Every time you visit a website, your device sends data through your home router, which forwards packets across multiple networks until reaching the destination. The same process happens in reverse for the response, making routers critical for all internet communication.
A routing table is a map maintained by the router that shows which networks are reachable and the best path to them. In the lab, the 'show ip route' command displays this table, allowing the router to decide where to forward packets based on the destination IP address.
The lab uses Cisco Packet Tracer, a network simulation tool. Key commands include 'show ip route' to view the routing table and ARP broadcasts to discover MAC addresses. Following along with the lab file helps visualize packet movement in real-time.
Keep this summary
Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.
Save to LunaNotesOr summarise for another video.
This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.
Related summaries
How Routers Work: Connecting Networks in Your CCNA Episode 2
Discover how routers connect different networks and enable internet communication in this second episode of a free CCNA course. Learn the step-by-step process of how data travels across networks using ARP, IP addressing, and routing, including a live demonstration of Johnny accessing a coffee website through a router.
CCNA Course Episode 2: How Routers Work and Connect Networks
In this episode, we explore the role of routers in connecting different networks, using a CCNA lab to demonstrate how data travels across networks. Learn how a switch and router work together to enable internet communication, from ARP requests to DNS queries and HTTP requests, with real-time packet tracer simulations.
CCNA Course Ep 2: How Routers Connect Networks & The Internet Works
In this free CCNA training episode, you'll learn why routers are needed to connect different networks and how they enable communication between devices on separate IP subnets. Watch a detailed simulation of ARP, DNS, and HTTP requests as a packet travels across a network to access a web server, demonstrating the complete process of how the internet works step-by-step.
CCNA Course: How Packets Flow Through the OSI & TCP/IP Models
In this episode, we follow a packet step-by-step across a network to see how each layer of the OSI and TCP/IP models works. Learn about encapsulation, de-encapsulation, and the roles of switches, routers, and protocols like TCP, UDP, and HTTPS in real-world data transfer.
CCNA Day 1: How Switches Work vs Hubs & Hands-On Packet Tracer Lab
Start your free CCNA course with a deep dive into how Ethernet switches work. Learn the key differences between smart switches and dumb hubs, visualize network traffic with Cisco Packet Tracer, and enter your first Cisco CLI command to view the MAC address table.
Most viewed summaries
A Comprehensive Guide to Using Stable Diffusion Forge UI
Explore the Stable Diffusion Forge UI, customizable settings, models, and more to enhance your image generation experience.
Kolonyalismo at Imperyalismo: Ang Kasaysayan ng Pagsakop sa Pilipinas
Tuklasin ang kasaysayan ng kolonyalismo at imperyalismo sa Pilipinas sa pamamagitan ni Ferdinand Magellan.
Mastering Inpainting with Stable Diffusion: Fix Mistakes and Enhance Your Images
Learn to fix mistakes and enhance images with Stable Diffusion's inpainting features effectively.
Pamamaraan at Patakarang Kolonyal ng mga Espanyol sa Pilipinas
Tuklasin ang mga pamamaraan at patakaran ng mga Espanyol sa Pilipinas, at ang epekto nito sa mga Pilipino.
How to Install and Configure Forge: A New Stable Diffusion Web UI
Learn to install and configure the new Forge web UI for Stable Diffusion, with tips on models and settings.
Found this summary useful?
Take it with you. One click puts it in your own LunaNotes library.
Save to LunaNotes