IP addresses are used to see the address of the original source and the final destination of the packet. The destination IP address may be on the same IP network as the source or may be on a remote network.
Destination on the Same Network
There are two types of addresses assigned to a device on an Ethernet LAN:
- Physical address– Physical address also called the MAC address which is Used for Ethernet NIC to Ethernet NIC communications on the same network.
- Logical address– Logical Address((the IP address)which is used to send the packet from the original source to the final destination.
We earlier learned that physical addresses are working in layer 2 of the OSI Model. These addresses have a different purpose. For example, these addresses are used to transport the data link frame with the encapsulated IP packet from one NIC to another NIC on the same network. If the destination IP address is on the same network, the destination MAC address will be that of the destination device.
Figure 4.7 shows the Ethernet MAC addresses and IP address for Host-A sending an IP packet to Host-C on the same network.
The Address for Layer 2 Ethernet frame:
- Destination MAC address– This is the MAC address of Host-C Ethernet NIC.
- Source MAC address– This is the MAC address of Host-A’s Ethernet NIC.
The Address for Layer 3 IP packet:
- Source IP address–This is the IP address of the source
- Dest IP address- This the IP address for the final destination of the packet