Basic IP Address resolution for ARP protocol

Source: Internet
Author: User

    for the transmission of the network, IP address is the resolution of the host address is inseparable from the use of the ARP protocol. But this is also a very easy problem to come by. Let's talk briefly about some basic address resolution of the ARP protocol.

to interpret the local IP address (friend who wants to know about the address resolution process) The host IP address resolves to the hardware address:

(1) initializes the ARP request when a host communicates with another host. When the IP determines that the IP address is local, the source host looks for the hardware address of the target host in the ARP cache.

(2) If no mapping is found, the ARP protocol establishes a request that the source host IP address and hardware address are included in the request, which is broadcast so that all local hosts can receive and process it.

(3) Each host on the local network receives a broadcast and looks for a matching IP address.

(4) when the target host determines that the IP address in the request matches its own, sends an ARP reply directly to the source host for its hardware address. Updates its ARP cache with the source host's IP address and hardware address. The source host receives the reply and establishes the communication.

resolves remote IP addresses

hosts on different networks communicate with each other, and the ARP protocol broadcasts the default gateway for the source host. The

Destination IP address is a remote network host, and ARP broadcasts the address of a router.

(1) When the communication request is initialized, it is known that the destination IP address is a remote address. The source host is found in the local routing table, and if not, the source host considers the IP address of the default gateway. Locate the IP address (hardware address) in the ARP cache that matches the record of the gateway.

(2) If a record for the gateway is not found, the ARP protocol broadcasts the request gateway address instead of the address of the destination host. The router responds to ARP requests from the source host with its own hardware address. The source host sends packets to the router for transmission to the target host's network, eventually reaching the target host.

(3) on the router, the IP determines whether the destination IP address is local or remote. If it is local, the router obtains the hardware address with the ARP protocol (cache or broadcast). If it is remote, the router looks for the gateway in its routing table and then uses ARP to obtain the hardware address of the gateway. The packet is sent directly to the next target host.

(4) when the target host receives the request, an ICMP response is formed. Because the source host is on the remote network, the gateway for the source host network will be found in the local routing table. After the gateway is found, ARP obtains its hardware address.

(5) If the hardware address of this gateway does not exist in the ARP protocol cache, it is obtained through ARP broadcasts. Once it gets hardAddress, the ICMP response is sent to the router, which is then uploaded to the source host.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.