Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Contents
outlinetrue
excludeTable of Contents

Question of the Day

If you were to design a network, what attributes or properties would you want the network to exhibit? How would you accomplish these?

Assigned Reading

Chapter 10

...

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 a.k.a. TCP as an example:

<tcp header image>Image Added

 

Lexicon

The lexicon of a network protocol is the collection of valid entries within the structure of the syntax. The lexicon is in other words, the vocabulary of the protocol. Continuing our TCP example, the TCP lexicon dictates that of the possible TCP flags, xor(RST, SYN, FIN) should be in a TCP header.

...

Code Block
languagecpp
if (rx_tcp_packet->ack_num > TCP_CURRENT_ACK_NUM) {
	/* process packet */
} else {
	/* ignore packet -- it was a duplicate */
}

...

Timing

The timing of a network protocol is the use of a clock to internally generate events not initiated by an external stimulus, such as the arrival of a packet. An example of timing in TCP is the use of timers to detect TCP connection timeouts and to retransmit lost data.

...

Together, the semantics and timing of a network protocol define the protocol's behavior. This behavior can be represented by a finite state machine. Typically, the finite state machine of a network protocol is drawn as a state diagram. Consider a simplified state diagram for TCP:

<simple TCP diagram>Image Added

For those who are curious, this is the actual, far more complex state diagram for TCP :<real TCP diagram>(borrowed from ssfnet.org):

Image Added

Don't worry, we won't cover the actual state machine of TCP in ECE 4400/6400 (smile) However, if you're interested, ECE 4380/6380 is highly recommended.

...

<layer and peering figure>

Protocol Layers

Layer 1: 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

Layer 2: 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

Layer 3: 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

Layer 4: 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

Layer 5: Session Layer

  • establish and terminate data transfer sessions between applications

Layer 6: Presentation Layer

  • data format translation
  • encryption/decryption

Layer 7: Application Layer

  • user/application software

...

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>Image Added

Over time, the OSI model has proven to have many shortcomings:

...

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>Below is a figure depicting how the TCP/IP protocol suite fits into the OSI model:

Image Added

The follow figure demonstrates the use of TCP/IP from application-to-application across a network:

Image Added

Note how the web browser and TCP on the end hosts traverse the entire network, while IP and Ethernet are utilized twice – once on each side of the router. The TCP/IP protocol suite is often referred to as a "stack", where each layer is pushed or popped as necessary in order to traverse each network.

Data Link Layer

  • access to physical medium
  • error recovery and flow control between hosts on the same subnet
  • various protocols e.g. Ethernet

...

Internetwork 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

...

StandardDescription
802.1General LAN management
802.2Logical Link Control (LLC) protocol
802.3Ethernet
802.5Token ring
802.11Wireless LAN (i.e. WiFi)
802.15.1Bluetooth
802.15.4ZigBee802.16WiMAX.15.4ZigBee
802.16WiMAX

These standards can be subdivided into Logical Link Control (LLC) and Media Access Control (MAC). The figure below shows how these categorizations fit into the OSI model:

Image Added

 

Media Access Control (MAC)

...

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)

...

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:

  1. 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.
  2. Connection mode. This mode uses sequence numbers to guarantee frames are (1) arrive to the destination and (2) are ordered correctly upon arrival.
  3. 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> payload of the header.

Image Added

Note that some protocols also use a trailer at the end of the payload, such as Ethernet, which includes a trailing checksum.

Image Added

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>As such, a network protocol, if encapsulated is both a payload and a header + data. It is the payload of the layer below it and it is itself a network protocol with separate header and data.

Image Added