MAC addresses are globally unique for each device, and the address is burned on the hardware circuit of the NIC. The MAC address is represented by a 12-digit hexadecimal number, where the first 6 bits identify the manufacturer of the NIC and the last 6 bits are the serial number of the NIC. In Ethernet, one host must be aware of the MAC address of the target host to communicate with another host.
What is ARP, which is used to map IP addresses to MAC addresses so that devices can communicate on multiple access media. One example would be a good illustration of how ARP works: The teacher will give a letter to a student in the classroom, but the teacher
Do not know this student, she only know the student's name (IP), so she said to all the people in the classroom: "Who is King xx, have your letter (network data)", when Wang xx heard this message (address matching), he stood up to answer, and then the teacher knew he sat in a few rows (MAC address), Finally sent the letter to his seat.
There are some things to be aware of in the implementation of the ARP protocol:On each computer, there is aARPbuffer, it saves a certain number ofIPAddress toMACaddress mapping, and when aARPwhen the broadcast came, though theARPThe broadcast may not be relevant to it, butARPthe Protocol software will also take the physical address andIPaddress mapping down, the benefit of doing so is to be able to reduceARPthe number of times the message was sent over the LAN. according to the default settings,ARPthe items in the cache are dynamic,ARPin the bufferIPthe mapping between an address and a physical address is not always valid once generated, and eachARPMapping
Table
Items have their own lifespan, if not used for a period of time, then thisARPThe mapping is removed from the buffer, and the switchMACthe same principle as the Address table. This oldthe mechanism can greatly reduceARPcache the length of the table and speed up the query. In Ethernet, when the host is trying to determine aIPAddress ofMACaddress, it will first check its ownARPbuffer table, if the destination address is not included in the buffer table, the host sends aARPRequest(Broadcast Form), any memory on the network segment can be received to the broadcast, but only the target host will respond to thisARPrequest. Because the target host is receivingARPwhen requested, you can learn from the sender'sIPAddress andMACaddress, so it takes a unicast message to respond to the request.
Host a broadcasts an ARP request to query the host with IP address 192.168.1.3 MAC address, all hosts on the network segment will receive the ARP request.
HostB, hostDReceive hostAsent byARPrequest, they found that the request was not sent to themselves, so they ignored the request but they still put the hostAof theIPAddress andMACThe mapping of the address is recorded to its ownARPtable. When the hostCReceive hostAsent to theARPwhen requested, it found thisARPthe request is sent to itself, so it responds with a unicast messageARPrequest,It also records theIPAddress andMACthe mapping of the address. UsuallyARPprotocols are used on networks that support broadcast, such as Ethernet. But that'sARPPackets cannot be used across network segments, that is, they cannot span routers(The router itself is used asARPgeneration
Excluding the rationale). But the target networkIPaddress and sourceIPwhen the address is not on a unified network segment, use the proxyARP. Ipaddress conflict problems and solutions:
ArpThe most common problems that arise areIPaddress conflicts, this is because two different hosts use the sameIPaddress that is generated in any internet,IPThe address must be unique. When the interface is initialized, it sends a message containing itsIPAddress ofARPrequest, if a response is received,Windowsyou will be reported to the userIPthe address has been occupied by others, and if no response is received, it thinksIPThe address is not being used.
TCP/IP Internet Layer protocol--arp