Arp protocol
Contract in three steps:
1. Compute are in the same broadcast domain
2. Use the mac address arp protocol to obtain
3. Employer
First, in the same broadcast domain if:
For example pc1 To pc3 contracting process is as follows:
1. First calculate pc1 and pc3 in the same broadcast domain (calculated using ip)
2. arp protocol to obtain pc3 mac address
Format: The original target mac mac original target ip ip
Specifically: pc1mac FF: FF: FF: FF: FF: FF 192.168.11.10 192.168.11.11
(In the same broadcast domain all machines can receive the packet, and then began to unpack, find ip address is not discarded, ip was found on return to their own mac address)
Returned Format: The own goal mac mac own goal ip ip
Specifically: pc3mac pc1mac 192.168.11.11 192.168.11.10
Such pc1 on the subject of the mac address pc3
3. begin contract
Contract format: the original target mac mac original target ip ip data section
Specifically: pc1mac pc3mac 192.168.11.10 192.168.11.11 data
Second, if not in the same broadcast domain:
For example pc1 To pc4 contracting process is as follows:
1 . First calculate pc1 and not in the same broadcast domain pc3
2 .arp protocol to obtain pc1 broadcast domain where gateway mac address 1
Format: own goal mac mac own goal ip ip
Specifically: pc1mac gateway ip gateway 1mac 192.168.11.10
Gateway 1 is found after unpacking to own mac address, the gateway will respond, and put his back to the mac address pc1
Returned Format: mac mac gateway gateway target target ip ip 1 1
Specifically: Gateway 1mac pc1mac gateway 1ip 192.168.11.10
Pc1 After obtaining the gateway address 1mac begin contract
3. pc1 began to pc4 contract:
Contract format: the original target mac mac original target ip ip data section
Specifically: pc1mac gateway 1mac 192.168.11.10 172.16.45.10 data
Pc4 return to the same data flow is not elaborated here.
Unit conversion:
1GB=1024MB
1MB=1024KB
1KB = 1024B (Byte == byte, abbreviated B)
1B = 8b (bit == bits, the smallest unit of computer data, abbreviated b)
Character Encoding:
https://www.cnblogs.com/linhaifeng/articles/5950339.html