To understand how devices communicate within a network. It is important to understand the roles of both the network layer addresses and the data link layer addresses.
Role of the Network Layer Addresses
The network layer addresses, or IP addresses, show the original source and destination. An IP address has two parts:
- Network portion
The left-most part of the address that indicates which network the IP address is a member. All devices on the same network will have the same network portion of the address.
- Host Portion
The remaining part of the address that identifies a specific device on the network. The host portion is unique for each device on the network.
Note: The subnet mask identifies the network portion of an address from the host portion.
In this example, we have a client computer PC1 FTP server on the same IP network.
- Source IP address – The IP address of the sending device, the client computer PC1: 192.168.5.100.
- Destination IP address – The IP address of the receiving device, FTP server: 192.168.5.102
Notice in the figure that the network portion of both the source IP address and destination IP address are on the same network.
Role of the Data Link Layer Addresses
When the sender and receiver of the IP packet are on the same network, the data link frame directly send to the receiving device. On an Ethernet network, the data link addresses are known as Ethernet (Media Access Control) addresses. MAC address physically embedded on the Ethernet NIC.MAC Address also called Physical address.
- Source MAC address This is the data link address, or the Ethernet MAC address, of the device that sends the data link frame with the encapsulated IP packet. The MAC address of the Ethernet NIC of PC1 is AA-AA-AA-AA-AA-AA, written in hexadecimal notation.
- Destination MAC address When the receiving device is on the same network as the sending device; this is the data link address of the receiving device. In this example, the destination MAC address is the MAC address of the FTP server: CC-CC-CC-CC-CC-CC, written in hexadecimal notation.
The frame with the encapsulated IP packet can now be transmitted from Host A directly to the FTP server.
Figure 2.7 Device on the same network