You are on page 1of 21

ROFEL BBA & BCA College, VAPI

Unit-4
Important protocols
of Network layers
503 NETWORK TECHNOLOGIES

Asst. Prof. Zinkal Patel


ROFEL BBA & BCA COLLEGE VAPI
Unit-4 Important protocols of Network layers

4.1 Concepts of Data packets and Datagram


4.2 Concepts and purpose of various protocols:
4.2.1 Purpose of Presentation layer
4.2.2 Presentation layer protocols and their purpose:
4.2.2.1 SSL, HTTP, FTP, Telnet
4.2.3 Concepts of Application Layer protocols and terminologies:
4.2.3.1 SMTP, DNS (Domain Name Server), POP (Post Office Protocol)
4.3 Concepts of IP address
4.4 Difference between http and https

Concepts of Data packets and Datagram

Data packets (TCP)

 A network packet is a basic unit of data that's grouped together and transferred over
a computer network. We use the term packet when it comes to TCP, connection
oriented.
 TCP is the protocol used in the 4th layer of OSI reference model. It provides a
connection type service. It is a logical connection that trust be established before a
communication take place.
 It ensures reliability in data transmission by using acknowledgement to confirm the
sender about the data reception.
 TCP check the packets for errors and if detected it submit the request for
retransmission.

Features:
 TCP is reliable protocol. That is, the receiver always sends either positive or negative
acknowledgement about the data packet to the sender, so that the sender always has

Zinkal Patel Page 1


Unit-4 Important protocols of Network layers

bright clue about whether the data packet is reached the destination or it needs to
resend it.
 TCP ensures that the data reaches intended destination in the same order it was sent.
 TCP is connection oriented. TCP requires that connection between two remote points
be established before sending actual data.
 TCP provides error-checking and recovery mechanism.
 TCP provides end-to-end communication.
 TCP provides flow control.
 TCP provides full duplex server, i.e. it can perform roles of both receiver and sender.

TCP Header
Source Address (16bits) Destination Address (16 bits)
Sequence Number (32 bit)
Acknowledgement Number (32 bit)
Data Reserved
Flags (9 bit) Window Size (16 bit)
Offset (4) (3 bit)
Checksum (16 bit) Urgent (16 bit)
Options (32 bits)
Data

 Source address: It identifies source port of the application process on the sending
device.
 Destination address: It identifies destination port of the application process on the
receiving device.
 Sequence Number: Sequence number of data bytes of a segment in a session.
 Acknowledgement Number: When ACK flag is set, this number contains the next
sequence number of the data byte expected and works as acknowledgement of the
previous data received.

Zinkal Patel Page 2


Unit-4 Important protocols of Network layers

 Data Offset: This field implies both, the size of TCP header.
 Reserved: Reserved for future use and all are set zero by default.
 Flags: flags are used as an indicator for data recovery mechanism.
 Windows Size: This field is used for flow control between two stations and indicates
the amount of buffer in bytes the receiver has allocated for a segment, i.e. how much
data is the receiver expecting.
 Checksum: It is used to provide reliability and security to the TCP segment.
 Urgent Pointer: It points to the urgent data byte if URG flag is set to 1(it indicate
where the data ends).
 Options: It facilitates additional options which are not covered by the regular header.
 Option field is always described in 32-bit words. If this field contains data less than 32-
bit, padding is used to cover the remaining bits to reach 32-bit boundary.
 Data: Actual User Data

Datagram (UDP)
 Datagram is a synonym for packets and used in UDP, connectionless.
 The User Datagram Protocol UDP is simplest Transport Layer communication
protocol available of the TCP/IP protocol suite.
 It involves minimum amount of communication mechanism. UDP is said
to be an unreliable transport protocol.
 In UDP, the receiver does not generate an acknowledgement of packet received and
in turn, the sender does not wait for any acknowledgement of packet sent.

Features
 UDP is used when acknowledgement of data does not hold any significance.
 UDP is good protocol for data flowing in one direction.
 UDP is simple and suitable for query based communications.

Zinkal Patel Page 3


Unit-4 Important protocols of Network layers

 UDP is not connection oriented.


 UDP does not provide congestion control mechanism.
 UDP does not guarantee ordered delivery of data.
 UDP is stateless.
 UDP is suitable protocol for streaming applications such as VoIP, multimedia
streaming.

UDP Header
 UDP header is as simple as its function. UDP header contains four main parameters:

Source Address (16bits) Destination Address (16 bits)


Length (16 bit) Checksum (16 bit)
DATA

 Source Port - This 16 bits information is used to identify the source port of the packet.
 Destination Port - This 16 bits information, is used identify application level service on
destination machine.
 Length - Length field specifies the entire length of UDP packet including header. It is
16-bits field and minimum value is 8-byte, i.e. the size of UDP header itself.
 Checksum - This field stores the checksum value generated by the sender before
sending. IPv4 has this field as optional so when checksum field does not contain any
value it is made 0 and all its bits are set to zero.

Zinkal Patel Page 4


Unit-4 Important protocols of Network layers

Concepts and purpose of various protocols

Purpose of Presentation Layer


 The presentation layer is responsible for translation, compression and encryption.
 The presentation layer is responsible concerned with the syntax and semantics of
the information exchanged between two systems.
 Following figure shows the relationship between the presentation layer and the
application and session layer.

 The presentation layer include the following responsibilities :

o Translation : The processes (running programs) in two systems are usually


exchanging information in the form of character strings, numbers and so on.
The information must be changed to bit streams before being transmitted
because different computers use different encoding systems. The
presentation layer is responsible for interoperability between these
different encoding methods. The presentation layer at the sender changes
the information from its sender-dependent format into a common format.
The presentation layer at the receiving machine changes the common
format into its receiver-dependent format.

o Encryption : Encryption means that the sender transforms the original


information to another form and sends the resulting message out over the
network. Decryption reverse the original process to transform the message
back to its original form

Zinkal Patel Page 5


Unit-4 Important protocols of Network layers

o Compression : Data compression reduces the number of bits contained in


the information. Data compression becomes particularly important in the
transmission of multimedia such as text, audio and video.
 Devices: Gateway

Presentation layer protocols and their purpose


SSL
 Secure Socket Layer (SSL) provides security to the data that is transferred between
web browser and server. SSL encrypts the link between a web server and a
browser which ensures that all data passed between them remain private and free
from attack.
Secure Socket Layer Protocols:
 SSL record protocol
 Handshake protocol
 Change-cipher spec protocol
 Alert protocol
SSL Protocol Stack:

SSL Record Protocol:


 SSL Record provides two services to SSL connection.
o Confidentiality
o Message Integrity

Zinkal Patel Page 6


Unit-4 Important protocols of Network layers

 In the SSL Record Protocol application data is divided into fragments. The fragment
is compressed and then encrypted MAC (Message Authentication Code) generated
by algorithms like SHA (Secure Hash Protocol) and MD5 (Message Digest) is
appended. After that encryption of the data is done and in last SSL header is
appended to the data.

Handshake Protocol:

 Handshake Protocol is used to establish sessions. This protocol allows the client
and server to authenticate each other by sending a series of messages to each
other. Handshake protocol uses four phases to complete its cycle.

Change-cipher Protocol:
 This protocol uses the SSL record protocol. Unless Handshake Protocol is
completed, the SSL record Output will be in a pending state. After the handshake
protocol, the Pending state is converted into the current state.

Zinkal Patel Page 7


Unit-4 Important protocols of Network layers

Change-cipher protocol consists of a single message which is 1 byte in length and


can have only one value. This protocol’s purpose is to cause the pending state to
be copied into the current state.

Alert Protocol:
 This protocol is used to convey SSL-related alerts to the peer entity. Each message
in this protocol contains 2 bytes.

HTTP
 HTTP stands for HyperText Transfer Protocol.
 It is a protocol used to access the data on the World Wide Web (www).
 The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
 This protocol is known as Hyper Text 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.
 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.
 HTTP is used to carry the data in the form of MIME-like format.
 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.

Zinkal Patel Page 8


Unit-4 Important protocols of Network layers

Features of HTTP:
 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.
 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.
 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.
FTP
 FTP stands for File transfer protocol.
 FTP is a standard internet protocol provided by TCP/IP used for transmitting the
files from one host to another.
 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.
 It is also used for downloading the files to computer from other servers.

Objectives of FTP
 It provides the sharing of files.
 It is used to encourage the use of remote computers.
 It transfers the data more reliably and efficiently.

Zinkal Patel Page 9


Unit-4 Important protocols of Network layers

Why FTP?
 Although transferring files from one system to another is very simple and
straightforward, but sometimes it can cause problems.
 For example, two systems may have different file conventions. Two systems may
have different ways to represent text and data. Two systems may have different
directory structures. FTP protocol overcomes these problems by establishing two
connections between hosts. One connection is used for data transfer, and another
connection is used for the control connection.

There are two types of connections in FTP:

 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.
 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.

Advantages of FTP:
o Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest
way to transfer the files from one computer to another computer.

o Efficient: It is more efficient as we do not need to complete all the operations to


get the entire file.

Zinkal Patel Page 10


Unit-4 Important protocols of Network layers

o Security: To access the FTP server, we need to login with the username and
password. Therefore, we can say that FTP is more secure.

o Back & forth movement: FTP allows us to transfer the files back and forth.
Suppose you are a manager of the company, you send some information to all the
employees, and they all send information back on the same server.

Disadvantages of FTP:
o The standard requirement of the industry is that all the FTP transmissions should
be encrypted. However, not all the FTP providers are equal and not all the
providers offer encryption. So, we will have to look out for the FTP providers that
provides encryption.

o FTP serves two operations, i.e., to send and receive large files on a network.
However, the size limit of the file is 2GB that can be sent. It also doesn't allow you
to run simultaneous transfers to multiple receivers.

o Passwords and file contents are sent in clear text. So, it is quite possible that
attackers can carry out the brute force attack by trying to guess the FTP password.

o It is not compatible with every system.

Telnet
 TELNET stands for TErminaL NETwork. It is a type of protocol that enables one
computer to connect to local computer.

 It is a used as a standard TCP/IP protocol for virtual terminal service which is given
by ISO.

 Computer which starts connection known as the local computer. Computer which is
being connected to i.e. which accepts the connection known as remote computer.

 When the connection is established between local and remote computer.

Zinkal Patel Page 11


Unit-4 Important protocols of Network layers

 During telnet operation whatever that is being performed on the remote computer
will be displayed by local computer. Telnet operates on client/server principle.

 Local computer uses telnet client program and the remote computers uses telnet
server program.

Concepts of Application Layer protocols and Terminologies:


 The application layer is responsible for providing services to the user.

 The application layer enables the user, whether human or software, to access the
network.

 It provides user interfaces and support for services such as electronic mail, remote file
access and transfer, shared database management, and other types of distributed
information services.

 Following figure shows the relationship of the application layer to the user and the
presentation layer.

 Of the many application services available, the figure shows only three :
o XAOO – message handling services
o X.500 – directory services
o FTAM – file transfer and management.

Zinkal Patel Page 12


Unit-4 Important protocols of Network layers

 Application layer provide following services :

o Network Virtual terminal: A network virtual terminal is a software version


of a physical terminal, and it allows a user to log on to a remote host. To do
so, the application creates a software emulation of a terminal at the remote
host. The user’s computer talks to the software terminal which, in turn, talks
to the host, and vice versa.
o File transfer, access and management: This application allows a user to
access files in a remote host (to make changes or read data), to retrieve files
from a remote computer for use in the local computer, and to manage or
control files in a remote computer locally.
o Mail services: This application provides the basis for e-mail forwarding and
storage.
 Protocols: FTP, SMTP, TELNET
 Devices: Gateway

SMTP
 SMTP stands for Simple Mail Transfer Protocol.

 SMTP is a set of communication guidelines that allow software to transmit an


electronic mail over the internet is called Simple Mail Transfer Protocol.

 It is a program used for sending messages to other computer users based on e-mail
addresses.

 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.

Zinkal Patel Page 13


Unit-4 Important protocols of Network layers

 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.

DNS (Domain Name Server)

 An application layer protocol defines how the application processes running on


different systems, pass the messages to each other.

 DNS stands for Domain Name System.

 DNS is a directory service that provides a mapping between the name of a host on the
network and its numerical address.

 DNS is required for the functioning of the internet.

 Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.

 DNS is a service that translates the domain name into IP addresses. This allows the
users of networks to utilize user-friendly names when looking for other hosts instead
of remembering the IP addresses.
 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

 It defines the registered hosts according to their generic behaviour.

 Each node in a tree defines the domain name, which is an index to the DNS database.

Zinkal Patel Page 14


Unit-4 Important protocols of Network layers

 It uses three-character labels, and these labels describe the organization type.

Label Description

aero Airlines and aerospace companies

biz Businesses or firms

com Commercial Organizations

coop Cooperative business Organizations

edu Educational institutions

gov Government institutions

info Information service providers

int International Organizations

mil Military groups

museum Museum & other nonprofit organizations

name Personal names

net Network Support centers

org Nonprofit Organizations

pro Professional individual Organizations

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.

Zinkal Patel Page 15


Unit-4 Important protocols of Network layers

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.

POP (Post Office Protocol)


 The POP protocol stands for Post Office Protocol.
 As we know that SMTP is used as a message transfer agent. When the message is
sent, then SMPT is used to deliver the message from the client to the server and then
to the recipient server. But the message is sent from the recipient server to the actual
server with the help of the Message Access Agent. The Message Access Agent
contains two types of protocols, i.e., POP3 and IMAP.

 Suppose sender wants to send the mail to receiver. First mail is transmitted to the
sender's mail server. Then, the mail is transmitted from the sender's mail server to
the receiver's mail server over the internet. On receiving the mail at the receiver's
mail server, the mail is then sent to the user. The whole process is done with the help
of Email protocols. The transmission of mail from the sender to the sender's mail
server and then to the receiver's mail server is done with the help of the SMTP
protocol. At the receiver's mail server, the POP or IMAP protocol takes the data and
transmits to the actual user.
 Since SMTP is a push protocol so it pushes the message from the client to the server.
As we can observe in the above figure that SMTP pushes the message from the client

Zinkal Patel Page 16


Unit-4 Important protocols of Network layers

to the recipient's mail server. The third stage of email communication requires a pull
protocol, and POP is a pull protocol. When the mail is transmitted from the recipient
mail server to the client which means that the client is pulling the mail from the
server.

Concepts of IP Address
IP Address
 IP address” is a shorter way of saying “Internet Protocol address.” IP addresses are
the numbers assigned to computer network interfaces. Although we use names to
refer to the things we seek on the Internet, such as www.example.org, computers
translate these names into numerical addresses so they can send data to the right
location. So when you send an email, visit a web site, or participate in a video
conference, your computer sends data packets to the IP address of the other end of
the connection and receives packets destined for its own IP address.
 IP Addressing system is divided into five classes of IP Addresses. All the five classes are
identified by the first octet of IP Address.

Zinkal Patel Page 17


Unit-4 Important protocols of Network layers

Default Address
 The IP address 0.0.0.0 is used for the default network.

Class A Address

 This class is for very large network such as a major international company might have.
The first bit of the first octet is always set to 0 (Zero). Thus the first octet ranges from
1 to 126.
 First octet indicates Network address and last three octet indicates host address.
 Class A addresses only include IP starting from 1.x.x.x to 126.x.x.x only.
 Class A IP address format is this:
0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH

Loop back
 The IP address 127.0.0.1 is used as the loop back address. It is used by the host
computer to send a message back to itself. It is commonly use for trouble shooting
and network testing.

Class B Address

 Class B address is use for medium size network. A good example is a large college
campus.
 An IP address which belongs to class B has the first two bits in the first octet set to 10.
Thus class B IP address range from 128 to 191.
 First two octets indicate network address and last two octet indicates host address.
 Class B IP address format is this:
10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH

Zinkal Patel Page 18


Unit-4 Important protocols of Network layers

Class C Address

 Class C address are commonly use for small to medium size business.
 An IP address which belongs to class C has the first three bits in the first octet set to
110. Thus class C IP address range from 192 to 223.
 First three octets indicate network address and last octet indicates host address.
 Class C IP address format is this:
110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH

Class D Address

 Class D address used for multicast. Class D is slightly different from the first three
classes.
 An IP address which belongs to class D has the first four bits in the first octet set to
1110. The other 28 bits are used to identify the group of computers in the multicast
message is intended for. Class D IP address range from 224 to 239.

Class E Address
 Class E is use for experimental purpose only. Like class D, it is different from the first
three classes.
 IP address in this class ranges from 240.0.0.0 to 255.255.255.254.

Broadcast
 The messages that are intended for all computers on a network are send as
broadcast. This message always uses IP address 255.255.255.255.

Zinkal Patel Page 19


Unit-4 Important protocols of Network layers

Difference between http and https


 HTTP stands for HyperText Transfer Protocol and HTTPS stands for HyperText Transfer
Protocol Secure.
 In HTTP, URL begins with “http://” whereas URL starts with “https://”
 HTTP uses port number 80 for communication and HTTPS uses 443
 HTTP is considered to be insecure and HTTPS is secure
 HTTP Works at Application Layer and HTTPS works at Transport Layer
 In HTTP, Encryption is absent and Encryption is present in HTTPS as discussed above
 HTTP does not require any certificates and HTTPS needs SSL Certificates
 HTTP speed is faster than HTTPS and HTTPS speed is slower than HTTP
 HTTP does not improve search ranking while HTTPS improves search ranking.
 HTTP does not use data hashtags to secure data, while HTTPS will have the data
before sending it and return it to its original state on the receiver side.

Zinkal Patel Page 20

You might also like