Complete Address Translation in the TCP/IP Protocol Suite
Complete Address Translation in the TCP/IP Protocol Suite
The example explains how a message travels from Alice's computer to Bob's web server and how application names, port numbers, IP addresses, and link-layer addresses work together during communication.
The key idea is that Alice only needs to enter the URL:
http://bob.biz/products
The system automatically determines the other addresses required to deliver the request.
1. The different addresses used in the example
The textbook uses symbolic names to represent the addresses.
Symbol | Meaning | Example role |
|---|---|---|
\(N_A\) | Alice's IP address | Identifies Alice's computer |
\(N_B\) | Bob's IP address | Identifies Bob's server |
\(L_A\) | Alice's MAC address | Identifies Alice on her local link |
\(L_B\) | Bob's MAC address | Identifies Bob on his local link |
\(L_1, L_2, L_3, L_4\) | Link-layer addresses of router interfaces | Identify interfaces on the different links |
\(P_A\) | Temporary client port number | Identifies Alice's client-side communication endpoint |
\(P_B\) | Server port number, 80 | Identifies Bob's HTTP service |
Here, \(N\) represents a network-layer address, \(L\) a link-layer address, and \(P\) a port number.
2. Overall network diagram
Alice's computer
IP: \(N_A\) · MAC: \(L_A\)
Link 1
Frame: \(L_A \rightarrow L_1\)
Router R1
Link 1 interface: \(L_1\) · Link 2 interface: \(L_2\)
Link 2
Frame: \(L_2 \rightarrow L_3\)
Router R2
Link 2 interface: \(L_3\) · Link 3 interface: \(L_4\)
Link 3
Frame: \(L_4 \rightarrow L_B\)
Bob's web server
IP: \(N_B\) · MAC: \(L_B\) · HTTP port: 80
Notice that each router has separate link-layer addresses for its interfaces because each interface connects to a different link.
3. Step 1: Alice enters the URL
Alice opens a web browser and enters:
http://bob.biz/products
The URL contains the website name and the resource Alice wants to access. At this point, Alice does not need to know Bob's IP address or MAC address.
DNS resolution
The HTTP client needs Bob's IP address to communicate with the server. It asks the DNS client to resolve the name bob.biz.
DNS sends a request to a DNS server.
The DNS server returns Bob's IP address, represented by \(N_B\).
The HTTP client can now communicate with the server using this IP address.
Important: DNS translates a domain name into an IP address. ARP later translates the IP address of the next node into a link-layer address.
4. Step 2: Transport layer creates a segment
The transport layer receives the request and prepares a segment with two port numbers.
Source port: \(P_A\), a temporary port assigned to Alice's client.
Destination port: \(P_B=80\), the well-known HTTP server port used in the example.
The segment contains the HTTP request and the port information.
At this stage, the transport layer knows the application endpoints, but it does not determine the MAC address needed for the first link.
5. Step 3: Network layer creates a datagram
The network layer encapsulates the segment inside an IP datagram.
The datagram contains:
Field | Address |
|---|---|
Source IP address | \(N_A\) — Alice |
Destination IP address | \(N_B\) — Bob |
These IP addresses remain the same as the datagram travels through R1 and R2 in the example.
The network layer consults its forwarding table to find the next hop toward \(N_B\). Since Bob is on another network, Alice sends the datagram to her default router, R1.
However, the IP address of the next hop is not enough to transmit a frame. Alice must find R1's link-layer address, \(L_1\).
ARP resolution
Alice's computer uses ARP to obtain the MAC address corresponding to R1's IP address on the local link.
Once ARP provides \(L_1\), Alice can construct the first frame.
6. Step 4: Alice creates the first frame
The data-link layer encapsulates the IP datagram in a frame.
The link-layer addresses appear in destination–source order.
Frame sent by Alice on Link 1
Destination MAC
\(L_1\)
R1's interfaceSource MAC
\(L_A\)
Alice's interfaceIP datagram inside the frame
Source IP: \(N_A\) → Destination IP: \(N_B\)
Source port: \(P_A\) → Destination port: \(P_B\)
The physical layer converts the frame's bits into signals and sends them over Link 1.
Notice: The frame is addressed to R1, not directly to Bob, because R1 is the next node on Alice's local link.
7. Step 5: Router R1 forwards the datagram
When R1 receives the signals, the following operations occur:
The physical layer reconstructs the incoming frame.
The data-link layer removes the frame header and passes the IP datagram to the network layer.
The network layer examines the destination IP address, \(N_B\).
R1's forwarding table identifies R2 as the next hop, represented by its IP address \(N_3\) .
ARP resolves that next-hop IP address to R2's link-layer address, \(L_3\).
R1 creates a new frame for Link 2.
The new frame has these addresses:
Field | Address |
|---|---|
Destination MAC | \(L_3\) — R2's interface |
Source MAC | \(L_2\) — R1's interface |
Source IP | \(N_A\) — unchanged |
Destination IP | \(N_B\) — unchanged |
The original frame is not forwarded unchanged. R1 removes its link-layer header and creates a new one for the next link.
8. Step 6: Router R2 forwards the datagram
R2 performs the same process as R1.
It receives the frame on Link 2.
It removes the link-layer header.
It examines the destination IP address, \(N_B\).
Its forwarding table identifies the next hop as Bob's network.
ARP provides Bob's MAC address, \(L_B\).
R2 creates a new frame for Link 3.
The frame addresses become:
Field | Address |
|---|---|
Destination MAC | \(L_B\) — Bob |
Source MAC | \(L_4\) — R2's interface |
Source IP | \(N_A\) — unchanged |
Destination IP | \(N_B\) — unchanged |
This frame is transmitted to Bob's computer.
9. Step 7: Bob receives the request
At Bob's computer, the data moves upward through the protocol layers.
Physical layer
Converts received signals into bits.
Data-link layer
Receives the frame and removes its header and trailer.
Network layer
Processes the IP datagram and passes the segment upward.
Transport layer
Uses destination port \(P_B=80\) to deliver the request to the HTTP server process.
Application layer
The HTTP server processes the request and prepares the products document as an HTML response.
Bob's server then sends the response back to Alice using the reverse communication flow. The response has Bob's IP address as the source and Alice's IP address as the destination. The source and destination port roles are also reversed. The link-layer addresses are selected for each outgoing link.
10. Complete address translation at a glance
The following table summarizes what changes and what remains unchanged as Alice's request travels to Bob.
Address information | Link 1: Alice → R1 | Link 2: R1 → R2 | Link 3: R2 → Bob |
|---|---|---|---|
Source IP | \(N_A\) | \(N_A\) | \(N_A\) |
Destination IP | \(N_B\) | \(N_B\) | \(N_B\) |
Source MAC | \(L_A\) | \(L_2\) | \(L_4\) |
Destination MAC | \(L_1\) | \(L_3\) | \(L_B\) |
Source port | \(P_A\) | \(P_A\) | \(P_A\) |
Destination port | \(P_B\) | \(P_B\) | \(P_B\) |
The table shows the addresses in the logical source-to-destination order for readability. The protocol places destination link-layer address before the source link-layer address in the frame.
Final summary
The complete process demonstrates how the different addressing mechanisms cooperate:
URL / domain name: Identifies the website Alice wants to access.
DNS: Finds Bob's IP address from
bob.biz.Port numbers: Identify the client and HTTP server communication endpoints.
IP addresses: Identify the source and destination across the internetwork.
ARP: Finds the link-layer address of the next node on a local link.
MAC addresses: Deliver each frame over its individual link.
Physical layer: Transmits the bits as signals.
The most important concept is that the IP datagram travels from Alice to Bob with the same source and destination IP addresses, while each router removes the incoming frame header and creates a new frame with link-layer addresses appropriate for the next link.





Comments
Post a Comment