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.
- One potential drawback of layering is that one layer may duplicate lower-layer functionality. For example, many protocol stacks provide error recovery on both a per-link basis and an end-to-end basis.
- A second potential drawback is that functionality at one layer may need information (for example, a timestamp value) that is present only in another layer; this violates the goal of separation of layers.
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
- HTTP protocol (which provides for Web document request and transfer)
- SMTP (which provides for the transfer of e-mail messages)
- FTP (which provides for the transfer of files between two end systems).
- domain name system (DNS).
Transport Layer
TCP and UDP
- TCP provides a connection-oriented service to its applications.
- The UDP protocol provides a connectionless service to its applications.
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.
Link Layer
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