Just declare the following agreement to understand, no need to memorize it, just use it to check
1. Ethernet frame
Frame header:
- dst mac [destination mac address (physical address)],
- src mac [physical address of this node],
- The type records which protocol is used by the upper network layer.
End of frame: used for verification [ just know it ]
2. ARP protocol [ Address Resolution Protocol-find Mac through IP, otherwise find IP through Mac-RARP protocol ]
Each host has a mapping table to open cmd
In the previous section we introduced, we introduced from the network layer
Hardware type: A 16-bit field used to define the type of network running ARP. Each local area network is assigned an integer based on its type. For example: the type of Ethernet is 1. ARP can be used on any physical network.
Protocol type: 16-bit field used to define the protocol used. For example: this field is 0800 for IPv4 protocol. ARP can be used in any high-level protocol
Hardware length: 8-bit field, used to define the length of the physical address, in bytes. For example: the value for Ethernet is 6.
Protocol length: 8-bit field, used to define the length of the logical address, in bytes. For example: the value of the IPv4 protocol is 4.
Opcode: 16-bit field, used to define the type of message. There are two types of defined groups: ARP request (1) and ARP response (2).
Source hardware address: This is a variable length field used to define the physical address of the sender. For example: For Ethernet, the length of this field is 6 bytes.
Source logical address: This is a variable length field used to define the logical (IP) address of the sender. For example: For the IP protocol, the length of this field is 4 bytes.
Target hardware address: This is a variable length field used to define the physical address of the target. For example, for Ethernet, this field is 6 bytes. For ARP request messages, this field is all 0s, because the sender does not know the hardware address of the target.
Destination logical address: This is a variable length field used to define the logical (IP) address of the destination. For the IPv4 protocol, the length of this field is 4 bytes
3. ICMP protocol [Just take a look at this protocol]
Ping command uses ICMP protocol