CN 5th Unit
CN 5th Unit
By
Mr. D. Santhosh Gupta M.Tech., (Ph.D.)
Assistant Professor (c)
Dept. of ECE, UCEN
Course Outcomes
Transport layer protocols: Introduction- services- port number, User data gram
protocol: User datagram- UDP services- UDP applications, Transmission control
protocol: TCP services- TCP features- Segment- A TCP connection- windows in
TCP- flow control-Error control, TCP Congestion control.
Application Layer – World Wide Web- HTTP, Electronic mail: Architecture- web
based mail- email security, TELENET: Local versus Remote Logging, Domain
Name System: Name Space- DNS in the Internet- Resolution-Caching- Resource
Records- DNS messages- Registrars-security of DNS Name Servers, SNMP.
Application Services
(Telnet, FTP, e-mail, WWW)
▪ UDP is a very simple protocol. There is no flow control, and hence no window mechanism. The receiver may
overflow with incoming messages.
Error Control
▪ There is no error control mechanism in UDP except for the checksum. This means that the sender does not know
if a message has been lost or duplicated. When the receiver detects an error through the checksum, the user
datagram is silently discarded.
Checksum
▪ UDP checksum calculation includes three sections: a pseudoheader, the UDP header, and the data coming from
the application layer.
▪ The pseudoheader is the part of the header of the IP packet in which the user datagram is to be encapsulated with
some fields filled with 0s.
Mr. D. Santhosh Gupta, Dept. of ECE 13
UDP: Services
▪ If the checksum does not include the pseudoheader, a user datagram may arrive safe and
sound. However, if the IP header is corrupted, it may be delivered to the wrong host.
▪ The protocol field is added to ensure that the packet belongs to UDP, and not to TCP. The
value of the protocol field for UDP is 17. If this value is changed during transmission, the
checksum calculation at the receiver will detect it and UDP drops the packet. It is not
delivered to the wrong protocol.
• The requesting end (Host A) sends an SYN segment determining the server's port number that the client needs to
connect to and its initial sequence number (x).
• The server (Host B) acknowledges its own SYN segment, including the servers initial sequence number (y). The server
also responds to the client SYN by accepting the sender's SYN plus one (X + 1).
• An SYN consumes one sequence number. The client should acknowledge this SYN from the server by accepting the
server's SEQ plus one (SEQ = x + 1, ACK = y + 1). This is how a TCP connection is settled.
Connection Termination (Connection Release)
• While it creates three segments to establish a connection, it takes four segments to terminate a connection. During a
TCP connection is full-duplex, each direction should be shut down alone.
• Flow control makes sure that no more packets are sent by the sender once the receiver’s buffer is full as the
messages will be dropped and the receiver won’t be able to handle them. In order to control the amount of data
sent by the TCP, the receiver will create a buffer which is also known as Receive Window.
• The TCP needs to send ACK every time it receives the data packet, acknowledging that the packet is received
successfully and with this value of ACK it sends the value of the current receive window so that sender knows
where to send the data.
• WWW stands for World Wide Web and is commonly known as the Web. The WWW was started by CERN in
1989. WWW is defined as the collection of different websites around the world, containing different information
shared via local servers (or computers).
• Web pages are linked together using hyperlinks which are HTML-formatted and, also referred to as hypertext,
these are the fundamental units of the Internet and are accessed through Hyper Text Transfer Protocol(HTTP).
Such digital connections, or links, allow users to easily access desired information by connecting relevant pieces
of information. The benefit of hypertext is it allows you to pick a word or phrase from the text and click on other
sites that have more information about it.
System Architecture
• From the user’s point of view, the web consists of a vast, worldwide connection of documents or web pages.
Each page may contain links to other pages anywhere in the world. The pages can be retrieved and viewed by
using browsers of which internet explorer, Netscape Navigator, Google Chrome, etc. are the popular ones. The
browser fetches the page requested interprets the text and formatting commands on it, and displays the page,
properly formatted, on the screen.
• The basic model of how the web works are shown in the figure below. Here the browser is displaying a web page
on the client machine. When the user clicks on a line of text that is linked to a page on the abd.com server, the
browser follows the hyperlink by sending a message to the abd.com server asking it for the page.
Mr. D. Santhosh Gupta, Dept. of ECE 42
Application Layer : WWW
Working of WWW:
• The below diagram indicates how the Web operates just like client-server architecture of the internet. When users
request web pages or other information, then the web browser of your system request to the server for the
information and then the web server provide requested services to web browser back and finally the requested
service is utilized by the user who made the request.
• Web browsers can be used for several tasks including conducting searches, mailing, transferring files, and much
more. Some of the commonly used browsers are Internet Explorer, Opera Mini, and Google Chrome.
Features of WWW
• WWW is open source.
• It is a distributed system spread across various websites.
• It is a Hypertext Information System.
• It is Cross-Platform.
• Uses Web Browsers to provide a single interface for many services.
• Dynamic, Interactive and Evolving.
Components of the Web
• There are 3 components of the web:
• Uniform Resource Locator (URL): serves as a system for resources on the web.
• Hyper Text Transfer Protocol (HTTP): specifies communication of browser and server.
• Hyper Text Markup Language (HTML): defines the structure, organisation and content of a web page.
• HTTP stands for HyperText Transfer Protocol. It is a protocol used to access the data on the World Wide Web.
• The protocol used to transfer hypertext between two computers is known as HyperText Transfer Protocol.
HTTP provides a standard between a web browser and a web server to establish communication. It is a set of
rules for transferring data from one computer to another.
• Whenever a web user opens their web browser, the user indirectly uses HTTP. It is an application protocol that is
used for distributed, collaborative, hypermedia information systems.
Working of HTTP
• First of all, whenever want to open any website then first open a web browser after that will type the URL of that
website (e.g., www.facebook.com ). This URL is now sent to the Domain Name Server (DNS). Then DNS first
check records for this URL in their database, then DNS will return the IP address to the web browser
corresponding to this URL. Now the browser is able to send requests to the actual server.
• After the server sends data to the client, the connection will be closed. If required something else from the server
then have to re-establish the connection between the client and the server.
HTTP Request
• HTTP request is simply termed as the information or data that is needed by Internet browsers for loading a website. This
is simply known as HTTP Request.
• There is some common information that is generally present in all HTTP requests. These are mentioned below.
• HTTP Version
• URL
• HTTP Method
• HTTP Request Headers
• HTTP Body
• HTTP Request Headers HTTP Request Headers generally store information in the form of key-value and must be
present in each HTTP Request. The use of this Request Header is to provide core information about the client’s
information, etc.
• HTTP Request Body HTTP Request Body simply contains the information that has to be transferred. HTTP Request
has the information or data to be sent to these browsers.
• HTTP Method HTTP Methods are simply HTTP Verb. In spite of being present so many HTTP Methods, the most
common HTTP Methods are HTTP GET and HTTP POST. These two are generally used in HTTP cases. In HTTP GET,
the information is received in the form of a website.
Mr. D. Santhosh Gupta, Dept. of ECE 46
Application Layer : HTTP
HTTP Response
• HTTP Response is simply the answer to what a Server gets when the request is raised. There are various things contained in HTTP
Response, some of them are listed below.
• HTTP Status Code
• HTTP Headers
• HTTP Body
• HTTP Response Headers HTTP Response headers are simply like an HTTP Request where it has that work to send some
important files and data to the HTTP Response Body.
• HTTP Response Body HTTP Responses are the responses that are received successfully upon the request. Generally, it comes
under the requests generated by the web. In most cases, the request is of transferring the HTML data into a webpage.
• HTTP Status Code HTTP Status Codes are the 3-Digit codes that tell the message or simply tell us about the HTTP Request whether
it has been completed or not. There are simply 5 types of status codes.
• Informational
• Successful
• Re-directional
• Client-Error
• Server-Error
Characteristics of HTTP
• HTTP is IP based communication protocol that is used to deliver data from server to client or vice-versa.
• The server processes a request, which is raised by the client, and also server and client know each other only during the current bid and
response period.
• Any type of content can be exchanged as long as the server and client are compatible with it.
• Once data is exchanged, servers and clients are no longer connected.
• It is a request and response protocol based on client and server requirements.
• It is a connection-less protocol because after the connection is closed, the server does not remember anything about the client and the
client does not remember anything about the server.
• It is a stateless protocol because both client and server do not expect anything from each other but they are still able to communicate.
Mr. D. Santhosh Gupta, Dept. of ECE 48
Application Layer : Electronic Mail
• Electronic mail (or e-mail) allows users to exchange messages. In an application such as HTTP or FTP, the server
program is running all the time, waiting for a request from a client. When the request arrives, the server provides
the service. There is a request and there is a response. In the case of electronic mail, the situation is different.
• First, e-mail is considered a one-way transaction. When Alice sends an email to Bob, she may expect a response,
but this is not a mandate. Bob may or may not respond. If he does respond, it is another one-way transaction.
• Second, it is neither feasible nor logical for Bob to run a server program and wait until someone sends an e-mail to
him. Bob may turn off his computer when he is not using it. This means that the idea of client/server programming
should be implemented in another way: using some intermediate computers (servers).
• The users run only client programs when they want and the intermediate servers apply the client/server paradigm.
Architecture
• To explain the architecture of e-mail, consider a common scenario, as shown in Fig. Another possibility is the case
in which Alice or Bob is directly connected to the corresponding mail server, in which LAN or WAN connection is
not required, but this variation in the scenario does not affect.
• In the common scenario, the sender and the receiver of the e-mail, Alice and Bob respectively, are connected via a
LAN or a WAN to two mail servers. The administrator has created one mailbox for each user where the received
messages are stored.
Label
• Each node in the tree has a label, which is a string with a maximum of 63 characters. The root label is a null string
(empty string). DNS requires that children of a node (nodes that branch from the same node) have different labels,
which guarantees the uniqueness of the domain names.
Domain Name
• Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots (.). The
domain names are always read from the node up to the root. The last label is the label of the root (null). This means
that a full domain name always ends in a null label, which means the last character is a dot because the null string is
nothing. Following fig. shows some domain names.
• If a label is terminated by a null string, it is called a fully qualified domain name (FQDN). The name must end with
a null label, but because null means nothing, the label ends with a dot. If a label is not terminated by a null string, it is
called a partially qualified domain name (PQDN). A PQDN starts from a node, but it does not reach the root. It is
used when the name to be resolved belongs to the same site as the client. Here the resolver can supply the missing
part, called the suffix, to create an FQDN.
Mr. D. Santhosh Gupta, Dept. of ECE 62
DNS: Name Space
Domain
• A domain is a subtree of the domain name space. The name
of the domain is the name of the node at the top of the
subtree. Following fig. shows some domains. Note that a
domain may itself be divided into domains.
Distribution of Name Space
• The information contained in the domain name space must
be stored. However, it is very inefficient and also not
reliable to have just one computer store such a huge amount
of information. It is inefficient because responding to
requests from all over the world places a heavy load on the
system. It is not reliable because any failure makes the data
inaccessible.
Hierarchy of Name Servers
• The solution to these problems is to distribute the
information among many computers called DNS servers.
One way to do this is to divide the whole space into many
domains based on the first level.
Mr. D. Santhosh Gupta, Dept. of ECE 63
DNS: Name Space
• In other words, let the root stand alone and create as many domains (subtrees) as there are first-level nodes.
• Because a domain created this way could be very large, DNS allows domains to be divided further into smaller
domains (subdomains). Each server can be responsible (authoritative) for either a large or small domain.
• In other words, have a hierarchy of servers in the same way that we have a hierarchy of names (see Figure)
• Zone
• Since the complete domain name hierarchy cannot be stored on a single server, it is divided among many servers.
What a server is responsible for or has authority over is called a zone.
• If a server accepts responsibility for a domain and does not divide the domain into smaller domains, the “domain” and
the “zone” refer to the same thing. However, if a server divides its domain into subdomains and delegates part of its
authority to other servers, “domain” and “zone” refer to different things.
• Of course, the original server does not free itself from responsibility totally. It still has a zone, but the detailed
information is kept by the lower-level servers (see Figure)
Root Server
• A root server is a server whose zone consists of the whole tree. A root server usually does not store any information
about domains but delegates its authority to other servers, keeping references to those servers. There are several root
servers, each covering the whole domain name space. The root servers are distributed all around the world.
Primary and Secondary Servers
• DNS defines two types of servers: primary and secondary. A primary server is a server that stores a file about the zone
for which it is an authority. It is responsible for creating, maintaining, and updating the zone file. It stores the zone file
on a local disk.
• A secondary server is a server that transfers the complete information about a zone from another server (primary or
secondary) and stores the file on its local disk. The secondary server neither creates nor updates the zone files. If
updating is required, it must be done by the primary server, which sends the updated version to the secondary.
A primary server loads all information from the disk file;
the secondary server loads all information from the primary server.
Mr. D. Santhosh Gupta, Dept. of ECE 65
DNS: DNS in the Internet
• DNS is a protocol that can be used in different platforms. In the Internet, the domain name space (tree) was originally
divided into three different sections: generic domains, country domains, and the inverse domains. However, due to the
rapid growth of the Internet, it became extremely difficult to keep track of the inverse domains, which could be used
to find the name of a host when given the IP address. The inverse domains are now deprecated.
Generic Domains
• The generic domains define registered hosts according to their generic behavior. Each node in the tree defines a
domain, which is an index to the domain name space database (see Figure).
• Looking at the tree, the first level in the generic domains section allows 14 possible labels.