Share this
Learn the Packet Delivery Process (Default Gateway and ARP) - Pt. 1
by PivIT Global on Jun 21, 2022 7:03:00 AM
For everyday network communications and using various business and entertainment applications, a vast amount of data packets is exchanged between networking devices. However, the host-to-host delivery either in the same network or between different networks is not a simple process and several protocols and many steps are involved.
Firstly, each device that wants to participate in the network must have a unique IP address assigned. One part of the IP address identifies the network where the host belongs, while the other part identifies the host itself.
With this information, the hosts always know if they communicate internally inside the same network, or if they belong to different networks. However, knowing the IP address of the destination is not enough for proper communication.
The sender must also know the Media Access Control (MAC) address of the receiver to be able to send the data. Therefore, a protocol that maps the IP address and the MAC address of the destination host must be used.
On the other side, for communication inside the same network, using a switch is enough for exchanging data packets between hosts. When there is communication between different networks, a Layer 3 device (such as a router) must be used so packets are routed between the networks.
However, before packets reach the routers, the hosts must send them first, and that is the tricky part of the process. Hosts are not capable of routing, so they cannot send packets unless they are destined for hosts in the same network. For that reason, they must use a default gateway to send data to receivers that belong to different networks.
In this Part 1 of 2 series, we provide an overview of the default gateway and its purpose in networks, as well as the Address Resolution Protocol (ARP) required for learning the MAC addresses of the destination devices.
Let PivIT handle your router setups with EXTEND, our professional services team, that can serve 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 on time and within your budget.
Default Gateway Overview
Before we discuss the default gateway and its purpose in networks, we must first cover the meaning of the MAC and IP addresses. Each networking device has a MAC address that uniquely identifies it.
However, these Layer 2 addresses have no meaning outside the local network media and are used to locate the end devices only in the local physical network. Conversely, Layer 3 devices are assigned to devices such as computers, L3 switches, routers, and firewalls among others, that provide Layer 3 operations.
For proper network functioning, each device must use a unique IP address inside the same network, so no duplicate issues could ever occur.
So, why do end devices need to use a default gateway? Well, a device can only communicate directly with a destination host if they both belong to the same network.
However, if they belong to different networks, the only way for packets to be delivered to the destination host is by sending them to the default gateway first, which is usually a router, and then forwarded to the destination.
As you will see in the image above, both computers are part of the same network (192.168.1.0/24). This allows them to communicate with each other only with the help of the switch through which they connect to the network.
However, if any of these two hosts want to send traffic to the webserver on the internet, they must know how to get there. Since they are not capable of routing, the only available option is to use a default gateway.
This device, in this case, a router (R1), belongs to the same network as the hosts in need of the default gateway, but supports routing and knows how to forward the data to the destination IP. Therefore, hosts send the data to the default gateway first, and then the router forwards it to the webserver on the internet.
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
Utilizing the Address Resolution Protocol (ARP)
When a device sends data to a remote device, both the IP and the MAC address of the destination host is needed on the sending device. The reason for this requirement is that the sender encapsulates the packet into a frame, so both are part of the encapsulation process (i.e., the IP address in the packet and the MAC address in the frame).
Many people make the mistake of only adding an IP address to send data, when both the IP and MAC address are needed. By way of example, when you ping a host, you define only the IP address of that host, but the MAC address of the destination is also included in the encapsulation process for the ping packet to be sent.
So, how can a device learn the MAC address of the destination host? Simply by using the Address Resolution Protocol.
The main purpose of this Layer 2 protocol is to map the IP address of a remote device to its MAC address. The way it works is quite simple and three steps are involved in the process.
Step 1 - Sending an ARP Request
When the sender needs to find the MAC address of the remote device, ARP sends a special type of message called an ARP request. This ARP request is a broadcast message and contains a request inside it.
Step 2 - Sending an ARP Reply
The request instructs the device with a specific IP address to reply to the sender IP with information about its own MAC address or the MAC address in question. This reply message is called an "ARP reply" and contains the mapping of the destination hosts’ MAC and IP addresses.
Step 3 - Storing the Information in an ARP Table
Once the information is dynamically learned, it is stored in the ARP table of the device and stays there until the timeout expires. On Cisco devices, the timeout is 4 hours by default (although it can be changed) while other operating systems might have a different value.
If no device responds to an ARP request, the original packet is dropped because a frame cannot be created without the missing MAC address of the destination device.
A Practical Example of Steps 1 to 3
Get help choosing the best router for your network by speaking with our specialists.
As you can see from the image above, the host on the left wants to print something. However, it does not have any information about the printer’s MAC address. An ARP request message is sent, which is received by any device in the local network, including the printer.
Because the printer recognizes its IP address in the ARP request message, it replies with an ARP reply message that contains the mapping of its IP and MAC addresses. Upon receipt, both parameters are included in the ARP table of the host and the encapsulation process starts.
Now that the host has the missing parameter, it can create a Layer 2 frame and forward the data toward the printer. Keep in mind that the printer is not always in the same network as the host. In such a case, the host needs to use a default gateway to send data to the printer.
One Step Closer to Understanding the Packet Delivery Process
Understanding the basics behind the IP and MAC addresses, the default gateway, as well as the ARP protocol, is critical for proper network implementation and providing everyday services within your network. This helps you better understand the delivery process of the data and easily troubleshoot the network when problems arise.
Now that you are familiar with all these concepts, let’s dive into the packet delivery process for host-to-host communications in Part 2 of this series.
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)
No Comments Yet
Let us know what you think