We will learn about how the Address Resolution Protocol works in this tutorial. The Address Resolution Protocol (ARP) is a communication protocol for determining the link layer address, such as a MAC address, that corresponds to a given internet layer address, typically an IPv4 address. This mapping function is critical in the Internet protocol suite. RFC 826, which is Internet Standard STD 37, defined ARP in 1982.
When a new computer connects to a LAN, it is given a unique IP address for identification and communication.
Understanding the Address Resolution Protocol (ARP) and How it Works
Here’s what happens when a network device needs to send data over a TCP/IP network switch. Using the IP address, the device must determine the MAC address. It accomplishes this through the use of ARP.
The Role of MAC and IP Addresses in Network Communication
A frame only needs a MAC address to get somewhere. That’s all it takes for an Ethernet frame to get somewhere. However, remember from the previous tutorial that Ethernet frames contain packets, which contain data in the form of protocols. In the case of TCP/IP networks, IP addresses are required to move packets between networks.
On the same network, a computer can communicate using multiple network protocols. For example, our Mac here is communicating via TCP/IP and Appletalk over the same Ethernet line. As a result, the MAC address allows Ethernet frames to travel between network devices such as routers and switches. The network protocols enable the computer to communicate with devices on other networks.
Every computer that connects to the Internet requires an IP address. Your ISP provides your computer with its public address at home. A computer in a large corporation or university would obtain it from the network administrator, who keeps track of all IP addresses.
Examine the network diagram for connecting two networks once more. What device governs how traffic between the two networks is handled? How do we move network traffic from one network node to a node in an entirely different network?
The issue is that a node on one network does not understand how to send frames to a node on another. As we have mentioned before, a router knows how to transfer data from one network to another.
A network device’s network configuration includes a default gateway. This is the IP address of the router. It is where all network traffic destined for other networks is sent.
In windows, click the Start button, then type cmd into the search box and press Enter. A black and white window will appear, into which you should type ipconfig and press enter. ipconfig displays the Internet Protocol version 4 (IPv4) and IPv6 addresses, subnet mask, and default gateway for all adapters when run without any parameters.
Moving Data Between Networks: The Role of Routers and Default Gateways
We need to program a router so that it knows about the networks to which it is connected and how to connect to other networks. Let us first visualize the entire packet-sending and receiving process before we begin programming a router.
So why can’t data be moved between networks using a switch?
Let us again answer this question. The only addresses that the switch recognizes are MAC addresses. An Ethernet switch simply examines a frame’s MAC address and forwards it to the appropriate device. It makes no changes to the frame. The router must extract the packet from the frame, obtain the IP address, and then modify the frame MAC address if it is to be sent to a device on another network.
Is it possible to connect every computer on the Internet directly to the router rather than via a switch?
The simple answer is yes. But in practice, it is a little bit fuzzy. You may believe that in your home network, you don’t need switches and instead connect devices with NAT routers. You mean a home router with four LAN ports and one WAN port, right? Those four LAN ports are on a switch built into the home router. The next question is, if all switches can be replaced by routers, why don’t we? Routers are significantly more expensive than switches, both in terms of hardware cost and the computing resources required to perform networking. As a result, it would be wasteful.
And the internet isn’t just for home users with ISPs. No sane computing center would replace all switches with routers if they wanted to keep making money.
Computers are not generally connected directly to a router. Usually there is a switch or hub in-between them.
It’s time to talk about how the router moves data between networks. Switches transport data between nodes in the same network. Routers are required to transfer data between networks. The following illustration shows you what happens when a network device attempts to send network traffic to another network device on a different IP network. This traffic must be sent through a router.
We will get the following diagram in the Cisco Packet Tracer if we use a Cisco 2911 router.
Three GigabitEthernet interfaces are available on the Cisco 2911 router (instead of FastEthernet interfaces). When programming a router, the interfaces it implements are critical.
Take note of the red arrows. It indicates that, despite being physically connected, all networking devices are unable to exchange packets with one another. This is due to the fact that they are not logically connected. In other words, the devices are unaware of one another’s existence. They are not aware of the addresses of the other devices.
In the following tutorial, we will program routers to be logically connected and send packets from one network to another network.
Q: Packets? Routers, I assumed, moved frames around.
Well, routers see the frames, but really they are all packets to routers. Routers have to take them apart and put them back together after all.