NCS Unit 3 - Network Protocols OSI
NCS Unit 3 - Network Protocols OSI
This physical layer deals with things like what are bits 0 and 1, the communication modes
such as serial/parallel, simplex/ half-duplex/duplex, synchronous/asynchronous, etc.
The functions like error detection and correction, acknowledgements and retransmissions
are clubbed under the name error control, and constitute an important part of the
communications software called Data link layer.
The data link layer also takes care of flow control that is the speed mismatch between any
two adjacent communicating nodes.
If the sending node sends data too fast the slow speed receiver will lose the message, hence
the speed should be continuously adjusted or monitored and this process is called flow
control.
If the message size is large the probability of an error is higher, so that large messages are
broken down in smaller chunks or blocks called packets or frames.
And the packets are transmitted over a shared transmission medium, so there would be a
data collision between messages of different nodes of the network.
There are two ways to reach the message from source node to destination node as virtual
circuit approach and the datagram approach.
These kind of routing, switching of packets between source node to destination node is
monitored and maintained by the Network layer of the protocol.
The establishment of connection between nodes, which node should access medium at
what time, and the completion of transmission and making termination of the connection
are managed and maintained by Session Layer of the protocol.
The data encryption/decryption or compression/decompression and code
conversions/translations are done before handing the message over to the destination
node are done by the presentation layer.
3.2. The OSI model:
The Open System interface (OSI) model is structured and layered protocol having seven
layers.
Assume a network having many hosts and suppose
host X wants to send a message to another host Y. Layer Layer
This message would travel via a number of Number Name
intermediate nodes. 1 Application Layer
These intermediate nodes as well as X and Y are
2 Presentation Layer
concerned with the three lowermost OSI layers, i.e.
physical, data link and network. 3 Session Layer
The other four layers are used by the sender (X) and 4 Transport Layer
the recipient (Y) only. Therefore, they are called end-
to-end layers. 5 Network Layer
Within a host each layer calls upon the services of its 6 Data Link layer
lower layer. For instance, layer 7 uses the services
7 Physical Layer
provided by layer 6. Layer 6 in turn, uses the services
of layer 5, and so on.
Between X and Y, the communication appears to be taking place between the layers at the
same level.
This is called as virtual communication or virtual path between X and Y.
The functions of the first three layers are contained in a special computer called a switch.
You could, now, construct a network of all switches, and imagine that the nodes are
attached to the various switches as shown.
All that we said about data link layer functions, routing, etc. is still valid as we can see.
When node A wants to send a message to node G, node A sends it to switch SA. After this, it
gets through a specific route to router SF, and then it reaches the node G.
At the lowest physical layer, the data is transmitted as voltage pulses across the
communication medium.
That means that the application layer hands over the entire data to the presentation layer.
Let us call this as L7 data, after the presentation layer receives and processes this data, it
adds its own header to the original data and sends it to the next layer in the hierarchy.
Therefore, from the presentation layer to the session layer, the data is sent as L7 data + H6,
where H6 is the header added by the sixth layer. L7 data + H6 is the input data and let us
call this L6 data.
When the session layer sends this data to the transport layer, it sends the original data L6
plus its own header H5 together and so on.
In the end, the original data (L7) and all the headers are sent across the physical medium
where by a reverse process, the headers get dropped to recover the original data L7.
The physical layer is concerned with sending raw bits between the source and destination
nodes through intermediate nodes.
To do this, the source and the destination nodes have to agree on a number of factors, such
as, what voltage constitutes a bit value 0 and 1, what is the bit interval, whether the
communication is simplex, half duplex or full duplex, and so on.
It also deals with the electrical and mechanical specifications of the cables, connectors, and
interfaces such as RS 232-C, etc.
The data link layer is responsible for transmitting a group of bits between the adjacent
nodes.
The group of bits is generally called frame or packet.
The network layer passes a data unit to the data link layer.
At this stage, the data link layer adds the header information and this now becomes a data
unit to be passed to the physical layer.
The header contains the addresses and other control information.
The addresses at this level refer to the physical addresses of the adjacent nodes in the
network, between which the frame is being sent.
Thus, these addresses change as the frame travels from different nodes on a route from the
source node to the destination node.
The addresses of the source and destination nodes are already a part of data unit
transferred from the network layer to the data link layer.
Synchronization: Headers contains bits to synchronize its timing to know the bit
interval to recognize the bit correctly.
Error control: It checks the CRC to ensure the correctness of the frame. If incorrect,
it asks for retransmission. Fro this there are multiple schemes positive
acknowledgement, negative acknowledgement, go-back-n, sliding window, etc.,
Node-to-node delivery: Finally, it is responsible for error-free delivery of the entire
frame/ packet to the next adjacent node.
3.4.3. Network Layer:
The network layer is responsible for routing a packet within the network. May be from the
source to the destination nodes across multiple nodes in the same network, or across
multiple networks.
This layer ensures the successful delivery of a packet to the destination node.
To perform this, it has to choose a route by using the methods either virtual circuit or
datagram approach.
This layer is also responsible for tackling the data congestion problem at a node.
This layer has to carry out the accounting function to facilitate this billing based on how
many packets are routed, when etc.
When packets are sent across national boundaries, the rates may change, thus making this
accounting function complex.
A router can connect two networks with different protocols, packet lengths and formats.
The network layer is responsible for the creation of a homogenous network by helping to
overcome these problems.
At this layer, a header is added to a packet, which includes the logical addresses of source
and destination.
The transport layer may also establish a logical connection between the source and the
destination.
This connection consists of three phases: establishment, data transfer and connection
release.
The responsibilities of the transport layer are as follows:
Host-to-host message delivery: Ensuring that all the packets of a message sent by a
source node arrive at the intended destination.
Application-to-application communication: The transport layer enables
communication between two applications running on different computers.
Segmentation and reassembly: The transport layer breaks a message into packets,
numbers them by adding sequence numbers at the source and uses the sequence
numbers at the destination to reassemble the original message.
Connection: The transport layer might create a logical connection between the source
and the destination for the duration of the complete message transfer for better control
over the message transfer.
3.4.5.Session Layer:
The main functions of the session layer are to establish, maintain and synchronize the
interaction between two communicating hosts.
It makes sure that a session once established is closed gracefully, and not abruptly.
Suppose that after the first 105 pages have been sent, the connection between the two
hosts is broken for some reason, the Session layer checks and establishes connections
between the hosts of two different users.
For this, the users might need to enter identification information such as login and
password.
The session layer also decides whether the communication is simplex, half duplex or full
duplex.
For example, suppose that a user wants to send a very big document consisting of 1000
pages to another user and there is a break at the middle if transmission of file.
To avoid a complete retransmission from the first page, the session layer between the two
hosts could create sub-sessions.
After each sub-session is over, a checkpoint can be taken. In some cases, the check pointing
may not be required at all as the data being transmitted is small.
When the session layer receives data from the presentation layer and it adds a header to it
which contains information about check points.
Dialog control: The session layer also decides which user or application sends data,
and at what point of time, and whether the communication is simplex, half duplex or full
duplex.
Session closure : The session layer ensures that the session between the hosts is closed
gracefully.
3.4.6.Presentation Layer:
When two hosts are communicating with each other, they might be using different coding
standards and character sets for representing data internally.
For example one host could be using ASCII code for character representation, whereas the
other host could be using EBCDIC then the presentation layer has to take care of such
differences.
It is also responsible for data encryption/decryption for security and data
compression/decompression for more efficiency in data transmission. To summarize, the
3.4.7.Application Layer:
The application layer is the topmost layer in the OSI model it enables a user to access the
network.
The application programs using the network services also reside at this layer.
This layer provides user interface for network applications such as remote log in
(TELNET), World Wide Web (WWW), File Transfer Protocol (FTP), electronic mail (email),
remote database access, etc.
The users and application programs interact with a physical network at this layer.
This should not be confused with the application system like accounting or purchasing etc.
If an accounting application requires an access to a remote database, or wants a file to be
transferred, it will invoke the appropriate application layer.
Thus the layer can be considered as consisting of the application such as FTP, email, WWW,
etc. which are the different ways in which one can access the network services.
Thus, the application layer provides an abstracted view of the layers underneath, and
allows the users and applications to concentrate on their tasks, rather than worrying about
lower level network protocols.