In this tutorial, you will learn about the basic concepts of addressing modes in the TCP/IP model. You will also learn about the various types of addressing modes, their functions, where they are used, and how addresses are assigned within a network.
Contents:
- What is Addressing?
- Types of Addressing
- Physical Address
- Logical Address
- Port Address
- Specific Address
- How Addressing work in a Network?
- Comparison of Addressing Types
What is Addressing?
Addressing simply means assigning an address to a client or process or server or any other device to establish successful communication and to make the devices communicate with each other correctly.
- Addressing is used in the TCP/IP model on the network to keep the network functioning properly.
- Using addressing mechanisms, devices on the network find routes to other devices and establish communication with them.
- The TCP/IP model consists of 4 layers and each layer has an addressing mechanism to perform its functions.
Types of Addressing
There are 4 types of addresses used in the TCP/IP model on the network for each TCP/IP model layer to function correctly. They are as follows:
- Physical (MAC) address
- Logical (IP) address
- Port address
- Specific address
- Physical (MAC) address: If the sender and receiver devices are on the same network, MAC addresses are used at the network access layer of the TCP/IP model to transmit data from one device to another.
- The physical address is mainly used by the data link layer to transmit frames.
- Logical (IP) address: IP addresses are used at the Internet layer of the TCP/IP model to uniquely identify hosts on the network.
- Port address: Port addresses are used at the transport layer of the TCP/IP model to identify processes running on the host machine.
- Specific address: Specific addresses are user-friendly and commonly used by the user. An email address such as “[email protected]” and a website URL such as “www.example.com” are examples of specific addresses.
The below diagram explains the different types of addressing at different TCP/IP model layers.
The diagram above shows that Specific addresses are used at the Application Layer, Port addresses are used at the Transport Layer, IP or Logical addresses are used at the Internet Layer, and MAC or Physical addresses are used at the Network Access Layer.
Physical Address
The physical address is also known as the MAC address. It works at the network access layer of the TCP/IP model. The physical address is responsible for NIC to NIC communication between devices on the same network.
- The physical address is a 48-bit number that is printed on the device’s NIC (Network Interface Card). The size and format of the MAC address may vary depending on the type of network.
- When the network access layer receives a segment from the transport layer it converts the segment into a frame. After that, the header and trailer are attached to the frame which also contains the physical addresses of the sender and receiver. The frame will be transmitted according to the physical addresses of the sender and receiver.
- “09:05:E2:07:3R:2A” is an example of a physical address.
Logical Address
The Logical address is also known as the IP address. This address works at the Internet layer of the TCP/IP model. Whenever a host connects to the network, it gets a unique number known as an IP address to communicate with other hosts.
- The IP address helps in finding the path to transmit the data to the other host on the network. An IP address is a 32-bit number that uniquely identifies an end device on a network.
- IP addresses sent packets from sender to receiver and the receiver can be on the same network or another network.
- “192.168.1.1” is an example of an IP address.
Port Address
Typically, the port address is used at the transport layer of the TCP/IP model to identify the process running on a device.
- The transport layer receives data from the application layer and divides the data into segments. Then segments are transmitted from sender to receiver using TCP or UDP.
- There is a field in the TCP/UDP header known as the port number. Once the receiver has successfully received the segment, the receiver will use the port address to determine the received segment belonging to which particular process out of several processes running in the machine.
- In short, the port address distributes the processes and labels them, so that the machine understands which process will be used for the particular communication.
- For example, when two devices on a network want to share files, they will use FTP which works on ports 20 and 21.
Specific Address
The specific address mainly interacts with the user. Sending an email using a mail address such as “[email protected]” and accessing the web by typing the URL of a website such as “www.example.com” are examples of specific addresses.
- The specific address changes based on the IP address and port numbers.
- Specific addresses operate at the application layer of the TCP/IP model.
How Addressing work in a Network?
Now, we know about 4 types of addressing. So, let’s see how they all work together in a network.
The diagram below shows that how addressing works in a computer network.
- As shown in the above diagram, PC-1 wants to communicate with PC-2. So, first of all, both will connect to the network and get a unique IP address for communication.
- After getting the IP address, PC-1 will start sending packets on the network. Now, the MAC address of the intermediary devices will serve as the interface for a host. The source and destination MAC will change continuously until the data is transmitted to the receiver, as shown in the figure.
- When the data is successfully received by the receiver, the receiver will check the port number in the TCP header and assign that data to the particular process based on the port number.
Comparison of Addressing Types
The below table shows the comparison between different types of addresses.
Key | Physical Address | Logical Address | Port Address | Specific Address |
---|---|---|---|---|
Functionality | Physical addresses are used for NIC-to-NIC communication. | A logical address uniquely identifies a host on a network and transmits packets from sender to receiver. | The port address is used to identify the process running on the host machine. | The specific address provides an easy and human-understandable address. |
Layer | Used in Network Access Layer | Used in Internet Layer | Used in Transport Layer | Used in Application Layer |
Service | MAC address helps transmit data when communication devices are on the same network. | The IP address connects two devices and finds the path to send packets from sender to receiver. | The port address is stored in the TCP/UDP header, which is used to identify the process when the segment has been successfully received by the receiver. | Varies according to port address and IP address. |
Used for | Frames | Packets | Segments and Processes | Data and User-friendly address |
Definition | 48-bit number | 32-bit number | Anything in between 0-65, 535 | Human understandable address |
Example | 09:1A:34:08:2E:4F | 10.1.1.2 | 25: SMTP, 53: DNS, 80: HTTP, etc | [email protected], www.example.com |
Key Points to Remember
Here is the list of key points we need to remember about the “Types of Addressing Modes in TCP/IP Model”.
- Addressing means assigning an address to a client or process or server or any other device so that successful communication can be established and devices can communicate with each other correctly.
- Physical (MAC) address, logical (IP) address, port address, and specific address are types of addressing.
- The MAC address works at the network access layer of the TCP/IP model to understand the frame. MAC addresses are also used to transmit data if the sender and receiver are on the same network.
- The Logical or IP address operates at the Internet layer, which is used to identify hosts uniquely on the network and is responsible for sending packets from sender to receiver.
- The port address works at the transport layer and is used to identify the processes running on the host machine.
- The MAC address is a 48-bit number, the IP address is a 32-bit number, and the port number can be anything between 0 and 65,535.
- The specific address is a part of the application layer. It has some specific meaning and can be easily understood by users. An email address such as “[email protected]” is an example of a specific address.