Everything Hosts do to speak on the Internet - Part 2 - Networking Fundamentals - Lesson 3

Practical Networking
14 Jan 202109:51

Summary

TLDRThis lesson from the networking fundamentals course delves into how hosts send data on the internet. It builds upon previous concepts, focusing on host communication within the same network and with foreign networks. The video explains the importance of ARP cache, demonstrating how hosts use it to resolve MAC addresses for local and foreign network communication. It also clarifies the role of subnetting in determining network boundaries and the necessity of knowing a router's IP address as the default gateway. The lesson is crucial for understanding how data moves across networks and the foundational steps hosts take to communicate effectively.

Takeaways

  • 🌐 The course module covers how data flows through the internet, focusing on hosts and their communication.
  • πŸ”‘ It's essential to watch previous lessons for foundational concepts before diving into this video.
  • πŸ“‘ Hosts use IP and MAC addresses to identify and communicate with each other on the network.
  • πŸ›‚ The subnet mask defines the size of a network, and subnetting is crucial for understanding how hosts determine the network they belong to.
  • πŸ“¨ Hosts use ARP (Address Resolution Protocol) to resolve the MAC address of the next hop, which is necessary for sending data.
  • πŸš€ When communicating with a foreign network, hosts use their default gateway's IP address, which is configured as the router's IP address.
  • πŸ“¬ ARP cache is vital for hosts to keep track of IP-to-MAC address mappings for efficient communication.
  • πŸ”„ Once the ARP cache is populated, hosts can reuse the MAC address for the default gateway to communicate with any host on foreign networks.
  • πŸ“ The lesson emphasizes the importance of understanding how layer 3 (IP) and layer 2 (MAC) headers are used in data transmission.
  • πŸ” The next lesson will explore the roles of switches and routers in facilitating network communication.

Q & A

  • What is the main focus of the first module in the networking fundamentals course?

    -The first module of the networking fundamentals course focuses on teaching how data flows through the internet.

  • What is recommended before watching this particular video lesson?

    -It is recommended to have watched lesson 1 and lesson 2 from the series, as this lesson elaborates on many concepts introduced in prior lessons.

  • What is the purpose of the subnet mask mentioned in the script?

    -The subnet mask defines how big a particular network is, and it is a function of subnetting.

  • What is an ARP cache and why is it important?

    -An ARP cache is a table that stores the IP address to MAC address mappings for network devices. It is important because it allows a host to communicate with other devices on the network by resolving their MAC addresses.

  • How does a host know if it needs to communicate with a device on a foreign network?

    -A host determines if it needs to communicate with a device on a foreign network by comparing its own IP address and subnet mask with the target IP address.

  • What is the role of a default gateway in a host's network communication?

    -The default gateway is the IP address of the router that a host uses to communicate with devices on foreign networks. It is configured on the host and used to resolve the router's MAC address via ARP.

  • Why does a host need to create a layer 3 header when sending data to another host?

    -A host needs to create a layer 3 header to identify the source and destination IP addresses for the communication, which is necessary for routing the data to the correct destination.

  • What is the purpose of the layer 2 header in the context of the video?

    -The layer 2 header is used to facilitate the hop-to-hop delivery of packets within a network, directing the data to the next device in the path, such as a router.

  • How does a router handle the packet once it receives it from a host?

    -Upon receiving a packet, a router discards the layer 2 header, which was used to get the packet to the router, and then it takes over to route the packet to the next hop, which could be another router or the final destination.

  • What is the significance of the ARP entry for the default gateway?

    -The ARP entry for the default gateway is significant because once resolved, it can be reused for all communications with hosts on foreign networks, simplifying the process of sending data off the local network.

  • What will be the focus of the next lesson according to the script?

    -The next lesson will focus on everything switches and routers do to facilitate communication within and between networks.

Outlines

00:00

🌐 Understanding Host Communication on the Internet

This paragraph introduces the topic of how hosts communicate over the internet, focusing on the process of sending data from one host to another on different networks. It emphasizes the importance of understanding the basics of networking fundamentals, particularly the role of hosts in data transmission. The lesson builds upon previous lessons and introduces the concept of routers and subnetting. The video explains that hosts use both MAC and IP addresses to communicate and that the ARP cache is essential for resolving IP addresses to MAC addresses. It also touches on the concept of subnet masks and how they define network sizes, noting that subnetting will not be covered in this module. The lesson concludes with a demonstration of how Host A communicates with Host C on a foreign network, illustrating the process of creating layer 3 and layer 2 headers and the use of ARP to resolve the router's MAC address.

05:00

πŸ”„ The Role of ARP in Network Communication

This paragraph delves into the role of the Address Resolution Protocol (ARP) in facilitating communication between hosts on different networks. It explains how ARP is used to resolve the MAC address of the default gateway when a host needs to communicate with a host on a foreign network. The paragraph also discusses the process of creating layer 2 headers for data packets, which are necessary for hop-to-hop delivery. The video script illustrates how once a host has resolved the MAC address of the router, it can reuse this information to communicate with any host on foreign networks, highlighting the efficiency of the ARP process. The lesson wraps up by emphasizing the importance of understanding how hosts communicate with other hosts on both local and foreign networks, and how ARP plays a crucial role in this process. The next lesson is teased, focusing on the functions of switches and routers in facilitating network communication.

Mindmap

Keywords

πŸ’‘Networking Fundamentals

Networking Fundamentals refers to the basic principles and concepts that underpin the operation of computer networks. In the context of the video, this term is central as the entire course is dedicated to teaching these foundational aspects. The video script discusses how data flows through the internet, which is a fundamental concept in networking.

πŸ’‘Data Flow

Data Flow is the movement of data from one point to another within a network. The video script explains how hosts send data on the internet, which involves understanding the path data takes as it traverses networks, a fundamental aspect of networking.

πŸ’‘Hosts

In networking, a host is a device connected to the network that is capable of sending or receiving data. The video script discusses the actions hosts take to send data, emphasizing the role of hosts in networking communications, particularly when communicating with other hosts on the same or different networks.

πŸ’‘Internet Protocol (IP) Address

An IP address is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. The script mentions that hosts and routers have IP addresses, which are essential for identifying devices on a network and facilitating communication.

πŸ’‘MAC Address

A MAC address is a unique identifier assigned to network interfaces for communications on the physical network segment. The video explains that hosts and routers have MAC addresses, which are used at the data link layer of the OSI model to communicate within a local network.

πŸ’‘Subnet Mask

A subnet mask is used to divide the IP address into the network address and the host address, allowing the system to determine whether the destination IP is on the local or foreign network. The script uses the subnet mask to illustrate how hosts determine the network size and the need to communicate through routers.

πŸ’‘ARP Cache

The ARP cache is a table used to store the mapping of IP addresses to MAC addresses. The video script explains that hosts use the ARP cache to keep track of the MAC addresses associated with known IP addresses, which is crucial for sending data to the correct destination.

πŸ’‘Layer 3 Header

A Layer 3 header, also known as an IP header, is part of the IP packet format and contains information necessary for routing the packet to its destination. The video script describes how hosts create a Layer 3 header with source and destination IP addresses to identify the endpoints of communication.

πŸ’‘Layer 2 Header

A Layer 2 header, specifically an Ethernet header, is used to encapsulate the IP packet for transmission at the data link layer. The script explains that the Layer 2 header is used to get the packet from one hop to another, such as from a host to a router.

πŸ’‘Router

A router is a networking device that forwards data packets between computer networks. The video script discusses the role of routers in facilitating communication between networks, particularly when a host is trying to communicate with a host on a foreign network.

πŸ’‘ARP Request

An ARP request is a type of message used to request the MAC address associated with a given IP address. The video script illustrates how hosts use ARP requests to discover the MAC address of the router when the ARP cache does not already contain this information.

πŸ’‘Default Gateway

The default gateway is the IP address of the router on a local network. The script explains that hosts are configured with a default gateway, which is used to send traffic destined for foreign networks, highlighting the importance of this configuration in network communication.

Highlights

Introduction to the course on networking fundamentals focusing on how data flows through the internet.

Lesson prerequisites include watching lesson 1 and lesson 2 for foundational concepts.

Illustration of how hosts communicate within the same network, emphasizing the role of MAC and IP addresses.

Explanation of subnet masks and their function in defining network size, with a note on subnetting.

ARP cache's importance in identifying IP addresses with MAC addresses for communication.

Host A's process of sending data to Host C on a foreign network, involving creating a Layer 3 header.

Understanding how Host A determines if Host C's IP address is on a foreign network through subnetting.

The necessity for Host A to create a Layer 2 header for hop-to-hop delivery to the router.

Host A's use of ARP to resolve the MAC address of the router when the ARP cache is empty.

The configuration of a default gateway on Host A and its significance in network communication.

Demonstration of how Host A populates its ARP cache with the router's MAC address.

The role of the router in discarding the Layer 2 header and facilitating further data transmission.

Highlighting the reusability of the ARP entry for communication with any host on foreign networks.

Explanation of how the Layer 2 header remains the same for communication with any host on a foreign network.

The critical role of ARP in determining if the target IP is on the local or foreign network.

Summary of the lesson's key points: understanding host communication on local and foreign networks and the role of ARP.

Anticipation of the next lesson focusing on the functions of switches and routers in network communication.

Invitation for viewers to participate in shaping the course content by commenting on desired topics.

Encouragement for viewers to like, subscribe, and share the video as a form of appreciation.

Transcripts

play00:00

hello welcome to another lesson from my

play00:02

course on networking fundamentals

play00:04

the first module of this course will

play00:06

teach you everything you need to

play00:07

understand how data flows through the

play00:09

internet

play00:10

in this video we're going to continue

play00:12

our lesson discussing everything hosts

play00:13

do

play00:14

to send data on the internet and before

play00:17

watching this video

play00:18

it is recommended to have watched lesson

play00:19

1 and lesson 2 from the series

play00:21

this lesson uses and elaborates on many

play00:23

of the concepts introduced from prior

play00:25

lessons

play00:26

also you should have already watched

play00:27

part 1 of this lesson this video is a

play00:29

direct continuation

play00:31

in part 1 of this lesson we illustrated

play00:33

everything hosts do to communicate to

play00:35

other hosts on the same network

play00:37

in this video we're going to add a

play00:38

router and we're going to show you

play00:40

everything a host does

play00:41

when trying to communicate with another

play00:43

host on a foreign network

play00:46

we're going to use this topology to show

play00:48

you everything host a does

play00:50

to send data to host c both of our hosts

play00:54

and our router has a mac address and ip

play00:56

addresses

play00:58

and once again i'm only showing you the

play01:00

short version of the mac address to

play01:01

conserve

play01:02

screen real estate this slash 24 you see

play01:05

on all of them

play01:05

is simply another way of representing

play01:07

this subnet mask

play01:09

and again the subnet mask simply defines

play01:11

how big a particular network

play01:13

is all of this is a function of

play01:15

subnetting and once again we are not

play01:17

going to be covering subnetting in this

play01:18

module

play01:19

in the first part of this lesson we

play01:21

mentioned that anything with an ip

play01:22

address has an arp cache

play01:24

well host a the router and host c all

play01:27

have an ip addresses so all three of

play01:28

them

play01:29

have an arp cache but this video we're

play01:31

going to be focusing on host a so we're

play01:33

only going to show you host ace arp

play01:35

cache and we're going to show you its

play01:36

functionality as host a

play01:38

has some data to send to host c host a

play01:42

already knows

play01:42

host c's ip address we mentioned some

play01:45

reasons for this

play01:46

in the last video but essentially that

play01:48

ip address could have been provided by

play01:49

the user

play01:50

or provided by the application that is

play01:52

creating this data that is meant to be

play01:54

sent to host

play01:55

c one way or another host a already

play01:57

knows the ip address it's trying to

play01:59

speak to you

play02:00

but in particular host a knows that that

play02:02

ip address is on a foreign network

play02:04

it's going to know this by looking at

play02:06

its own ip address and subnet mask

play02:08

and comparing it with a target ip

play02:09

address that's how it's going to know

play02:11

this ip address is on a foreign network

play02:14

now once again

play02:14

all of that is done through the magic of

play02:16

subnetting and if you're interested in

play02:17

knowing how that works check out the

play02:19

videos at subnet ipv4.com

play02:21

but in so far as this video go ahead and

play02:23

take my word for it that host c's ip

play02:25

address is indeed on a different network

play02:27

than host a's ip address

play02:29

either way since host a knows the ip

play02:32

address it's trying to speak to

play02:33

host a is able to create a layer 3

play02:35

header identifying the two endpoints of

play02:37

this communication

play02:39

that layer 3 header is going to have a

play02:40

source ip address of host a

play02:42

and a destination ip address of host c

play02:46

next host a needs to create a layer 2

play02:48

header the purpose of the layer 2 header

play02:51

is going to be to take the packet from

play02:53

hop

play02:53

to hop in this case since the target we

play02:56

are trying to speak to is on a foreign

play02:58

network

play02:58

our next hop is going to be the router

play03:02

meaning the purpose of this layer 2

play03:03

header is going to be to get this packet

play03:05

to the router the problem is at this

play03:08

point in time

play03:09

since host a's arp cache is empty host a

play03:12

is unable to complete the layer 2 header

play03:15

that'll take this packet to the router

play03:17

host a

play03:18

just like before is going to have to use

play03:20

arp to resolve the mac address of the

play03:23

router

play03:24

but there's something we have to mention

play03:26

how does host a

play03:27

even know the router's ip address well

play03:30

the answer to that is that the router's

play03:32

ip address is already configured on host

play03:34

a

play03:35

as host a's default gateway

play03:38

when you connect a computer to the

play03:40

internet there are three things that you

play03:41

have to configure

play03:42

an ip address a subnet mask and a

play03:45

default

play03:46

gateway on a windows computer if you

play03:48

type ipconfig into the command prompt

play03:50

you'll see all three of these things

play03:52

listed here i'm showing you

play03:54

exactly what it might look like on host

play03:56

a itself notice the ip address matches

play03:58

host a's ip address

play03:59

the mask is a slash 24 mask and in

play04:01

particular the default gateway is

play04:03

highlighting the ip address of our

play04:04

router

play04:05

that's how host a knows the router's ip

play04:08

address

play04:08

because it's been configured as its

play04:10

default gateway

play04:12

that's the ip address that host a is

play04:13

going to have to resolve with arp

play04:15

so just like we mentioned in the last

play04:17

lesson host a is going to shoot out an

play04:19

arp request

play04:20

that arp request is going to ask for the

play04:22

mac address that correlates to a

play04:24

particular ip address

play04:26

and again host a is going to include its

play04:28

own arp mapping

play04:29

in the request itself that arp request

play04:32

is going to get to the router and then

play04:33

the router is going to generate a

play04:35

response

play04:36

that response is going to include the

play04:38

mapping that host a was interested in

play04:40

learning

play04:40

the ip address 10.1.1.1 maps to the mac

play04:44

address e5e5

play04:46

and when that arp response arrives on

play04:48

host a

play04:49

host a is able to populate its arp cache

play04:52

with the mapping for its default gateway

play04:55

it can then use this mapping to complete

play04:58

the layer 2 header

play05:00

the destination mac address for that

play05:01

layer 2 header is going to be

play05:04

the router's mac address this will allow

play05:07

this header to handle hop to hop

play05:10

delivery

play05:10

of this packet and now

play05:14

that data can finally be sent across the

play05:16

wire

play05:17

where it will be received by the router

play05:20

upon receiving this the router is going

play05:22

to discard the layer 2 header

play05:24

the whole purpose of that header was to

play05:26

get this packet

play05:27

from host a's nick to the router snake

play05:31

that header did that successfully and

play05:32

can go and retire happily in header

play05:34

heaven

play05:35

and at this point the router is going to

play05:37

take over presumably

play05:39

the router is going to add layer 2

play05:40

headers as necessary

play05:42

to get the packet across the next hop

play05:45

whether that hop is directly to host c

play05:48

or whether that hop is across multiple

play05:50

routers on the internet

play05:52

one way or another from host a's

play05:54

perspective the job is done

play05:56

it did everything it needed to do to get

play05:59

the data

play05:59

to the router and from here we're just

play06:01

going to hope that the router can do the

play06:03

rest of the work to get it

play06:04

all the way to host c now

play06:08

i want to highlight something important

play06:09

for you this arp entry

play06:12

that host a resolved in order to get the

play06:14

packet

play06:15

to the router can be reused to speak to

play06:17

any host

play06:18

in foreign networks so let me show you

play06:20

what i mean by that

play06:22

so here again is the layer 3 and layer 2

play06:24

header that were used to get this data

play06:26

to host c

play06:28

and let's go ahead and add other hosts

play06:29

to our topology

play06:31

let's say now host a is going to be

play06:33

trying to speak to host

play06:34

d well since this is a new endpoint

play06:37

we're going to need

play06:38

a new layer 3 header this layer 3 header

play06:40

is going to have a source ip address of

play06:42

host a

play06:42

as before and of course a destination ip

play06:45

address of host d

play06:46

but notice the layer 2 header doesn't

play06:48

change host a's first hop is

play06:51

always going to be to the first router

play06:53

and therefore

play06:54

the source mac address and destination

play06:56

mac address are always going to identify

play06:58

those two nics so this arp

play07:01

process that we had to go through to

play07:03

resolve the router's ip address really

play07:05

only needs to happen

play07:06

once once host a knows the router's mac

play07:08

address

play07:09

it can reuse that mac address to speak

play07:11

to any host on a foreign

play07:13

network in all cases the layer two

play07:15

header is going to look

play07:16

the same so it's important to understand

play07:20

this arp process is very crucial to how

play07:23

data moves through a network

play07:25

it's actually the first step that host a

play07:27

or

play07:28

any host takes when it's trying to send

play07:30

data on a network

play07:31

is to determine if the target ip it's

play07:33

trying to speak to is on

play07:35

my own network the local network or a

play07:37

foreign network

play07:38

if it's on a foreign network like we

play07:40

just showed you arp is going to try and

play07:42

resolve

play07:43

the default gateways ip address

play07:46

and if it's trying to speak to something

play07:48

on the local network arp is going to try

play07:50

and resolve the target ip address

play07:51

directly

play07:52

that's actually the illustration we

play07:54

showed you in part one of this lesson

play07:56

we showed you that for host a to speak

play07:58

to host b

play07:59

the arp entry that host a had to create

play08:01

was for host b's ip address

play08:03

directly this is what allowed host a to

play08:06

create this

play08:07

layer 2 and layer 3 header to get data

play08:10

from host a to host b

play08:13

and that wraps up our lesson on

play08:15

everything hosts do

play08:16

to speak on the internet the key points

play08:19

of this lesson was understanding what

play08:20

hosts do when speaking to other hosts on

play08:22

a local network

play08:23

or other hosts on a foreign network and

play08:26

in particular

play08:26

understanding how the layer 3 and the

play08:28

layer 2 headers are populated to get the

play08:30

data to the other host

play08:32

moreover you should also understand

play08:34

arp's role in this entire process

play08:36

if you understand these three key points

play08:38

and you followed all the concepts in

play08:40

this lesson

play08:41

then you now know everything hosts do to

play08:43

communicate with other hosts in the same

play08:45

network

play08:45

regardless of how they are actually

play08:47

connected and everything hosts do to

play08:50

communicate to other hosts in foreign

play08:51

networks

play08:52

regardless of how they are connected in

play08:55

the next lesson we're going to take the

play08:56

focus away from hosts and instead

play08:58

look at these devices right here we're

play09:00

going to unpack everything switches do

play09:02

to facilitate communication within

play09:04

a network and everything routers do

play09:06

facilitate communication between

play09:08

networks but that's it for this lesson

play09:12

i hope you enjoyed this video i want to

play09:14

thank you for watching and we'll see you

play09:15

in the next one hey youtube i hope you

play09:19

enjoyed that free lesson for my new

play09:20

course on networking fundamentals

play09:22

i'll be releasing the entire first

play09:23

module for free here on youtube

play09:26

i want this course to be the ultimate

play09:27

networking fundamentals course

play09:29

and since i'm still scoping out the

play09:30

outline you could have a say in what

play09:31

topics will be covered

play09:33

let me know in the comments below what

play09:34

subjects you want included in this

play09:35

course

play09:37

otherwise remember to like and subscribe

play09:39

and of course if you learned something

play09:40

from this video

play09:41

the best way to thank me is to share

play09:42

this video it's a small act of gratitude

play09:44

but one i appreciate greatly

play09:46

i hope you enjoyed this lesson i want to

play09:48

thank you for watching and we'll see

play09:50

you in the next one

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
NetworkingInternetData FlowHostsRoutersARP CacheSubnettingLayer 3Layer 2Communication