Jerry's Blog

Recording what I learned everyday

View on GitHub


18 September 2019

Network(7) -- Protocol Layers and Their Service Models

by Jerry Zhang

Protocol Layers and Their Service Models

Layered Architecture

Network designers organize protocols—and the network hardware and software that implement the protocols—in layers.

The services that a layer offers to the layer above—the so-called service model of a layer.

The physical layer and data link layers are responsible for handling communication over a specific link, they are typically implemented in a network interface card associated with a given link.

A layer n protocol distributed among the end systems, packet switches, and other components that make up the network.

The protocols of the various layers are called the protocol stack.

The Internet protocol stack consists of five layers: the physical, link, network, transport, and application layers.

Application Layer

Transport Layer

TCP and UDP

We’ll refer to a transport-layer packet as a segment.

Network Layer

The Internet’s network layer is responsible for moving network-layer packets known as datagrams from one host to another.

IP protocol defines the fields in the datagram as well as how the end systems and routers act on these fields.

The network layer contains both the IP protocol and numerous routing protocols.

To move a packet from one node (host or router) to the next node in the route, the network layer relies on the services of the link layer.

Examples of link-layer protocols include Ethernet, WiFi, and the cable access network’s DOCSIS protocol.

We’ll refer to the link-layer packets as frames.

Physical Layer

The job of the physical layer is to move the individual bits within the frame from one node to the next.

The OSI Model

Open Systems Interconnection (OSI) model

application layer, presentation layer, session layer, transport layer, network layer, data link layer,and physical layer.

The role of the presentation layer is to provide services that allow communicating applications to interpret the meaning of data exchanged.

Encapsulation

Routers and link-layer switches are both packet switches.

At the sending host, an application-layer message is passed to the transport layer.

The application-layer message and the transport-layer header information together constitute the transportlayer segment.

The transport layer then passes the segment to the network layer, which adds network-layer header information such as source and destination end system addresses, creating a network-layer datagram.

The datagram is then passed to the link layer, which will add its own link-layer header information and create a link-layer frame.

tags: Network