We can see that during the transmission of a data packet, the IP address information of the three layers and the source MAC address are unchanged, while the destination MAC address is dynamically changed by the network device.
How do network devices know what the MAC address of the next hop is? In fact, it is calculated through three layers of IP information. The third layer is routing calculation, and the second layer is obtained by broadcasting and then according to the reply.
By the way, analyze:
In Ethernet, the maximum transmission unit MTU of a packet is 1500 bytes. In an IP packet, if 20 bytes in the IP header are removed, the maximum data length can be 1480 bytes. In a TCP packet, if 20 TCP headers are removed, the maximum data segment that can be transmitted is 1460 bytes. Therefore, when the data exceeds the maximum data length, the data will be segmented. In the IP header, you will see that there are multiple fragments being transmitted, but the identification number is the same, that is, the same data packet.