DCN Unit-4 Notes
DCN Unit-4 Notes
Layered Architecture
The main aim of the layered architecture is to divide the design into small parts. Each lower
layer adds its services to the higher layer to provide a full set of services to manage communications
and run the applications. It provides modularity and clear interfaces, i.e., provides interaction between
subsystems. It ensures the independence between layers by providing the services from lower to higher
layer without defining how the services are implemented.
Therefore, any modification in a layer will not affect the other layers. The number of layers,
functions, contents of each layer will vary from network to network. However, the purpose of each
layer is to provide the service from lower to a higher layer and hiding the details from the layers of
how the services are implemented. The basic elements of layered architecture are services, protocols,
and interfaces.
Protocol: It defines a set of rules that a layer uses to exchange the information with peer entity. These
rules mainly concern about both the contents and order of the messages used.
Interface: It is a way through which the message is transferred from one layer to another layer.
In a layer n architecture, layer n on one machine will have a communication with the layer n on
another machine and the rules used in a conversation are known as a layer-n protocol.
In case of layered architecture, no data is transferred from layer n of one machine to layer n of another
machine. Instead, each layer passes the data to the layer immediately just below it, until the lowest
layer is reached. Below layer 1 is the physical medium through which the actual communication takes
place. In a layered architecture, unmanageable tasks are divided into several small and manageable
tasks.
The data is passed from the upper layer to lower layer through an interface. A Layered
architecture provides a clean-cut interface so that minimum information is shared among different
layers. It also ensures that the implementation of one layer can be easily replaced by another
implementation. A set of layers and protocols is known as network architecture.
Data Communication and Networking
The OSI model is divided into two layers: upper layers and lower layers. The upper layer of the
OSI model mainly deals with the application related issues, and they are implemented only in the
software. The application layer is closest to the end user. Both the end user and the application layer
interact with the software applications. An upper layer refers to the layer just above another layer.
The lower layer of the OSI model deals with the data transport issues. The data link layer and
the physical layer are implemented in hardware and software. The physical layer is the lowest layer of
the OSI model and is closest to the physical medium. The physical layer is mainly responsible for
placing the information on the physical medium.
The purpose of each layer in the OSI reference model is to provide service to the next layer
above it by hiding the upper layer from the complications of the layer below it. Layer 1, 2 and 3 that is
physical, data link and network layers are the Network Support Layer. Layer 5, 6 and 7 which is session,
presentation and application layers is the User Support Layer. Transport layer links the network support
layers and user support layers. OSI Model serves the purpose of providing general design guidelines
for data communication systems. It is a learning tool that can be used to understand how modern
computer systems communicate.
Functions of the OSI Layers
There are seven OSI layers. Each layer has different functions. A list of seven layers are given
below:
1) Physical Layer
2) Data-Link Layer
3) Network Layer
4) Transport Layer
5) Session Layer
6) Presentation Layer
7) Application Layer
Data Communication and Networking
Physical layer
The physical layer is the bottom layer of OSI model. It is concerned with transmitting raw bits over a
physical medium. It defines the physical structure of network (physical topology). The main functionality
of the physical layer is to transmit the individual bits from one node to another node. It is the lowest layer
of the OSI model. It establishes, maintains and deactivates the physical connection. It specifies the
mechanical, electrical and procedural network interface specifications.
Topology
It defines the way how network devices are arranged.
Signals
It determines the type of the signal used for transmitting the information.
Data-Link Layer
A Data Link layer specifies raw data in which bits are grouped into frames and specific frame
format. This layer is responsible for the error-free transfer of data frames. It defines the format of the
data on the network. It provides a reliable and efficient communication between two or more devices.
It is mainly responsible for the unique identification of each device that resides on a local network.
It contains two sub-layers:
Logical Link Control Layer
1) It is responsible for transferring the packets to the Network layer of the receiver that is receiving.
2) It also provides flow control.
Physical Addressing
The Data link layer adds a header to the frame that contains a destination address. The frame is
transmitted to the destination address mentioned in the header. This header defines the physical address
of the sender as well as the receiver.
Flow Control
Flow control is the main functionality of the Data-link layer. It is the technique through which the
constant data rate is maintained on both the sides so that no data get corrupted. It ensures that the
transmitting station such as a server with higher processing speed does not exceed the receiving station,
with lower processing speed.
Error Control
It is a mechanism to prevent duplication of frames in case a frame is destroyed due to noise or other
reasons. Error control is achieved by adding a calculated value CRC (Cyclic Redundancy Check) that
is placed to the Data link layer's trailer which is added to the message frame before it is sent to the
physical layer. If any error seems to occur, then the receiver sends the acknowledgment for the
retransmission of the corrupted frames.
Network Layer
It manages device addressing, tracks the location of devices on the network. It determines the best path
to move data from source to the destination based on the network conditions, the priority of service,
and other factors. The Network layer is responsible for routing and forwarding the packets. Routers are
the layer 3 devices, they are specified in this layer and used to provide the routing services within an
internetwork. The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IPv4 and IPv6.
Functions of Network Layer
Internetworking
An internetworking is the main responsibility of the network layer. It provides a logical connection
between different devices.
Logical Addressing
A Network layer adds the source and destination address to the header of the frame. Addressing is used
to identify the device on the internet. It is used to distinguish the source and destination system used
when packet passes the network boundary.
Data Communication and Networking
Routing
Routing is the major component of the network layer, and it determines the best path out of the multiple
paths from source to the destination.
Transport Layer
The Transport layer ensures that messages are transmitted in the order in which they are sent
and there is no duplication of data. The main responsibility of the transport layer is to transfer the data
completely. It receives the data from the upper layer and converts them into smaller units known as
segments. This layer can be termed as an end-to-end layer as it provides a point-to-point connection
between source and destination to deliver the data reliably.
Functions of Transport Layer
Segmentation and reassembly
When the transport layer receives the message from the upper layer, it divides the message into multiple
segments, and each segment is assigned with a sequence number that uniquely identifies each segment.
When the message has arrived at the destination, then the transport layer reassembles the message
based on their sequence numbers. It identifies and replaces the lost packets during transmission.
Connection control
Transport layer provides two services Connection-oriented service and connectionless service. A
connectionless service treats each segment as an individual packet, and they all travel in different routes
to reach the destination. A connection-oriented service makes a connection with the transport layer at
the destination machine before delivering the packets. In connection-oriented service, all the packets
travel in the single route.
Flow control
The transport layer also responsible for flow control but it is performed end-to-end rather than across
a single link. It controls the data flow between sender and receiver. It ensures that the transmitting
device does not send more data than the receiving device can handle.
Error control
The transport layer is also responsible for Error control. Error control is performed end-to-end rather
than across the single link. The sender transport layer ensures that message reach at the destination
without any error. It corrects faulty transmission. It acknowledges successful transmission.
Data Communication and Networking
Session Layer
The Session layer is used to establish, maintain and synchronizes the interaction between
communicating devices. It is responsible for synchronizing data exchange between computers,
structuring communication sessions and other issues directly related to conversations between network
computers.
Functions of Session layer
Dialog control
Session layer acts as a dialog controller that creates a dialog between two processes or we can say that
it allows the communication between two processes which can be either half-duplex or full-duplex.
Synchronization
Session layer adds some checkpoints when transmitting the data in a sequence. If some error occurs in
the middle of the transmission of data, then the transmission will take place again from the checkpoint.
This process is known as Synchronization and recovery.
Presentation Layer
A Presentation layer is mainly concerned with the syntax and semantics of the information exchanged
between the two systems. The presentation layer structures data that is passed down from the
application layer into a format suitable for network transmission. It acts as a data translator for a
network. This layer is a part of the operating system that converts the data from one presentation format
to another format. The Presentation layer is also known as the syntax layer.
Compression
Data compression is a process of compressing the data, i.e., it reduces the number of bits to be
transmitted. Data compression is very important in multimedia such as text, audio, video.
Application Layer
An application layer serves as a window for users and application processes to access network service.
It handles issues such as network transparency, resource allocation, etc. An application layer is not an
application, but it performs the application layer functions. This layer provides the network services to
the end-users.
Functions of Application layer
File transfer, access, and management (FTAM)
An application layer allows a user to access the files in a remote computer, to retrieve the files from a
computer and to manage the files in a remote computer.
Mail services
An application layer provides the facility for email forwarding and storage.
Directory services
An application provides the distributed database sources and is used to provide that global information
about various objects.
Data Communication and Networking
Application Layer
Transport Layer
Internet Layer
Host-to-network Layer
The first four layers provide physical standards, network interface, internetworking, and
transport functions that correspond to the first four layers of the OSI model and these four layers are
represented in TCP/IP model by a single layer called the application layer. TCP/IP is a hierarchical
protocol made up of interactive modules, and each of them provides specific functionality. Here,
hierarchical means that each upper-layer protocol is supported by two or more lower-level protocols.
Functions of TCP/IP layers
Host-to-Network Layer
A Host-to-Network layer is the lowest layer of the TCP/IP model. A Host-to-Network layer is the
combination of the Physical layer and Data Link layer defined in the OSI reference model. It defines
how the data should be sent physically through the network. This layer is mainly responsible for the
transmission of the data between two devices on the same network. The functions carried out by this
layer are encapsulating the IP datagram into frames transmitted by the network and mapping of IP
addresses into physical addresses. The protocols used by this layer are Ethernet, token ring, FDDI,
X.25, frame relay.
Data Communication and Networking
Internet Layer
An internet layer is the second layer of the TCP/IP model. An internet layer is also known as the
network layer. The main responsibility of the internet layer is to send the packets from any network,
and they arrive at the destination irrespective of the route they take.
Following are the protocols used in this layer are:
IP Protocol
IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP suite. Following
are the responsibilities of this protocol.
ARP Protocol
ARP stands for Address Resolution Protocol. ARP is a network layer protocol which is used to find
the physical address from the IP address. The two terms mainly associated with the ARP Protocol are:
ARP request: When a sender wants to know the physical address of the device, it broadcasts the ARP
request to the network.
ARP reply: Every device attached to the network will accept the ARP request and process the request,
but only recipient recognize the IP address and sends back its physical address in the form of ARP
reply.
RARP Protocol
RARP stands for Reverse Address Resolution Protocol). RARP is used to find the IP address of the
node when its physical address is known.
ICMP Protocol
ICMP stands for Internet Control Message Protocol. It is a mechanism used by the hosts or routers to
send notifications regarding datagram problems back to the sender. A datagram travels from router-to-
router until it reaches its destination. If a router is unable to route the data because of some unusual
conditions such as disabled links, a device is on fire or network congestion, then the ICMP protocol is
used to inform the sender that the datagram is undeliverable.
IGMP (Internet Group Message Protocol): IGMP has been designed to help a multicast router to
identify the hosts in a LAN that are members of a multicast group.
Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which is being
sent over the network. The two protocols used in the transport layer are Transmission control protocol
and User Datagram protocol.
Application Layer
An application layer is the topmost layer in the TCP/IP model. It is responsible for handling high-level
protocols, issues of representation. This layer allows the user to interact with the application. When
one application layer protocol wants to communicate with another application layer, it forwards its data
to the transport layer. There is an ambiguity occurs in the application layer. Every application cannot
be placed inside the application layer except those who interact with the communication system. For
example: text editor cannot be considered in application layer while web browser using HTTP protocol
to interact with the network where HTTP protocol is an application layer protocol.
Following are the main protocols used in the application layer:
HTTP
HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data over the world
wide web. It transfers the data in the form of plain text, audio, video. It is known as a Hypertext transfer
protocol as it has the efficiency to use in a hypertext environment where there are rapid jumps from
one document to another.
SNMP
SNMP stands for Simple Network Management Protocol. It is a framework used for managing the
devices on the internet by using the TCP/IP protocol suite.
SMTP
SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-mail is known
as a Simple mail transfer protocol. This protocol is used to send the data to another e-mail address.
DNS
DNS stands for Domain Name System. An IP address is used to identify the connection of a host to
the internet uniquely. But people prefer to use the names instead of addresses. Therefore, the system
that maps the name to the address is known as Domain Name System.
TELNET
It is an abbreviation for Terminal Network. It establishes the connection between the local computer
and remote computer in such a way that the local terminal appears to be a terminal at the remote system.
FTP
FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for transmitting the files
from one computer to another computer.
TFTP
TFTP stands for Trivial Transfer Protocol. TFTP protocol simply copies the file here they do not need
to solve the problems provided in FTP. Here there are only two operations:
1) Reading - It means copying a file from the server site to the client site.
2) Writing - It means copying a file from the client site to the server site.
Connection-Oriented Service
A connection-oriented service is a network service that was designed and developed after the
telephone system. A connection-oriented service is used to create an end-to-end connection between
the sender and the receiver before transmitting the data over the same or different networks. In
connection-oriented service, packets are transmitted to the receiver in the same order the sender has
sent them. It uses a handshake method that creates a connection between the user and sender for
transmitting the data over the network. Hence it is also known as a reliable network service.
Data Communication and Networking
Suppose, a sender wants to send data to the receiver. Then, first, the sender sends a request
packet to a receiver in the form of an SYN packet. After that, the receiver responds to the sender's
request with an (SYN-ACK) signal/packets. That represents the confirmation is received by the
receiver to start the communication between the sender and the receiver. Now a sender can send the
message or data to the receiver.
Similarly, a receiver can respond or send the data to the sender in the form of packets. After
successfully exchanging or transmitting data, a sender can terminate the connection by sending a signal
to the receiver. In this way, we can say that it is a reliable network service.
TCP (Transmission Control Protocol) is a connection-oriented protocol that allows
communication between two or more computer devices by establishing connections in the same or
different networks. It is the most important protocol that uses internet protocol to transfer the data
from one end to another. Hence, it is sometimes referred to as TCP/IP. It ensures that the connection
is established and maintained until the data packet is transferring between the sender and receiver is
complete.
Connectionless Service
A connection is similar to a postal system, in which each letter takes along different route paths
from the source to the destination address. Connectionless service is used in the network system to
transfer data from one end to another end without creating any connection. So it does not require
establishing a connection before sending the data from the sender to the receiver. It is not a reliable
network service because it does not guarantee the transfer of data packets to the receiver, and data
packets can be received in any order to the receiver. Therefore, we can say that the data packet does
not follow a defined path. In connectionless service, the transmitted data packet is not received by the
receiver due to network congestion, and the data may be lost.
For example, a sender can directly send any data to the receiver without establishing any
connection because it is a connectionless service. Data sent by the sender will be in the packet or data
streams containing the receiver's address. In connectionless service, the data can be travelled and
received in any order. However, it does not guarantee to transfer of the packets to the right destination.
Data Communication and Networking
1 Connection must be established prior to Data is sent without any prior establishment
data transmission. of connection.
2 It requires authentication before It does not require authentication before
transmitting the data packets to the transferring data packets.
receiver.
3 Data transmission speed is low. Data transmission speed is high.
4 It creates a virtual path between the sender It does not create any virtual connection or
and the receiver. path between the sender and the receiver.
5 It is a more reliable connection service It is not a reliable connection service because
because it guarantees data packets transfer it does not guarantee the transfer of data
from one end to the other end with a packets from one end to another for
connection. establishing a connection.
6 It provides acknowledgement. It doesn’t provide acknowledgement.
7 TCP is example of connection-oriented UDP is the example of connectionless
services. services.
Data Communication and Networking
Let's see the differences between the OSI and TCP/IP model in a tabular form: