...
The syntax of a network protocol is the structure used in communicating information, such as the formatting of data and control information. Consider the transport control protocol or TCP as an example:
<tcp header image>
...
From the bottom up, each layer provides a defined set of services and guarantees to the next higher layer. Each layer communicates with the peer entity operating the same layer.
<layer and peering figure>
Protocol Layers
Physical Layer
- transmission of data symbols over physical medium
- includes bit synchronization between directly connected devices
- physical (electrical or mechanical) interface between devices
data unit = bit
Data Link Layer
- transfer of blocks of data across communication link between directly connected devices
- includes block synchronization, link error control, and link flow control
- data unit = frame
Network Layer
- transfer of data through communications network
- multiple data link protocols may occur in route between source and destination
- determines best path between source and destination (i.e. routing)
- data unit = packet
Transport Layer
- reliable end-to-end data transfer between source and destination end hosts
- end-to-end error detection and recovery
- end-to-end flow control and congestion response
- segmentation and reassembly of user data blocks
- data unit = segment
Session Layer
- establish and terminate data transfer sessions between applications
Presentation Layer
- data format translation
- encryption/decryption
Application Layer
- user/application software
How can I remember all these layers??
- Please
- Do
- Not
- Throw
- Sausage
- Pizza
- Around
[Shout out to Dr. Russell for this hard-to-forget mnemonic]
Standardization of Layers
The OSI Model
In general standardization of anything improves interoperability of products from different vendors by providing a common, "standard" baseline that all products that claim to follow the particular standard must satisfy. The International Organization for Standards (ISO) Open System Interconnection (OSI) Reference Model (commonly referred to as the OSI model) formally defines the aforementioned layers in a network protocol "stack".
<osi-model-figure>
Over time, the OSI model has proven to have many shortcomings:
- very large number of options
- different layers have various degrees of complexity
- limited "real world" experience/tests prior to establishment
As a result, strict adherence to the OSI model has had limited success in the marketplace. However, many protocols still fit nicely into it and are layered by design.
The TCP/IP Protocol Suite
TCP/IP is a set of protocols that evolved from the US Defense Advanced Research Projects Agency (DARPA) in the 1970s and was intended for use among researchers who wished to share computers across multiple universities. TCP/IP was the predecessor to the Internet and is still the predominant set of protocols used in the Internet today. The success of TCP/IP is largely attributed to the creation of the TCP/IP standards based on practical experience and on looser TCP/IP standards. The TCP/IP standards were developed through the Internet Engineering Task Force (IETF), and are less rigid than those outlined in the OSI model. TCP/IP standards are described in depth in Request for Comment (RFC) documents.
<tcp-ip stack>
<tcp-ip example model>
Data Link Layer
- access to physical medium
- error recovery and flow control between hosts on the same subnet
- various protocols e.g. Ethernet
Internet Layer
- routing and forwarding of packets
- various protocols e.g. IPv4, IPv6, BGP, RIP
Transport Layer
- segmentation and reassembly
- end-to-end connection management
- end-to-end flow control
- end-to-end error detection and recovery
- various protocols e.g. TCP and UDP
Application Layer
- user application data handling
- various protocols e.g. HTTP, FTP
IEEE LAN Standards
IEEE 802 standards focus on lower layer protocols of shared media LANs. There are a number of 802 standards, each with a different purpose or designed for different types of physical LANs
IEEE 802 Standards
The following is a short list of some IEEE 802 standards you might recognize:
Standard | Description |
---|---|
802.1 | General LAN management |
802.2 | Logical Link Control (LLC) protocol |
802.3 | Ethernet |
802.5 | Token ring |
802.11 | Wireless LAN (i.e. WiFi) |
802.15.1 | Bluetooth |
802.15.4 | ZigBee |
802.16 | WiMAX |
Media Access Control (MAC) Sublayer
The MAC sublayer controls access to a medium that is shared by several entities. It is designed to balance fairness and efficiency and includes link layer addressing and error detection (in the form of a checksum).
Logical Link Control (LLC) Sublayer
The LLC sublayer is a point-to-point link layer protocol that resides above the MAC sublayer and the shared medium. LLC abstracts away from higher layers the contention that can be present when using a shared medium. It provides three types of service to higher layers:
- Unacknowledged connectionless mode. This mode allows an entity to send frames either to a single destination, to multiple destinations, or to all destinations on the LAN. The first is referred to as unicast, the second as multicast, and the last as broadcast.
- Connection mode. This mode uses sequence numbers to guarantee frames are (1) arrive to the destination and (2) are ordered correctly upon arrival.
- Acknowledged connectionless mode. This mode is for unicast only (otherwise there could be an undesirably large number of acknowledgements sent in return).
Placement of Layers
Each network protocol has both control information and data. The control information is typically implemented as a header with the data following this header. The data is often referred to as the payload of the header.
<figure for header + payload>
When a network protocol belonging to a higher layer is implemented and placed within the data or payload of a lower layer network protocol, the higher layer protocol is said to be encapsulated within the lower layer.
<encapsulation figure>