Summary of Everything Hosts do to speak on the Internet - Part 2 - Networking Fundamentals - Lesson 3
Summary of "Everything Hosts do to speak on the Internet - Part 2 - Networking Fundamentals - Lesson 3"
This video lesson continues from Part 1 and elaborates on the processes a host (specifically Host A) undertakes to send data to another host (Host C) located on a foreign network, introducing the role of a Router in this communication. The lesson focuses on how data is prepared and transmitted across networks, emphasizing the creation and use of Layer 2 and Layer 3 headers, and the critical role of ARP (Address Resolution Protocol) in resolving MAC addresses necessary for data delivery.
Main Ideas and Concepts
- Context and Prerequisites:
- This lesson builds on concepts from Lessons 1 and 2 and Part 1 of this lesson.
- It focuses on communication between hosts on different networks using a Router.
- Subnetting is referenced but not covered in detail; viewers are directed to external resources for that.
- Network Topology Setup:
- Host A, Host C, and a Router each have IP addresses and MAC addresses.
- The Subnet Mask (e.g., /24) defines the size of the network.
- Hosts use subnetting to determine if a destination IP is local or foreign.
- Host A’s Process to Send Data to Host C (Foreign Network):
- Determining if the destination is local or foreign:
- Host A compares its own IP address and Subnet Mask with Host C’s IP address.
- Since Host C is on a foreign network, Host A sends data via the Router.
- Creating Layer 3 Header:
- Source IP: Host A’s IP address.
- Destination IP: Host C’s IP address.
- Creating Layer 2 Header:
- Since the destination is foreign, the next hop is the Router.
- Layer 2 Header destination MAC Address must be the Router’s MAC Address.
- Resolving Router’s MAC Address via ARP:
- Host A must know the Router’s IP address (default gateway), which is pre-configured.
- Host A’s ARP cache is initially empty, so it sends an ARP request to find the Router’s MAC Address.
- The Router replies with its MAC Address.
- Host A updates its ARP cache with this mapping.
- Data Transmission:
- Host A uses the Router’s MAC Address to complete the Layer 2 Header.
- Data is sent to the Router.
- The Router removes the Layer 2 Header and forwards the packet towards Host C, adding new Layer 2 headers as needed.
- Determining if the destination is local or foreign:
- Reusability of ARP Entries:
- Once Host A knows the Router’s MAC Address, it can reuse this for communicating with any host on foreign networks.
- Only the Layer 3 Header changes for different destination IPs; the Layer 2 Header remains the same (source and destination MAC addresses are Host A and Router).
- Comparison with Local Network Communication (from Part 1):
- When communicating on the local network (e.g., Host A to Host B), ARP resolves the target host’s MAC Address directly.
- Layer 2 Header uses the MAC Address of the target host, not the Router.
- Key Takeaways:
- Hosts determine if the destination is local or foreign using IP and Subnet Mask.
- ARP is essential for resolving MAC addresses needed for Layer 2 headers.
- Layer 3 headers identify source and destination IPs.
- Layer 2 headers handle hop-to-hop delivery, either directly to the destination (local) or to the Router (foreign).
- ARP resolution of the default gateway’s MAC Address is a critical and reusable step for foreign network communication.
Methodology / Step-by-Step Process for Host Communication to Foreign Network
- Step 1: Host A checks if the destination IP is local or foreign by comparing subnet masks.
- Step 2: Host A creates a Layer 3 Header with its own IP as source and the target IP as destination.
- Step 3: Host A attempts to create a Layer 2 Header to send the packet to the Router (default gateway).
- Step 4: If the Router’s MAC Address is unknown, Host A sends an ARP request for the Router’s IP.
- Step 5: Router replies with its MAC Address.
- Step 6: Host A stores this MAC Address in its ARP cache.
- Step 7: Host A completes the Layer 2 Header using the Router’s MAC Address.
- Step 8: Host A sends the packet to the Router.
- Step 9: Router removes Layer 2 Header, adds new Layer 2 headers for next hops, and forwards the packet toward the destination.
- Step 10: Host A can
Notable Quotes
— 05:31 — « That header did that successfully and can go and retire happily in header heaven. »
— 07:01 — « This ARP process that we had to go through to resolve the router's IP address really only needs to happen once. Once host A knows the router's MAC address, it can reuse that MAC address to speak to any host on a foreign network. »
— 07:20 — « It's important to understand this ARP process is very crucial to how data moves through a network. »
— 07:31 — « The first step that host A or any host takes when it's trying to send data on a network is to determine if the target IP it's trying to speak to is on my own network, the local network, or a foreign network. »
Category
Educational