Sub topic 2
Starting Point: Application Data
Assume you know what a network and an IP address are, and that you can read bytes and hexadecimal values. This chapter follows an HTTP request as it moves through the transport, network, and link layers.
Application data
An application creates data for a protocol such as HTTP, DNS, or SSH. For example, an HTTP client might create:
GET /index.html HTTP/1.1
The application does not usually add Ethernet or IP information. Lower layers add the information needed to deliver the data.
Transport layer: ports and headers
The transport layer delivers data to the correct application on a host. A port is a number that identifies an application endpoint. HTTP commonly uses port 80, while HTTPS commonly uses port 443.
TCP adds a header containing source and destination ports, sequence numbers, acknowledgment numbers, flags, and a checksum. TCP provides ordered, reliable delivery.
UDP adds a smaller header with source port, destination port, length, and checksum. UDP does not establish a connection or retransmit missing data.
The transport-layer protocol data unit (PDU) is usually called a TCP segment or a UDP datagram.
Network layer: the IP header
The network layer moves data between networks. IPv4 adds a header containing source and destination IP addresses, a time-to-live (TTL) value, and a protocol field. The protocol field identifies the transport protocol, such as TCP or UDP.
The IP packet contains the transport header and its application data:
Link layer: the Ethernet frame
The link layer delivers a packet across one local network segment. Ethernet adds a header containing source and destination MAC addresses and an EtherType field. The EtherType identifies the carried network protocol, such as IPv4.
A MAC address identifies a network interface on the local link. The Ethernet frame is the complete link-layer PDU. Its payload is the IP packet.
| Layer | PDU name | Main addressing |
|---|---|---|
| Transport | Segment or datagram | TCP or UDP ports |
| Network | Packet | IP addresses |
| Link | Frame | MAC addresses |
Exercise
Which fields identify the receiving application, host, and local interface?
Show answer
The destination port identifies the application, the destination IP address identifies the host, and the destination MAC address identifies the local interface used for the next link.