In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
A: 192.168.1.2
0A-11-22-33-44-01
B: 192.168.1.3
0A-11-22-33-44-02
C: 192.168.1.4
0A-11-22-33-44-03
ARP (address Resolution Protocol), OSI divides the network into seven layers. The ip address is in the third layer (network layer) of the OSI model, and the mac address is in the second layer (data link layer).
At the link layer, hosts and switches are marked with their physical addresses, that is, 48-bit physical addresses, which are also what we usually call network card addresses (MAC addresses).
At the network layer, hosts and routers are marked by logical addresses, which are unique locally, but not necessarily globally. When TCP/ IP Protocol sends IP packets over Ethernet, it needs to encapsulate the header of layer 3 (32-bit IP address) and layer 2 (48-bit MAC address). However, because it only knows the destination IP address, does not know its MAC address, and cannot cross the second and third layers, it needs to use the address resolution protocol. Using the address resolution protocol, the target hardware address (MAC address) information can be parsed according to the IP address information in the IP packet header of the network layer, so as to ensure the smooth communication.
Address Resolution Protocol ARP (Address Resolution Protocol) is responsible for dynamically mapping logical addresses to physical addresses and translating 32-bit logical addresses (IP addresses) into 48-bit physical addresses (MAC addresses).
When host An and host B communicate, the arp protocol can resolve the ip address of host B (192.168.1.3) to the mac address of host B (0A-11-22-33-44-02). Workflow:
1. Make sure that the ip address of known B is 192.168.1.3. Check your own arp cache table to check the matching mac address of host B. if there is a record, it will be forwarded directly through the arp cache table.
two。 If host A does not find a mapping in the arp cache table, it will ask for the ip address of 192.168.1.3 and send the arp request broadcast to the local area network
The mac address and ip address in the arp request are as follows:
Source A:
Mac 192.168.1.2
Ip 0A-11-22-33-44-01
Goal B:
Mac: empty (00GRV 0000GRO 00GRO 00RV 0000VRO)
Ip 192.168.1.3
3. After all the hosts in the local area network receive the arp message, host B checks that the target ip matches the local, then adds the source mac,ip in the arp to its own arp cache table, and replies the arp message containing its own mac and ip to A. host C discards the arp request when it sees that the destination ip address in the arp message does not match the local address.
4. After receiving the reply message, An adds the mapping relationship between the target mac and ip of the arp message to its own arp cache table, and the next communication will communicate directly through the arp cache table.
To minimize broadcast volume, ARP maintains a cache of IP address to MAC address mappings for future use. The ARP cache can contain both dynamic and static items. Dynamic items are automatically added and deleted over time. The potential life cycle of each dynamic ARP cache item is 10 minutes. A new item added to the cache has a timestamp. If an item is not used within 2 minutes after it is added, it will expire and be deleted from the ARP cache; if an item is already in use, it will receive a 2-minute life cycle; if a project is always in use, it will receive an additional 2-minute life cycle up to the maximum life cycle of 10 minutes. Static items remain in the cache until the computer is restarted
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 262
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.