Share this
Learn the Packet Delivery Process (Host-to-Host Communication) - Pt. 2
by PivIT Global on Jun 23, 2022 7:15:00 AM
In every network, data packets are exchanged among hosts through numerous networking devices along the traffic path, such as switches, routers, and firewalls among other devices, so you can comfortably perform your daily tasks.
Although the traffic transfer happens instantly, the host-to-host delivery operation, either in the same network or between different networks, is not a simple task and a series of processes are included along the way.
For that reason, a default gateway must be configured on most of your devices, if not all, and must use the Address Resolution Protocol (ARP), so that devices can properly encapsulate the data before sending it to the destination.
In this two-part article series, we will explore the packet delivery process in more detail and find out what happens during host-to-host communication.
Let PivIT handle your router setups with EXTEND, which serves as a seamless and confidential extension of your IT teams. Consider us your boots on the ground working to cost-effectively extend your reach and complete your projects.
Host-to-Host Packet Delivery Step-by-Step
Let us look at a simple example in which data is sent from one device to another to understand the steps involved in host-to-host packet delivery.
As you can see from the image above, the topology is quite simple and consists of only two computers, a switch, and a router. On the left of R1, the 192.168.1.0/24 network is used, while on the right is the 192.168.2.0/24 network.
The IP and MAC addresses for each interface of the devices are also known, except for the switch because it is irrelevant for our host-to-host delivery example.
If you require a switch for your network, but you are not sure which is best, view some of the following posts:
- Comparing the Cisco 3560, 3850, and 9300 Switches
- Comparing Market Leaders: Cisco and Arista Switches
- Deep Dive Comparison: Cisco's Catalyst 6500 & 6800 Switches
- Head-To-Head With the Cisco Catalyst 4500 vs. 9400 Chassis Switches
For the example to make more sense, let’s add some story behind it. Let’s assume that PC1 needs to remotely connect to PC2, which resides in a different network and uses Telnet as a communication method.
So, what will happen when the user behind PC1 enters the Telnet command to connect to the IP address of PC2? Well, most likely the user will be asked for credentials, which means PC1 and PC2 communicated to each other, but what happened in between is what this article is all about.
Step 1 - TCP Protocol and Layer 3 Header
Firstly, on PC1, the Telnet application sends the data, to which an additional header is appended and indicates a TCP session is being used. The reason for using a TCP header is that Telnet is using the TCP protocol for establishing connections.
When this task is finished, the data and the TCP header continue with the encapsulation process, and a Layer 3 header is appended to the previous parameters. This header contains the source and destination IP addresses of the communicating devices, PC1 and PC2 in our case, among many other parameters included.
Therefore, the source IP is the IP address of PC1 (192.168.1.100), and the destination IP is the IP address of PC2 (192.168.2.100).
Step 2 - Layer 2 Header and ARP Protocol
The next step is appending the Layer 2 header, which includes the MAC addresses of PC1 and PC2. However, before this, PC1 needs to find out if the destination host is in the same network or belongs to a different one.
The reason for that is quite simple. The computer is not capable of routing and so everything must go through a Layer 3 device, such as a router, that will serve as a default gateway for sending data in different networks.
To learn more about this process, be sure to check out our article entitled Exploring the Functions of Routing and the Routing Table.
Because PC1 and PC2 belong to different networks, PC1 must send the data to R1 first, which will forward it to PC2 afterward. Therefore, PC1 needs the MAC address of R1, instead of PC2.
But does it have it? If yes, the encapsulation process continues, however, if the MAC address of R1 is not known, the ARP protocol is used.
Get help choosing the best router for your network by speaking with our specialists.
For that reason, as you see from the image above, PC1 sends an ARP request message, where it uses its own MAC address as a source, while the destination MAC is a broadcast.
When R1 receives the ARP request message, it learns the MAC address of PC1, maps it to the corresponding IP address inside the local ARP table, and replies with an ARP reply message.
Upon receipt, PC1 learns the MAC address of R1 and writes that information in its own ARP table. Now, PC1 has the missing parameter and can finish the encapsulation process.
It is very important to note that the ARP messages do not play any special role on the switch, except to learn the MAC addresses of PC1 and R1 and store them inside the MAC address table for later use.
When R1 receives the packet, it recognizes the destination MAC address in the Layer 2 header and starts a decapsulation process. However, this process stops when it finds out that the destination IP address in the Layer 3 header is not locally used.
Because the packet must be forwarded, it checks the destination table and finds out that the FastEthernet0/2 should be used as an exit interface to reach the destination network, where PC2 belongs.
Step 3 - Repeat
So, what happens next? Well, the same process repeats. As you can see from the image below, R1 needs the MAC address of PC2, so it can add a new Layer 2 header and finish the encapsulation process.
If the MAC address is not known, R1 sends an ARP request message, and upon receipt, PC2 replies with an ARP reply message. After learning the MAC address of PC2, R1 appends the Layer 2 header to the rest of the packet parameters, using its own MAC address as a source, and the MAC address of PC2 as a destination. Now the packet can finally be sent to PC2, which triggers PC2 to reply with a prompt for entering Telnet credentials.
Troubleshoot Your Network Like a Pro
We’ve shown that when a user behind PC1 starts a Telnet session to PC2, they instantly get an authentication request. However, a series of processes are executed during that time.
Knowing the steps involved can help you to understand the whole encapsulation and decapsulation process, which can come in handy when troubleshooting services in your network.
Don't let unreasonable lead times stop you from getting the routers you need. PivIT gives you the freedom to choose from an extensive network of OEM partnerships, maximize your budget, and create a strategy to keep your network scalable.
Share this
- Configuration Guides (47)
- Cisco Routers (29)
- Switches (27)
- Network Security (23)
- Cisco Switches (21)
- Routing Protocols (21)
- Routers (20)
- Cisco (19)
- Product Comparisons (19)
- Firewall (18)
- Cisco Security (17)
- Cisco Technical Information (17)
- IT Hardware Solutions (17)
- Network Protocols (17)
- Wireless (17)
- Security (15)
- OneCall (13)
- Servers (12)
- cisco asa (12)
- Cisco Wireless (11)
- Router Protocols (11)
- Cisco Catalyst (9)
- Cisco UCS (9)
- Upgrading Network (9)
- Cisco Servers (8)
- Product Highlight (8)
- Access Control Lists (7)
- Fortinet (7)
- Server Comparisons (7)
- Access Points (6)
- Arista Networks (6)
- OSPF (6)
- Wireless APs (6)
- Cisco ASR (5)
- Cloud Solutions (5)
- HPE-Aruba Wireless (5)
- Juniper Mist (5)
- Network Management (5)
- SD-WAN (5)
- Storage (5)
- Switch Comparison (5)
- Back To Basics (4)
- Cybersecurity (4)
- EIGRP (4)
- Firewall Architecture (4)
- HSRP (4)
- Juniper Networks (4)
- Network Automation (4)
- Network Servers (4)
- OEM Comparison (4)
- Aruba Central (3)
- Cisco Telephony (3)
- DHCP (3)
- DHCP Snooping (3)
- Dell EMC PowerEdge (3)
- Internet (3)
- Maintenance (3)
- Maintenance Renewal (3)
- Network Accessories (3)
- TPM (3)
- Telephony (3)
- aruba (3)
- Cisco NX-OS (2)
- Cisco Nexus (2)
- Dell Servers (2)
- Fortinet NGFWs (2)
- IT Trends (2)
- LAN Networks (2)
- Network Time Protocol (2)
- Palo Alto NGFWs (2)
- Rapid PVST+ (2)
- Remote Configuration (2)
- Software Defined Networking (2)
- WLAN (2)
- Ways to Save (2)
- fortigate (2)
- Asset Management (1)
- CPU Usage (1)
- Cisco AIR-CT (1)
- Cisco Aironet (1)
- Cisco DNA (1)
- Cisco ISR (1)
- Cisco Supervisor Engines (1)
- Cisco UCS Manager (1)
- Cognitive Campus (1)
- Cost of Downtime (1)
- Dell EMC Data Domain (1)
- Edge Switches (1)
- Fabric Extenders (1)
- GRE Tunnel (1)
- HPE BL (1)
- Juniper SRX (1)
- Nexus Switches (1)
- Nutanix (1)
- Optics (1)
- PowerEdge R740xd (1)
- STP Extension (1)
- Sparing Integrity Program (1)
- Switched Virtual Interface (1)
- TCP (1)
- UCS Fabric Interconnects (1)
- hyperconverge (1)
- April 2024 (2)
- March 2024 (1)
- February 2024 (2)
- January 2024 (1)
- December 2023 (1)
- November 2023 (2)
- October 2023 (1)
- September 2023 (3)
- August 2023 (5)
- July 2023 (2)
- June 2023 (4)
- May 2023 (5)
- April 2023 (8)
- March 2023 (7)
- February 2023 (5)
- January 2023 (2)
- December 2022 (3)
- November 2022 (3)
- October 2022 (8)
- September 2022 (9)
- August 2022 (9)
- July 2022 (8)
- June 2022 (9)
- May 2022 (5)
- April 2022 (3)
- March 2022 (1)
- February 2022 (2)
- November 2021 (2)
- October 2021 (1)
- September 2021 (2)
- August 2021 (2)
- July 2021 (3)
- June 2021 (2)
- May 2021 (4)
- April 2021 (4)
- March 2021 (2)
- February 2021 (1)
- January 2021 (2)
- December 2020 (2)
- November 2020 (2)
- October 2020 (2)
- September 2020 (2)
- August 2020 (4)
- July 2020 (5)
- June 2020 (4)
- May 2020 (6)
- April 2020 (2)
- March 2020 (1)
- February 2020 (2)
- January 2020 (2)
- December 2019 (1)
- May 2019 (2)
- April 2019 (5)
- February 2019 (1)
- January 2019 (3)
- December 2018 (1)
Comments (1)