Introduction
In any communication system, addressing is essential. Just as people need names and postal addresses to send and receive letters, computers on a network require addresses to identify each other and deliver data correctly. Without addressing, network communication would be chaotic and unreliable.
Why Do We Need Addressing?
Imagine mailing a letter without writing the recipient’s address — the post office wouldn’t know where to send it. Similarly, in a computer network:
- Every device must be uniquely identifiable.
- Data must reach the correct device and the correct application running on that device.
- Multiple conversations must coexist without interfering with each other.
Addressing ensures accurate delivery, uniqueness, and proper communication flow.
Types of Addresses in Networking
There are three primary categories of addresses in a network:
Layer | Address Type | Answers the Question... | Analogous To... |
---|---|---|---|
Network (L3) | IP Address | "Where is the destination device locatedon the global network?" | A Street Address (Logical, can change) |
Data Link (L2) | MAC Address | "What is the physical identityof the next device on this local segment?" | A Social Security Number (Physical, usually permanent) |
Transport (L4) | Port Number | "Which specific application or serviceon the destination device is this for?" | An Apartment Number or Suite Number |
A. Physical Address (MAC Address)
Definition: A hardware address burned into the Network Interface Card (NIC) of a device.
Format: 48-bit hexadecimal number (e.g., 00:1A:2B:3C:4D:5E).
Purpose: Identifies a device within a local network (LAN) (e.g., within your home Wi-Fi or office LAN). It is the last hop of the journey.
Analogy: Like a person’s fingerprint — unique and tied to the hardware.
Limitation: MAC addresses work only within a local segment; they’re not designed for global communication.
Key Properties:
- Burned-In: Hard-coded into the Network Interface Card (NIC) by the manufacturer. It is (mostly) permanent.
- Flat Address Space: There is no structure or hierarchy to MAC addresses. This makes them useless for routing across large networks.
- Scope: Local Network Only. Routers do not forward frames based on MAC addresses.
How it's used:
When your computer wants to send data to another device on the same network, it uses the ARP (Address Resolution Protocol) to find the MAC address associated with the destination IP address. It then places the destination device's MAC address in the frame header.
B. Logical Address (IP Address)
Definition: A software-assigned address used for identifying a device across networks.
Versions: IPv4 (32-bit, e.g., 192.168.1.1), IPv6 (128-bit, e.g., 2001:0db8::1).
Purpose: Used for end-to-end delivery across multiple networks (from the source device, through routers, to the final destination device). It defines the network a device is on and its unique host identity on that network.
Analogy: Like a postal address — can be changed or reassigned depending on location.
Key Concept: Routing decisions on the Internet are based on IP addresses.
Key Properties:
- Software-Configured: Assigned manually (static) or automatically via DHCP (dynamic). It is logical and can change.
- Hierarchical Address Space: The structure (network + host) allows for efficient routing. Routers use the network portion to make forwarding decisions, just as a postal system uses a ZIP code to send a letter to the correct city.
- Scope: Global. IP addresses are used to route packets across the entire Internet.
How it's used:
Your computer places the destination IP address (e.g., for google.com) in the IP packet header. Routers across the Internet examine this IP address and use routing tables to decide the best path to forward the packet closer to its final destination.
C. Port Numbers
Definition: A numerical identifier assigned to processes or applications on a device.
Range: 0–65535 (well-known ports: 0–1023, e.g., 80 for HTTP, 25 for SMTP).
Purpose: Used to identify the specific application process or network service on the destination device that should receive the data. A single device can have many simultaneous network activities (e.g., web browsing, email, gaming); port numbers keep them separate.
Analogy: Like apartment numbers in a building — the IP address identifies the building, the port number identifies the apartment.
Format: A 16-bit number (0 to 65535).
Categories:
Well-Known Ports (0-1023): Reserved for common services.
- 80 = HTTP (Web)
- 443 = HTTPS (Secure Web)
- 25 = SMTP (Email Send)
- 53 = DNS (Name Resolution)
Registered Ports (1024-49151): Assigned to less common services.
Dynamic/Private Ports (49152-65535): Used temporarily by clients to initiate connections. The client picks a random port from this range for its end of the conversation.
How it's used:
A web server runs on port 80. Your web browser knows to send its HTTP request to the destination IP address and destination port 80. The server responds to your IP address and the random source port your browser opened for this session.
Types of Communication Based on Addressing
Unicast: One-to-one communication (e.g., sending an email).
Broadcast: One-to-all communication within a network (e.g., ARP request).
Multicast: One-to-many communication to a specific group (e.g., video conferencing).
Anycast (IPv6 only): Data sent to the nearest device in a group (e.g., DNS queries).
How These Addresses Work Together
When a user requests a webpage:
IP address identifies the destination host (the server).
MAC address is used inside the local network to deliver the frame to the right device.
Port number directs the data to the correct service on the server (e.g., Port 80 → web server).
This layered addressing ensures data finds not just the right device but also the right application.
How The Three Addresses Work Together: A Practical Example
Scenario: Your laptop (192.168.1.101
) requests a webpage from a server at 142.251.32.110
(google.com
).
- Application Layer: You type
google.com
. The browser decides to use port80
(HTTP). - Transport Layer (Ports): The TCP protocol creates a segment. It sets the Destination Port = 80 and choose a random Source Port (e.g.,
55000
) for the response. - Network Layer (IP Address): The OS creates a packet. DNS has resolved
google.com
to142.251.32.110
. The packet header has:- Source IP:
192.168.1.101
(Your laptop) - Destination IP:
142.251.32.110
(Google's server)
- Source IP:
- Data Link Layer (MAC Address): Your laptop needs to send the packet to its default gateway (your router, 192.168.1.1) to leave the local network.
- It uses ARP to find the MAC address of 192.168.1.1.
- It creates a frame with:
- Destination MAC: The router's MAC address (the next hop).
- Source MAC: Your laptop's MAC address.
- Physical Layer: The frame is converted to bits and sent to the router.
- The Router's Job: The router receives the frame, strips off the Layer 2 header, and looks at the Layer 3 Destination IP (142.251.32.110). It consults its routing table to decide the next hop on the journey to that network. It then re-encapsulates the packet into a new Layer 2 frame with the MAC address of the next router. This process repeats until the packet reaches Google's network.
- At the Destination: Google's server receives the final frame. It de-encapsulates the packet and segment. Seeing Destination Port 80, it delivers the HTTP request to its web server software.
Key Takeaways
Physical address (MAC): Hardware identity, local scope.
Logical address (IP): Software identity, global scope.
Port number: Identifies the application/service on a device.
Together, these ensure end-to-end communication across networks.
Leave a comment
Your email address will not be published. Required fields are marked *