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, indicate the original source and final destination. An IP address contains two parts:
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.
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 is used to identify 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 is sent directly to the receiving device. On an Ethernet network, the data link addresses are known as Ethernet (Media Access Control) addresses. MAC addresses are 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 PC1 directly to the FTP server.
Figure 2.7 Device on the same network