Unit 2 - Advance Computer Networks - WWW - Rgpvnotes.in
Unit 2 - Advance Computer Networks - WWW - Rgpvnotes.in
E
Subject Name: Advance Computer Networks
Subject Code: CS-8004
Semester: 8th
Downloaded from be.rgpvnotes.in
Connection-oriented
#Connection Oriented & Connectionless Services
There is a sequence of operation to be followed by the users of connection-oriented service. They are:
1. Connection is established
2. Information is sent
3. Connection is released
In connection-oriented service we must establish a connection before starting the communication. When
connection is established we send the message or the information. Then we release the connection.
Connection oriented service is more reliable than connectionless service. Example of connection oriented
Connectionless
is TCP (Transmission Control Protocol) protocol.
It is similar to postal services, as it carries the full address where the message (letter) is to be carried. Each
message is routed independently from source to destination. The order of message sent can be different
from the order received.
In connectionless the data is transferred in one direction from source to destination without checking
that destination is still there or not or if it prepared to accept the message. Authentication is not needed
in this. Example of Connectionless service is UDP (User Datagram Protocol) protocol.
2. FTP(File Transfer Protocol) is a protocol, that allows File transfer amongst computer users
connected over a network. It is reliable, simple and efficient.
3. SMTP(Simple Mail Transport Protocol) is a protocol, which is used to transport electronic mail
between a source and destination, directed via a route.
4. DNS(Domain Name Server) resolves an IP address into a textual address for Hosts connected over
a network.
5. It allows peer entities to carry conversation.
6. It defines two end-to-end protocols: TCP and UDP
o TCP(Transmission Control Protocol): It is a reliable connection-oriented protocol which
handles byte-stream from source to destination without error and flow control.
o UDP(User-Datagram Protocol): It is an unreliable connection-less protocol that do not want
TCPs, sequencing and flow control. Eg: One-shot request-reply kind of service
Merits of TCP/IP model
1. It operated independently.
2. It is scalable.
3. Client/server architecture.
4. Supports a number of routing protocols.
5. Can be used to establish a connection between two computers.
Demerits of TCP/IP
1. In this, the transport layer does not guarantee delivery of packets.
2. The model cannot be used in any other application.
3. Replacing protocol is not easy.
4. It has not clearly separated its services, interfaces and protocols.
. The terminology used to comprehend its functionality is based on the following basic concepts:
Host - Computer in the local network (application aspect).
Sub network (subnet) - Transmits messages from one host of LAN to host a second LAN
(communication aspect), has two components:
o Transmission channel (transmission lines, channel) - Bits transmitted from computer to
computer.
o Router - Specialized computer that connect the transmission channels and decide at which
the output channel to send data that arrives from the door
Sub network makes the core of communication between themselves and this is a point-to-point
(store-and-forward, packet-switched) communication between routers that are not directly
connected by a cable, and is done so that packets sent from router to router. Router save the
package and send it on when the output line works.
Topology connecting routers is usually irregular.
3. Services: This 8 hit field was previously called services type but is now called differentiated services.
2. T : Maximize throughout
3. R : Maximize reliability
4. C : Minimize Cost
The various bits in differentiated services are:The first 6 bits defined a code point and last two bits are
not used. If the 3 rightmost bits are 0s, the 3 leftmost bits are interpreted the same as the precedence
bits in the service type interpretation.
4. Total length: This 16 bit field specifies the total length of entire IP datagram including data and header
in bytes. As there are 16 bits, the total length of IP datagram is limited to 65,535 (216 - 1) bytes.
5. Identification: This 16 bit field is used in fragmentation. A datagram when passing through different
networks may be divided into fragments to match the network frame size. Therefore, this field contains
an integer that identifies the current datagram. This field is used to help piece together datagram
fragments.
6. Flags: Consists' of a 3 bit field of which the two low order bit DF, MF control fragmentation. DF stands
for Don't Fragment. DF specifies whether the packet can be fragmented MF stands for more fragments.
MF specifies whether the packet is the last fragment in a series of fragmented packets. The third or high
order but is not used.
7. Fragment Offset: This 13 bit field indicates the position of the fragment's data relative to the beginning
of the data in the original datagram, which allows the destination IP process to properly reconstruct the
original datagram.
8. Time to Live: It is 8 bit field that maintain a counter that gradually decrements down to zero, at which
point the datagram is discarded. This keeps the packet from looping endlessly.
9. Protocol: This 8 bit field indicates which upper layer protocol receives incoming packets after IP
processing is complete.
10. Header Checksum: This 16 bit field contains a checksum that covers only the header and not the data.
11. Source IP address: These 32-bit field contains the IP address of source machine.
12. Destination IP address: This 32-bit field contains the IP address of destination machine.
13. Options: This field allows IP to support various options such as security, routing, timing management
and alignment.
14. Data: It contains upper layer information.
#Protocol Layers
The communication between the nodes in a packet data network must be precisely defined to ensure
correct interpretation of the packets by the receiving intermediate and the end systems. The packets
exchanged between nodes are defined by a protocol - or communications language. There are many
functions which may be needed to be performed by a protocol. These range from the specification of
connectors, addresses of the communications nodes, identification of interfaces, options, flow control,
reliability, error reporting, synchronization, etc.
The protocols are usually structured together to form a layered design (also known as a "protocol
stack"). All major telecommunication network architectures currently used or being developed use
layered protocol architectures. There is a distinction between the functions of the lower (network)
layers, which are primarily designed to provide a connection or path between users to hide details of
underlying communications facilities, and the upper (or higher) layers, which ensure data exchanged are
in correct and understandable form. The upper layers are sometimes known as "middleware" because
they provide software in the computer which converts data between what the applications programs
expect, and what the network can transport. The transport layer provides the connection between the
upper (applications-oriented) layers and the lower (or network-oriented) layers.
The basic idea of a layered architecture is to divide the design into small pieces. Each layer adds to the
services provided by the lower layers in such a manner that the highest layer is provided a full set of
services to manage communications and run distributed applications.
TELNET
TELNET Operation
The TELNET protocol is based on three ideas:
o The Network Virtual Terminal (NVT) concept. An NVT is an imaginary device having
a basic structure common to a wide range of real terminals. Each host maps its
own terminal characteristics to those of an NVT, and assumes that every other host
will do the same.
o A symmetric view of terminals and processes .
o Negotiation of terminal options. The principle of negotiated options is used by the
TELNET protocol, because many hosts wish to provide additional services, beyond
those available with the NVT. Various options may be negotiated. Server and client
use a set of conventions to establish the operational characteristics of their TELNET
connection via the ``DO, DON'T, WILL, WON'T'' mechanism discussed later in this
document.
The two hosts begin by verifying their mutual understanding. Once this initial negotiation
is complete, they are capable of working on the minimum level implemented by the NVT.
After this minimum understanding is achieved, they can negotiate additional options to
extend the capabilities of the NVT to reflect more accurately the capabilities of the real
hardware in use.
Because of the symmetric model used by TELNET, both the host and the client may
propose additional options to be used.
The set of options is not part of the TELNET protocol, so that new terminal features can be
incorporated without changing the TELNET protocol (mouse?).
All TELNET commands and data flow through the same TCP connection.
Commands start with a special character called the Interpret as Command escape
character (IAC).
The IAC code is 255.
If a 255 is sent as data - it must be followed by another 255
Each receiver must look at each byte that arrives and look for IAC. If IAC is found and the
next byte is IAC - a single byte is presented to the application/terminal.
If IAC is followed by any other code - the TELNET layer interprets this as a command.
Broadband provides remote users with high-speed connection options to business networks and to
#Types of remote access
Cable broadband shares bandwidth across many users and, as a result, upstream data rates can be
the internet. There are several types of broadband, including the following:
DSL (Digital Subscriber Line) broadband provides high-speed networking over a telephone network
slow during high-usage hours in areas with many subscribers.
using broadband modem tech. However, DSL only works over a limited physical distance and may
Cellular internet services can be accessed by mobile devices via a wireless connection from any
not be available in some areas if the local telephone infrastructure doesn't support DSL technology.
Satellite internet services use telecommunications satellites to provide users with internet access in
Fiber optics broadband technology enables users to transfer large amounts of data quickly and
areas where land-based internet access isn't available, as well as for temporary mobile installations.
seamlessly.
#Remote access protocols
Point-to-Point Protocol (PPP) enables hosts to set up a direct connection between two endpoints.
Common remote access and VPN protocols include the following:
IPsec -- Internet Protocol Security -- is a set of security protocols used to enable authentication and
Point-to-Point Tunneling (PPTP) is one of the oldest protocols for implementing virtual private
encryption services to secure the transfer of IP packets over the internet.
networks. However, over the years, it has proven to be vulnerable to many types of attack. Although
Layer Two Tunneling Protocol (L2TP) is a VPN protocol that does not offer encryption or
PPTP is not very secure, it persists in some cases
cryptographic authentication for the traffic that passes through the connection. As a result, it is
Remote Authentication Dial-In User Service (RADIUS) is a protocol developed in 1991 and published
usually paired with IPsec, which provides those services.
as an Internet Standard track specification in 2000 to enable remote access servers to communicate
with a central server to authenticate dial-in users and authorize their access to the requested
Terminal Access Controller Access Control System (TACACS) is a remote authentication protocol that
system or service.
was originally common to Unix networks that enables a remote access server to forward a user's
password to an authentication server to determine whether access to a given system should be
allowed. TACACS+ is a separate protocol designed to handle authentication and authorization, and
to account for administrator access to network devices, such as routers and switches.
#TFTP Operation
• The lie t se ds a ead o ite e uest at the server's UDP Port 69
• The se e a epts the e uest se di g data essage i ase of ead e uest.
• The se e a epts the e uest se di g a k o ledgement in case of write request.
• I eithe ase, the se e sele ts a UDP po t to e used fo fu the dialogue a d se ds its fi st espo se
to the client through the selected UPD port.
• Ea h data essage has fi ed size of data lo k o tets a d IS individually acknowledged.
• The last data lo k o tai i g EDF o a data lo k o tai i g less tha o tets te i ates the
session.
• E o e o e is do e usi g retransmission after timeout.
• If TFTP essage is lost a d if the e is o e pe ted espo se, the essage is repeated by the sender after
time out.
• If the e t data essage is ot e ei ed afte a k o ledge e t, the last a k o ledge e t is epeated
after timeout.
Mail and News. To retrieve a message from a POP3 server, a POPS client establishes a Transmission
Control Protocol (TCP) session using TCP port 110, identifies itself to the server, and then issues a series of
POP3 commands:
1. stat: It asks the server for the number of messages waiting to be retrieved.
2. list: It determines the size of each message to be retrieved.
3. retr: It retrieves individual messages d. Quit: Ends the POP3 session.
Mail access by POP3
• The lie t POP soft a e is i stalled o the e eiver's computer the server POP3 software is installed on
the mail server.
• POP is des i ed i ‘FC a d it uses ell-known TCP port 110.
• The o u i atio p o edu e is si ila to SMTP a d uses ASCII ha a te s.
• POP egi s he use sta ts the ail reader.
• The ail eade alls up the ISP o ail se e a d esta lishes a TCP o e tio ith the essage
transfer agent at port 110.
• O e the o e tio has ee esta lished, the PO? p oto ol goes through three states in sequence
1. Authorization
2. Transactions
3. Update
• The Autho izatio state deals ith use log i . The lie t se ds its use a e a d pass o d.
• The t a sa tio state deals ith the use olle ti g the e-mails and marking them for deletion from the
mailbox.
• The update state auses the e-mails to be deleted.
• O e the use has logged i , the lie t a se d the LIST o a d to list the o te ts of its ail o . I
this case the server displays one message per line along with its length. This list ends with a period.
• The lie t a et ie e essages usi g ‘ET‘ o a d a d a also a k the fo deletio ith DELE.
• Whe all the essages ha e ee et ie ed, the lie t gi es QUIT o a d to e d the t a sa tio
state and enter the update state.
• When the server has deleted all the messages, it sends a reply and breaks the TCP connection.
• Although POP is used to do load essages f o the se e , the SMTP lie t is still eeded o the
desktop computers to forward messages from workstation user to its SMTP mail server.
POP3 protocol works on two ports:
Port 110 - this is the default POP3 non-encrypted port
Port 995 - this is the port you need to use if you want to connect using POP3 securely
MIME Version – Defines version of MIME protocol. It must have the parameter Value 1.0, which
indicates that message is formatted using MIME.
Content Type – Type of data used in the body of message. They are of different types like text data
(plain, HTML), audio content or video content.
Content Type Encoding – It defines the method used for encoding the message. Like 7-bit encoding, 8-
bit encoding, etc.
Content Id – It is used for uniquely identifying the message.
Content description – It defines whether the body is actually image, video or audio.
Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a request and waits
Features of HTTP:
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
Media independent: HTTP protocol is a media independent as data can be sent as long as both the
response time only.
client and server know how to handle the data content. It is required for both the client and server
Stateless: HTTP is a stateless protocol as both the client and server know each other only during the
to specify the content type in MIME-type header.
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.
#HTTP Transactions
The above figure shows the HTTP transaction between client and server. The client initiates a transaction
by sending a request message to the server. The server replies to the request message by sending a
response message.
Messages
HTTP messages are of two types: request and response. Both the message types follow the same message
format.
1. Request Message: The request message is sent by the client that consists of a request line,
headers, and sometimes a body.
2. Response Message: The response message is sent by the server to the client that consists of a
status line, headers, and sometimes a body.
A client that wants to access the document in an internet needs an address and to facilitate the access
#Uniform Resource Locator (URL)
The Uniform Resource Locator (URL) is a standard way of specifying any kind of information on the
of documents, the HTTP uses the concept of Uniform Resource Locator (URL).
internet.
Method: The method is the protocol used to retrieve the document from a server. For example, HTTP.
o The URL defines four parts: method, host computer, port, and path.
Host: The host is the computer where the information is stored, and the computer is given an alias
name. Web pages are mainly stored in the computers and the computers are given an alias name that
begins with the characters "www". This field is not mandatory.
Port: The URL can also contain the port number of the server, but it's an optional field. If the port
number is included, then it must come between the host and path and it should be separated from
the host by a colon.
Path: Path is the pathname of the file where the information is stored. The path itself contain slashes
that separate the directories from the subdirectories and files.
The FTP client has three components: the user interface, control process, and data transfer process. The
server has two components: the server control process and the server data transfer process.
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
Page no: 13 Follow us on facebook to get real-time updates from RGPV
Downloaded from be.rgpvnotes.in
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.
FTP Clients
FTP client is a program that implements a file transfer protocol which allows you to transfer files
between two hosts on the internet.
It allows a user to connect to a remote host and upload or download the files.
It has a set of commands that we can use to connect to a host, transfer the files between you and
your host and close the connection.
The FTP program is also available as a built-in component in a Web browser. This GUI based FTP client
makes the file transfer very easy and also does not require to remember the FTP commands.
Advantages of FTP:
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.
Efficient: It is more efficient as we do not need to complete all the operations to get the entire file.
Security: To access the FTP server, we need to login with the username and password. Therefore, we
can say that FTP is more secure.
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:
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 provide encryption.
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.
Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So, it is quite
possible that attackers can carry out the brute force attack by trying to guess the FTP password.
It is not compatible with every system.
It is an application layer protocol in which a few manager stations can handle a set of agents.
The protocol designed at the application level can monitor the devices made by different
manufacturers and installed on different physical networks.
It is used in a heterogeneous network made of different LANs and WANs connected by routers or
gateways.
Managers & Agents
A manager is a host that runs the SNMP client program while the agent is a router that runs the SNMP
server program.
Management of the internet is achieved through simple interaction between a manager and agent.
The agent is used to keep the information in a database while the manager is used to access the
values in the database. For example, a router can store the appropriate variables such as a number of
packets received and forwarded while the manager can compare these variables to determine
whether the router is congested or not.
Agents can also contribute to the management process. A server program on the agent checks the
environment, if something goes wrong, the agent sends a warning message to the manager.
Management with SNMP has three basic ideas:
A manager checks the agent by requesting the information that reflects the behavior of the agent.
A manager also forces the agent to perform a certain function by resetting values in the agent
database.
An agent also contributes to the management process by warning the manager regarding an
unusual condition.
Management Components
Management is not achieved only through the SNMP protocol but also the use of other protocols
that can cooperate with the SNMP protocol. Management is achieved through the use of the
other two protocols: SMI (Structure of management information) and MIB(management
information base).
Management is a combination of SMI, MIB, and SNMP. All these three protocols such as abstract
syntax notation 1 (ASN.1) and basic encoding rules (BER).
GetRequest: The GetRequest message is sent from a manager (client) to the agent (server) to
retrieve the value of a variable.
GetNextRequest: The GetNextRequest message is sent from the manager to agent to retrieve the
value of a variable. This type of message is used to retrieve the values of the entries in a table. If
the manager does not know the indexes of the entries, then it will not be able to retrieve the
values. In such situations, GetNextRequest message is used to define an object.
GetResponse: The GetResponse message is sent from an agent to the manager in response to the
GetRequest and GetNextRequest message. This message contains the value of a variable
requested by the manager.
SetRequest: The SetRequest message is sent from a manager to the agent to set a value in a
variable.
Trap: The Trap message is sent from an agent to the manager to report an event. For example, if
the agent is rebooted, then it informs the manager as well as sends the time of rebooting.
#DNS
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.
For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50, most people
would reach this site by specifying ftp.EduSoft.com. Therefore, the domain name is more reliable
than IP address.
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.
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
DNS is a client/server network communication protocol. DNS clients send requests to the. server
while DNS servers send responses to the client.
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.
DNS implements a distributed database to store the name of all the hosts available on the internet.
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.
Paying for both a broadband connection and a traditional telephone line can be avoided.
are available but only for an additional fee.
Not all VoIP services connect directly to emergency services through emergency service numbers.
backup power.
This is a first message generated in the communication process between server and client. This
message is generated by Client host in order to discover if there is any DHCP server/servers are
present in a network or not. This message is broadcasted to all devices present in a network to find
The server will respond to host in this message specifying the unleased IP address and other TCP
configuration information. This message is broadcasted by server. Size of message is 342 bytes. If
there are more than one DHCP servers present in the network then client host will accept the first
DHCP OFFER message it receives. Also a server ID is specified in the packet in order to identify the
When a client receives a offer message, it responds by broadcasting a DHCP request message. The
client will produce a gratitutous ARP in order to find if there is any other host present in the network
with same IP address. If there is no reply by other host, then there is no host with same TCP
configuration in the network and the message is broadcasted to server showing the acceptance of IP
In response to the request message received, the server will make an entry with specified client ID
and bind the IP address offered with lease time. Now, the client will have the IP address provided by
Whenever a DHCP server receives a request for IP address that is invalid according to the scopes that
is configured with, it send DHCP Nak message to client. Eg-when the server has no IP address unused
DHCP decline –
or the pool is empty, then this message is sent by the server to client.
If DHCP client determines the offered configuration parameters are different or invalid, it sends DHCP
decline message to the server .When there is a reply to the gratuitous ARP by any host to the client,
DHCP release –
the client sends DHCP decline message to the server showing the offered IP address is already in use.
A DHCP client sends DHCP release packet to server to release IP address and cancel any remaining
DHCP inform –
lease time.
If a client address has obtained IP address manually then the client uses a DHCP inform to obtain
other local configuration parameters, such as domain name. In reply to the dhcp inform message,
DHCP server generates DHCP ack message with local configuration suitable for the client without
allocating a new IP address. This DHCP ack message is unicast to the client.
Advantages – The advantages of using DHCP include:
Centralized management of IP addresses
Page no: 18 Follow us on facebook to get real-time updates from RGPV
Downloaded from be.rgpvnotes.in
Ease of adding new clients to a network
Reuse of IP addresses reducing the total number of IP addresses that are required
Simple reconfiguration of the IP address space on the DHCP server without needing to reconfigure
The DHCP protocol gives the network administrator a method to configure the network from a
each client
With the help of DHCP, easy handling of new users and reuse of IP address can be achieved.
centralised area.