DCN Unit 2
DCN Unit 2
OSI Model
o OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical
medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
o OSI model was developed by the International Organization for Standardization (ISO) in
1984, and it is now considered as an architectural model for the inter-computer
communications.
o OSI model divides the whole task into seven smaller and manageable tasks. Each layer is
assigned a particular task.
o Each layer is self-contained, so that task assigned to each layer can be performed
independently.
Characteristics of OSI
o The OSI model is divided into two layers: upper layers and lower layers.
o 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.
o 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.
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
1) Physical layer
o The main functionality of the physical layer is to transmit the individual bits from one node
to another node.
o It is the lowest layer of the OSI model.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface specifications.
2) Data-Link Layer
o 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.
o 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.
o Error Control: 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 occurr, then the
receiver sends the acknowledgment for the retransmission of the corrupted frames.
o Access Control: When two or more devices are connected to the same communication
channel, then the data link layer protocols are used to determine which device has control
over the link at a given time.
3) Network Layer
o It is a layer 3 that manages device addressing, tracks the location of devices on the
network.
o 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.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices, they are specified in this layer and used to provide the
routing services within an internetwork.
o The protocols used to route the network traffic are known as Network layer protocols.
Examples of protocols are IP and Ipv6.
o this case receiver does not send any acknowledgment when the packet is received,
the sender does not wait for any acknowledgment. Therefore, this makes a protocol
unreliable.
5) Session Layer
The session layer is Layer 5 layer from the bottom in the OSI model. The job
of the session layer is to control and maintain connections between systems
to share data. It establishes, maintains, and ends sessions across all channels.
In case of a network error, it checks the authenticity and provides recovery
options for active sessions. It manages sessions and synchronizes data flow.
Basically, this layer regulates when computers can send data and how much
data they can send. Essentially it coordinates communication between
devices.
6) Presentation Layer
o A Presentation layer is mainly concerned with the syntax and semantics of the information
exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one presentation
format to another format.
o The Presentation layer is also known as the syntax layer.
7) Application Layer
o An application layer serves as a window for users and application processes to access
network service.
o It handles issues such as network transparency, resource allocation, etc.
o An application layer is not an application, but it performs the application layer functions.
o This layer provides the network services to the end-users.
The TCP/IP model refers to the Transmission Control Protocol/Internet Protocol Model.
This model is a part of the network domain designed specifically for overseeing
efficient and error-free transmission of data.
The model works on a four-layered architecture model, where each layer implicit the
required network protocols on the data to be transmitted, which remodels the data to
the most optimum structure for efficient transmission over the network.
• Application layer
• Transport layer
• Internet layer
Each layer performs a specific task on the data that is being transmitted over the
network channel, and data moves from one layer to another in a preset pattern as
mentioned below:
Application Layer
o An application layer is the topmost layer in the TCP/IP model.
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.
framework used for managing the devices on the internet by using the TCP/IP
protocol suite.
o 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.
o 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.
o 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.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol
used for transmitting the files from one computer to another computer.
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 User Datagram protocol and
Transmission control protocol.
o User Datagram Protocol discovers the error, and ICMP protocol reports
the error to the sender that user datagram has been damaged.
in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
o UDP does not specify which packet is lost. UDP contains only checksum;
it does not contain any ID of a data segment.
o Transmission Control Protocol (TCP)
o At the sending end, TCP divides the whole message into smaller units
known as segment, and each segment contains a sequence number
which is required for reordering the frames to form an original message.
o At the receiving end, TCP collects all the segments and reorders them
based on sequence numbers.
Internet Layer
o An internet layer is the second layer of the TCP/IP model.
o An internet layer is also known as the network layer.
o 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.
o Following are the protocols used in this layer are
o IP Protocol: IP protocol is used in this layer, and it is the most significant part of
the entire TCP/IP suite.
o Following are the responsibilities of this protocol
o IP Addressing: This protocol implements logical host addresses known as IP addresses.
The IP addresses are used by the internet and higher layers to identify the device and to
provide internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be
transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the transport
layer protocol. An IP protocol ensures that the data is sent and received securely, it
encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by
data link layer protocol is known as Maximum Transmission unit (MTU). If the size of IP
datagram is greater than the MTU unit, then the IP protocol splits the datagram into
smaller units so that they can travel over the local network. Fragmentation can be done by
the sender or intermediate router. At the receiver side, all the fragments are reassembled
to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN,
it is known as direct delivery. When source and destination are on the distant network,
then the IP datagram is sent indirectly. This can be accomplished by routing the IP
datagram through various devices such as routers.
Model −
OSI TCP/IP
gateway between the network and the protocol that assigns the network of hosts
final-user. over the internet.
The OSI model was developed first, and The protocols were created first and then
then protocols were created to fit the built the TCP/IP model.
network architecture’s needs.
The OSI model represents defines It does not mention the services, interfaces,
administration, interfaces and and protocols.
conventions. It describes clearly which
layer provides services.
The protocols of the OSI model are better The TCP/IP model protocols are not
unseen and can be returned with another hidden, and we cannot fit a new protocol
appropriate protocol quickly. stack in it.
The smallest size of the OSI header is 5 The smallest size of the TCP/IP header is
bytes. 20 bytes.
OSI TCP/IP
Protocols are unknown in the OSI model In TCP/IP, returning protocol is not difficult.
and are returned while the technology
modifies.
An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.
DNS is a TCP/IP protocol used on different platforms. The domain name space is divided
into three different sections: generic domains, country domains, and inverse domain.
Generic Domains
o It defines the registered hosts according to their generic behavior.
o Each node in a tree defines the domain name, which is an index to the DNS
database.
o It uses three-character labels, and these labels describe the organization type.
o Label Description
Country Domain
The format of country domain is same as a generic domain, but it uses two-
character country abbreviations (e.g., us for the United States) in place of
three character organizational abbreviations.
Inverse Domain
The inverse domain is used for mapping an address to a name. When the
server has received a request from the client, and the server contains the files
of only authorized clients. To determine whether the client is on the authorized
list or not, it sends a query to the DNS server and ask for mapping an address
to the name.
Working of DNS
o DNS is a client/server network communication protocol. DNS clients send requests to the.
server while DNS servers send responses to the client.
o Client requests contain a name which is converted into an IP address known as a forward
DNS lookups while requests containing an IP address which is converted into a name
known as reverse DNS lookups.
o DNS implements a distributed database to store the name of all the hosts available on the
internet.
o If a client like a web browser sends a request containing a hostname, then a piece of
software such as DNS resolver sends a request to the DNS server to obtain the IP address
of a hostname. If DNS server does not contain the IP address associated with a hostname,
then it forwards the request to another DNS server. If IP address has arrived at the resolver,
which in turn completes the request over the internet protocol.
HTTP
o HTTP stands for HyperText Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain text, hypertext,
audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its efficiency that allows
us to use in a hypertext environment where there are rapid jumps from one document to
another document.
o HTTP is similar to the FTP as it also transfers the files from one host to another host. But,
HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection to
transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and server. The HTTP
differs from the SMTP in the way the messages are sent from the client to the server and
from server to the client. SMTP messages are stored and forwarded while HTTP messages
are delivered immediately.
Features of HTTP:
o Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server. When the server receives the request,
the server processes the request and sends back the response to the HTTP client after
which the client disconnects the connection. The connection between client and server
exist only during the current request and response time only.
o Media independent: HTTP protocol is a media independent as data can be sent as long
as both the client and server know how to handle the data content. It is required for both
the client and server to specify the content type in MIME-type header.
o Stateless: HTTP is a stateless protocol as both the client and server know each other only
during the current request. Due to this nature of the protocol, both the client and server
do not retain the information between various requests of the web pages.
SMTP
o SMTP stands for Simple Mail Transfer Protocol.
o SMTP is a set of communication guidelines that allow software to transmit an electronic
mail over the internet is called Simple Mail Transfer Protocol.
o It is a program used for sending messages to other computer users based on e-mail
addresses.
o It provides a mail exchange between users on the same or different computers, and it also
supports:
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers. The
servers have a way of identifying themselves and announcing what kind of communication
they are trying to perform. They also have a way of handling the errors such as incorrect
email address. For example, if the recipient address is wrong, then receiving server reply
with an error message of some kind.
Components of SMTP
o First, we will break the SMTP client and SMTP server into two components such as user
agent (UA) and mail transfer agent (MTA). The user agent (UA) prepares the message,
creates the envelope and then puts the message in the envelope. The mail transfer agent
(MTA) transfers this mail across the internet.
o SMTP allows a more complex system by adding a relaying system. Instead of just having
one MTA at sending side and one at receiving side, more MTAs can be added, acting either
as a client or server to relay the email.
Working of SMTP
1. Composition of Mail: A user sends an e-mail by composing an electronic mail message
using a Mail User Agent (MUA). Mail User Agent is a program which is used to send and
receive mail. The message contains two parts: body and header. The body is the main part
of the message while the header includes information such as the sender and recipient
address. The header also includes descriptive information such as the subject of the
message. In this case, the message body is like a letter and header is like an envelope that
contains the recipient's address.
2. Submission of Mail: After composing an email, the mail client then submits the
completed e-mail to the SMTP server by using SMTP on TCP port 25.
3. Delivery of Mail: E-mail addresses contain two parts: username of the recipient and
domain name. For example, vivek@gmail.com, where "vivek" is the username of the
recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's domain
name, then MSA will send the mail to the Mail Transfer Agent (MTA). To relay the email,
the MTA will find the target domain. It checks the MX record from Domain Name System
to obtain the target domain. The MX record contains the domain name and IP address of
the recipient's domain. Once the record is located, MTA connects to the exchange server
to relay the message.
4. Receipt and Processing of Mail: Once the incoming message is received, the exchange
server delivers it to the incoming server (Mail Delivery Agent) which stores the e-mail
where it waits for the user to retrieve it.
5. Access and Retrieval of Mail: The stored email in MDA can be retrieved by using MUA
(Mail User Agent). MUA can be accessed by using login and password.
Telnet
o The main task of the internet is to provide services to users. For example, users want to
run different application programs at the remote site and transfers a result to the local
site. This requires a client-server program such as FTP, SMTP. But this would not allow us
to create a specific program for each demand.
o The better solution is to provide a general client-server program that lets the user access
any application program on a remote computer. Therefore, a program that allows a user
to log on to a remote computer. A popular client-server program Telnet is used to meet
such demands. Telnet is an abbreviation for Terminal Network.
o Telnet provides a connection to the remote computer in such a way that a local terminal
appears to be at the remote side.
Remote login
The user sends the keystrokes to the terminal driver, the characters are then sent
to the TELNET client. The TELNET client which in turn, transforms the characters to
a universal character set known as network virtual terminal characters and delivers
them to the local TCP/IP stack
The commands in NVT forms are transmitted to the TCP/IP at the remote machine.
Here, the characters are delivered to the operating system and then pass to the
TELNET server. The TELNET server transforms the characters which can be
understandable by a remote computer. However, the characters cannot be directly
passed to the operating system as a remote operating system does not receive the
characters from the TELNET server. Therefore it requires some piece of software
that can accept the characters from the TELNET server. The operating system then
passes these characters to the appropriate application program.
FTP
o FTP stands for File transfer protocol.
o FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from
one host to another.
o It is mainly used for transferring the web page files from their creator to the computer that
acts as a server for other computers on the internet.
o It is also used for downloading the files to computer from other servers.
Objectives of FTP
o It provides the sharing of files.
o It is used to encourage the use of remote computers.
o It transfers the data more reliably and efficiently.
o Control Connection: The control connection uses very simple rules for communication.
Through control connection, we can transfer a line of command or line of response at a
time. The control connection is made between the control processes. The control
connection remains connected during the entire interactive FTP session.
o Data Connection: The Data Connection uses very complex rules as data types may vary.
The data connection is made between data transfer processes. The data connection opens
when a command comes for transferring the files and closes when the file is transferred.
The presentation layer is one of the seven layers in the Open Systems Interconnection
(OSI) model of networking. It is responsible for formatting and presenting data in a way
that is both understood by the sender and can be interpreted by the receiver. In essence,
the presentation layer ensures that data transmitted between systems is in a compatible
format, meaning that the data is encoded and properly formatted based on the standards
of both sender and receiver.
o It encodes the messages from the user dependent format to the common
format and vice versa, for communication among dissimilar systems.
More specifically, the presentation layer provides a set of services to ensure that
information is intelligible to an application or user interface. This includes:
1. Data Translation: The presentation layer serves as a data translator, converting data from
one format to another, if necessary. For example, it can convert data from ASCII to Unicode
formats.
2. Data Encryption: The presentation layer can encrypt data to provide access control and
privacy during transmission, securing the data between the sender and receiver. This is
especially important for sensitive or confidential information.
3. Data Compression: Data compression reduces the amount of data that must be
transmitted from one system to another. The presentation layer provides data
compression services to minimize the data transmitted during communication.
4. Data Formatting: The presentation layer reformats data according to the requirements
of the application. For example, it might convert a spreadsheet into a graph or a chart for
a user interface.
5. Error detection and correction: The presentation layer provides error detection and
correction services to ensure that any data transmission errors are detected and corrected
quickly, to ensure that the correct data is transmitted.
In summary, the presentation layer provides services that ensure that data sent between
two systems is accurately represented, secured, and formatted for the receiving system. It
also provides management of multiple sessions between applications and provides error
detection and correction to ensure that the correct data is transmitted.
The session layer is Layer 5 layer from the bottom in the OSI model. The job
of the session layer is to control and maintain connections between systems
to share data. It establishes, maintains, and ends sessions across all channels.
In case of a network error, it checks the authenticity and provides recovery
options for active sessions. It manages sessions and synchronizes data flow.
Basically, this layer regulates when computers can send data and how much
data they can send. Essentially it coordinates communication between
devices.
• Data flow control is an important function of the session layer. It ensures that
data is transmitted at a rate that the receiver can handle. If data is transmitted
too quickly, the receiver may not be able to process it all, leading to data loss
and retransmissions. If data is transmitted too slowly, it may lead to delays in
the communication session.
The session layer uses several techniques to manage data flow control. One
of the techniques is called buffering, where data is temporarily stored in the
sender’s device until it can be transmitted to the receiver. Another technique
is called windowing, where the sender and receiver agree on a window size
that determines how much data can be transmitted at a time.
Simplex mode
o In Simplex mode, the communication is unidirectional, i.e., the data flow in one direction.
o A device can only send the data but cannot receive it or it can receive the data but cannot
send the data.
o This transmission mode is not very popular as mainly communications require the two-
way exchange of data. The simplex mode is used in the business field as in sales that do
not require any corresponding reply.
o The radio station is a simplex channel as it transmits the signal to the listeners but never
allows them to transmit back.
o Keyboard and Monitor are the examples of the simplex mode as a keyboard can only
accept the data from the user and monitor can only be used to display the data on the
screen.
o The main advantage of the simplex mode is that the full capacity of the communication
channel can be utilized during transmission.
Advantage of Simplex mode:
o In simplex mode, the station can utilize the entire bandwidth of the communication
channel, so that more data can be transmitted at a time.
Half-Duplex mode
o In a Half-duplex channel, direction can be reversed, i.e., the station can transmit and
receive the data as well.
o Messages flow in both the directions, but not at the same time.
o The entire bandwidth of the communication channel is utilized in one direction at a time.
o In half-duplex mode, it is possible to perform the error detection, and if any error occurs,
then the receiver requests the sender to retransmit the data.
o A Walkie-talkie is an example of the Half-duplex mode. In Walkie-talkie, one party speaks,
and another party listens. After a pause, the other speaks and first party listens. Speaking
simultaneously will create the distorted sound which cannot be understood.
o In Full duplex mode, the communication is bi-directional, i.e., the data flow in both the
directions.
o Both the stations can send and receive the message simultaneously.
o Full-duplex mode has two simplex channels. One channel has traffic moving in one
direction, and another channel has traffic flowing in the opposite direction.
o The Full-duplex mode is the fastest mode of communication between devices.
o The most common example of the full-duplex mode is a telephone network. When two
people are communicating with each other by a telephone line, both can talk and listen at
the same time.
Token management is an essential process in the Session Layer of the OSI (Open
Systems Interconnection) model. The Session Layer is responsible for establishing,
maintaining, and synchronizing sessions between two communicating devices over
a network.
Token Management :-
Token management in the Session Layer involves the use of tokens, which are
pieces of data that are passed between devices to control communication access.
Tokens are used to prevent two devices from transmitting data at the same time,
which can lead to data collisions and loss.
The process of token management starts with one device obtaining a token and
being granted access to the network. The device can then transmit data until it has
completed its transmission or the token has expired. Once the device has
completed its transmission or the token has expired, the token is released, and
other devices can request access to the network and obtain a token.
In a token ring network, for example, the token is passed around the network in a
predefined direction. Only the device that holds the token can transmit data,
ensuring that no two devices try to communicate at the same time. Since token
management is essential for network performance and reliability, it is important to
have robust mechanisms for granting and releasing tokens.
systems, and if any error occurs, then it provides a recovery option which
is called a known state. The session layer adds synchronization bits to the
message to use the known state in the event of an error. These bits can be
used as checkpoints. It adds synchronization points or checkpoints to the
data stream for longer communication. It ensures that the data streams
are successfully received and acknowledged up to the checkpoints. In case
of any failure, only the stream needs to be retransmitted after the
checkpoints.