Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Network Protocol Architectures

A protocol architecture is the layered structure of hardware and software


that supports the exchange of data between systems and supports
distributed applications.
• At each layer of a protocol architecture, one or more common
protocols are implemented in communicating systems.
Each protocol provides a set of rules for the exchange of data between systems.
Some of the advantages of the layered architecture include-
 It reduces complexity by breaking network communication into smaller, simpler parts.
This makes learning it easier to understand.
 It standardizes network components to allow multiple-vendor development and support.
 It allows different types of network hardware and software to communicate with each
other(interoperability)
The two most common protocol architectures are the OSI model and TCP-IP models
TCP/IP was being used before development of OSI and the de facto framework for developing a
complete range of computer communications standards. Almost all computer and network
vendors support this architecture.
OSI is a standardized architecture that is often used to describe network communications
functions. It is mainly used for teaching purposes but it is rarely implemented.

OSI model
The Open Systems Interconnection (OSI) reference model was developed by the
International Organization for Standardization (ISO) as a model for a computer
protocol architecture and as a framework for developing protocol standards. The
OSI model consists of seven layers:
• Application
• Presentation
• Session
• Transport
• Network
• Data link
• Physical

Protocol Data Units and Service data unit


A protocol data unit (PDU) represents a unit of data specified in the protocol of a given layer,
which consists of protocol control information, address information and user data.
Layers use ‘PDUs’ (Protocol Data Units) to communicate with corresponding layers on other
systems
Layers use ‘headers’ to encapsulate Protocol Data Units
A Header is a series of fields describing PDU contents
A service data unit (SDU) on the other hand is a unit of data that is passed down from an OSI
layer to a lower layer.
The SDU at any given layer (n), is the PDU of the layer above (n+1). .
.
Protocol Data Units
• Layer 4 – Segment
• Layer 3 – Packet
• Layer 2 – Frame
Each layer provides and receives services to and from adjacent layers
.
Application Layer (Layer 7)
The application layer provides users and application processes access to network services.
Functions provided in this layer include;
· Resource sharing
· Remote file access
· Remote printer access
· Network management
· Directory services
· Electronic messaging (such as mail)
Protocols to be found in this layer include;
· Hypertext Transfer Protocol (HTTP)
· Simple Mail Transfer Protocol (SMTP)
· Domain Name Service (DNS)
· File Transfer Protocol ( FTP)
· Simple Network Management Protocol (SNMP)

Presentation Layer (Layer 6)

This layer translates data from a format used by the application layer into a common format at
the sending station, and then translates the common format to a format known to the
application layer at the receiving station.
Protocols at Layer 6 include American Standard Code for Information Interchange (ASCII), extended
binary-coded decimal interchange code(EBCDIC), Transport Layer Security(TLS) ,Secure
Sockets Layer (SSL),Lightweight Presentation Protocol (LPP) and Network Data Representation
(NDR)

Session Layer (Layer 5)

The session layer establishes, manages, and terminates communication sessions between
applications at each end.
The layer deals with time management, who transmits and when.
Protocols at Layer 5 include; NetBIOS, Password Authentication Protocol (PAP)
Session Control Protocol(SCP),Point-to-Point Tunneling Protocol (PPTP)

Transport Layer (Layer 4)


The transport layer ensures error-free process to process message delivery. It also ensures
that the messages are in sequence, and with no losses or duplications.
The transport layer provides:
• Message segmentation: accepts a message from the (session) layer above it, splits the
message into smaller units and passes them down to the network layer. The transport layer
at the destination station reassembles the message.
• Message acknowledgment: provides reliable end-to-end message delivery with
acknowledgments.
• Message traffic control: tells the transmitting station to "back-off" when no message
buffers are available.
• Session multiplexing: multiplexes several message streams into one logical
Link.
Two common transport protocols are the TCP (Transmission Control Protocol) and the
UDP (User Datagram Protocol) .
TCP is connection oriented i.e a path has to be set before data is transmitted while
UDP is a connectionless protocol.

End-to-end layers
The above four layers are end to end layers and are not concerned with the details of the
underlying communications.
In these end to end layers software at the source station communicates with similar software on
the destination station using message headers and control messages.

Network Layer (Layer 3)


The network layer controls the operation of the subnet, deciding which physical path the data
should take based on network conditions, priority of service, and other factors.
The network layer provides:
• Routing
• Logical-physical address mapping: translates logical addresses, or names, into physical
addresses.
• The network device in this layer is the router.
• PDU at Layer 3 is a Packet
Protocols at Layer 3 include;
• IP, ARP

Data Link Layer(Layer 2)


The data link layer provides error-free transfer of data frames from one node to another.
the data link layer provides:
• Link establishment and termination: establishes and terminates the logical link
between two nodes.
• Frame traffic control: tells the transmitting node to "back-off" when no frame
buffers are available.
• Frame sequencing: transmits/receives frames sequentially.
• Frame acknowledgment: provides frame acknowledgments. Detects and
recovers from errors that occur in the physical layer by retransmitting non acknowledged
frames and handling duplicate frame receipt.
• Frame delimiting: creates and recognizes frame boundaries.
• Frame error checking: checks received frames for integrity.
• Media access management: determines when the node "has the right" to use the
physical medium.
This layer consists of two sub layers:
1. Logical Link Control (LLC): Defines how data is transferred over the cable and
provides data link service to the higher layers.
2. Medium Access Control (MAC): Controls media access by regulating the
nodes using pre-defined set of rules. (i.e. Token passing,CSMA/CD)
Network devices in this layer are;
Switches, bridges, NIC cards
The protocols used in this layer are Ethernet 802.11, Token ring etc etc

Physical Layer (Layer 1)


The physical layer deals with the transmission and reception of the raw bit stream over a
physical medium. It describes the electrical/optical, mechanical, and functional interfaces to the
physical medium.
This physical layer provides:
Data encoding: What will represent the zeros and one over the physical medium
Physical medium transmission: transmits bits as electrical or optical signals appropriate for the
physical medium.
Standards in physical layer are:
RS-232(for serial lines), X.21, EIA 232
Network devices include;
Hubs, repeaters
Examples of Protocols at Layer 1 are
10BaseT, 100BaseTX, 100 Base FX

The TCP/IP Model


The TCP/IP model is one of the most common and widely used network model.
This model was specified and extensively used before OSI model.
It is known as the internet model or the DOD model (US Department of Defense) as it was
funded by the US Defense Advanced Research Project Agency (DARPA) for its packet switched
network (ARPANET)
It is the model mainly used by the Internet.

The TCP/IP model layers


 Application Layer
 Transport Layer
 Internet Layer
 Network Access Layer (also called Network interface layer)
OSI and TCP/IP Model layers compared
Application Layer
• The Application Layer provides the user with the interface to the communication
network.
• Applications like the the web browser, ftp, e-mail or other client applications run on the
application layer
• The Application Layer sends to the Transport layer at the transmitting station and
receives data from the Transport Layer at the reciving station
• Applications that ride on TCP or UDP use a pair of sockets ( IP address+port number)

Transport Layer
• The Transport Layer just like in the OSI model is concerned with end-to-end (host-to-
host) delivery of packets.
• Transmission Control Protocol (TCP) provides reliable, connection-oriented transport of
data between two endpoints (sockets) on two computers that use Internet Protocol(IP)
• A socket is an endpoint for communication flow between two programs running over a
network and is a combination of an IP address and a port number
• TCP uses a three-way handshake before starting transfer of data. A TCP segment
requires more header fields in order to guarantee reliability and has 20 bytes of
overhead (header).
• User Datagram Protocol (UDP) provides unreliable, connectionless transport of data
between two endpoints (sockets) on two computers using Internet Protocol (IP)
• UDP does not establish a path before sending data and therefore has less delay as
compared to TCP.
• UDP has only 8 bytes of overhead and is advantageous over TCP especially for low-
volume data.

TCP Header
Source port (2 octets)-identifies the sending port
Destination port (2 octets)-identifies the receiving port
Sequence number (32 bits) -Specifies the sequence number of the first byte of data of the
segment.

Acknowledgment number (32 bits) specifies the position of the last byte.

Data offset (4 bits) this specifies the size of the TCP header in 32-bit words.
Reserved (3 bits) reserved for future use.
Flags (9 bits) 9 Control bits
Window size (16 bits) specifies the size of the receive window
Checksum (16 bits) used for error-checking
Urgent pointer (16 bits) offset from the sequence number
Options determined by the data offset field
Padding-The padding is for filling up the 32bit word and ensure that data starts on the 32- bit
boundary.

Three Way TCP Handshake


The three way handshake works as follows;
Host A sends a TCP SYNchronize packet to Host B
Host B receives A's SYN
Host B sends a SYNchronize-ACKnowledgement
Host A receives B's SYN-ACK
Host A sends ACKnowledge
Host B receives ACK.
TCP socket connection is ESTABLISHED

UDP Header

Source Port Number is the address of the information sending port.


Destination Port Number is the address of receiving port.
Length is the length of the UDP datagram in octets.
Checksum used for error control.

Internet layer
• The Internet Layer provides connectionless communication across one or more networks
• Each packet travels in the network independently of each other. The packets may arrive
out of order or may not arrive at all.
• Internet Protocol provides the logical addressing and routing functions that forward
packets from one network to another.
• The Internet Layer is concerned with network to network communication.

Internet Layer Header Format

IP Version 4 header structure


Version: the 4 bit field indicates the IP version (4 or 6).
IHL(Internet Header Length): This indicates the number of 32-bit words in the header.
Type of Service: Type of service indicates the quality of service desired. Some type of traffic
may be prioritized.
Total length: The total length is in bytes including the payload.
Identification: Identification is used to identify fragments of an IP datagram. It is used for
reassembly of the fragments at the receiver.
IP Flags: Flag is a three-bit field that controls and identifies fragmentation.
The following is a possible configuration:
Bit 0: is reserved and has to be set to zero
Bit 1: ‘0’ means fragment ‘1’ means do not fragment.
Bit 2: ‘1’ means more fragments are following ‘)’ otherwise.
Fragment Offset: Fragment Offset gives the position of the fragment on the datagram. It
represents the number of bytes ahead of the particular fragment in that specific datagram.
Time to live: This is an 8-bit field that indicates the maximum amount of time in seconds that
the datagram will live in the internet.
Protocol: This field denotes transport protocol used in the upper layer. E.g . TCP, UDP, etc.
Header Checksum: this field carries a 16 bits header checksum, which is used to check the
header for any errors at the destination.
Source Address: The source address is a 32-bit address of the source.
Destination address: The destination address is a 32 bit address of the destination.
IP Options: This field is optional. It is used when the value internet header is greater than 20
bytes. The options include security, time stamp etc.
Data: This is the data from the upper layer.

The IP version 6 Header

The IPv6 header shown below is simple and easy to process. This enables IPv6 devices the
ability to spend the majority of their time dealing with the data contained within the packet and
not the packet header itself.

The IPv6 Header Description


Version (4 bits)
The version field is 4 bits long .The processing equipment is able to identify the version of the IP
header. For IPv6 header the value of the Version field is 6 (0110).

Traffic Class (8 bit)


The Traffic Class field signifies the priority level of the data contained within this specific
packet.
Flow Label (20 bits) The flow label field is used to track specific traffic flows at the network layer
A flow contains multiple packets which should each be treated exactly the same way by
intermediate routing devices. This helps reduce processing time.
Payload Length (16 bits)
The Payload Length field is indicates the total size of the payload contained in the IPv6 packet.
Next Header (8 bits)
The next header field indicates what to expect after the basic IPv6 header; this includes options
like a TCP or UDP header and packet.
Hop Limit (8 bits)
The Hop Limit limits the total number of hops that the specific packet is allowed to travel
Source Address (128 bits)
The source address field is 128 bits long and indicates the source of the packet
Destination Address (128 bits)
The destination address field is 128 bits long and indicates the destination of the packet.

Network access Layer


The Network Access Layer provides access to the physical network.
• The purpose of a network interface is to allow computers to access the physical channel
which may be wired, wireless or fiber optic cable to send data to other computers.
Ethernet, FDDI, Token Ring, ATM, Wi-Fi are network interfaces found in this layer.

Ethernet header

Ethernet is the most widely used layer 2 protocol


Description.
 PREAMBLE – This is a pattern of alternate 0’s and 1’s which indicates starting of the
frame which allows sender and receiver to achieve bit synchronization. .
 Start of frame delimiter (SFD) – SFD indicates that upcoming bits are starting of the
frame, which is the destination address. This is set to 10101011. ..
 Destination Address – This field contains the MAC address of the destination node.
 Source Address – This field contains the MAC address of source node.
 Length – Indicates the length of entire Ethernet frame. .
 Data – This is the data from the upper layer. .
 FCS – Frame check sequence in this case Cyclic Redundancy Check (CRC) is a 4
Byte field used the error checking. .

Encapsulation
This is the process by which one layer packages it’s data in ‘headers’ with fields that adjacent
and peer layers understand.
Application data is broken down into data segments and encapsulated in Transport Layer PDU's
(TCP or UDP segments).
The Transport Layer PDUs are then encapsulated in Internet Layer Protocol Data Units (IP
datagram)
The Internet Protocol packets are then chopped into frames at the Network Access layer and
transmitted across the physical media (copper wires, fiber optic cables or the air) to the next
station in the network.
Further reading – Data and Computer communications Chapter 2

You might also like