Computer Networks / Lesson 02 of 12

LESSON 02 · COMPUTER NETWORKS

Layers & Encapsulation

Trace a request from application data to a link frame and back.

Why layers exist

The application layer defines what programs exchange (for example HTTP). The transport layer gives processes end-to-end communication (TCP or UDP). The network layer delivers IP packets across networks. The link layer carries frames over one local hop; the physical layer moves signals.

A layer uses a service offered by the layer below it. The Internet's common model groups these into application, transport, Internet and link layers; the OSI seven-layer model is a teaching reference.

Encapsulation and addressing

When you send data, each layer adds its own control information. HTTP data becomes a TCP segment, then an IP packet, then a link frame. A switch reads link addresses on its local segment; a router reads the destination IP address. At the destination, the layers remove headers in reverse order.

Ports identify application endpoints, IP addresses identify network interfaces or destinations, and MAC addresses identify interfaces on a local link.

Check your understanding

A router forwarding a regular IPv4 packet principally reads which destination?

Go deeper

Read the related protocol reference for more detail. Standards documents can be technical; finish the example before opening them.