0% found this document useful (0 votes)
8 views11 pages

Transport and Application Layer Protocols

The document discusses the Transport and Application layers of networking, detailing various primitives like Listen, Connect, Accept, Send, Receive, and Disconnect that facilitate communication between servers and clients. It outlines the elements of transport protocols, including types of service, error control, flow control, connection establishment, multiplexing, fragmentation, and addressing. Additionally, it compares Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) on aspects such as reliability, speed, and header structure, while also covering the Domain Name System (DNS) and the World Wide Web (WWW) as application layer protocols.

Uploaded by

hlshreeshanthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views11 pages

Transport and Application Layer Protocols

The document discusses the Transport and Application layers of networking, detailing various primitives like Listen, Connect, Accept, Send, Receive, and Disconnect that facilitate communication between servers and clients. It outlines the elements of transport protocols, including types of service, error control, flow control, connection establishment, multiplexing, fragmentation, and addressing. Additionally, it compares Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) on aspects such as reliability, speed, and header structure, while also covering the Domain Name System (DNS) and the World Wide Web (WWW) as application layer protocols.

Uploaded by

hlshreeshanthi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Unit-5 Transport layer and Application layer

Primitive Meaning

When server is ready to accept request of incoming connection, it simply put this
primitive into action. Listen primitive simply waiting for incoming connection
Listen request.

This primitive is used to connect the server simply by creating or establishing


Connect connection with waiting peer.

Accept This primitive simply accepts incoming connection from the peer.

These primitive afterwards block the server. Receive primitive simply waits for
Receive incoming message.

This primitive is put into action by the client to transmit its request that is followed
by putting receive primitive into action to get the reply. Send primitive simply sends
Send or transfer the message to the peer.

This primitive is simply used to terminate or end the connection after which no one
Disconnect will be able to send any of the message.

What are the elements of Transport Protocol?


To establish a reliable service between two machines on a network, transport protocols
are implemented, which somehow resembles the data link protocols implemented at
layer 2. The major difference lies in the fact that the data link layer uses a physical
channel between two routers while the transport layer uses a subnet.
Following are the issues for implementing transport protocols−

Types of Service
The transport layer also determines the type of service provided to the users from the
session layer. An error-free point-to-point communication to deliver messages in the
order in which they were transmitted is one of the key functions of the transport layer.

Error Control
Error detection and error recovery are an integral part of reliable service, and therefore
they are necessary to perform error control mechanisms on an end-to-end basis. To
control errors from lost or duplicate segments, the transport layer enables unique
segment sequence numbers to the different packets of the message, creating virtual
circuits, allowing only one virtual circuit per session.
Flow Control: The underlying rule of flow control is to maintain a synergy
between a fast process and a slow process. The transport layer enables a fast process to
keep pace with a slow one. Acknowledgements are sent back to manage end-to-end flow
control. Go back N algorithms are used to request retransmission of packets starting with
packet number N. Selective Repeat is used to request specific packets to be
retransmitted.

Connection Establishment/Release: The transport layer creates and


releases the connection across the network. This includes a naming mechanism so that a
process on one machine can indicate with whom it wishes to communicate. The transport
layer enables us to establish and delete connections across the network to multiplex
several message streams onto one communication channel.

Multiplexing/De multiplexing : The transport layer establishes a


separate network connection for each transport connection required by the session layer.
To improve throughput, the transport layer establishes multiple network connections.
When the issue of throughput is not important, it multiplexes several transport
connections onto the same network connection, thus reducing the cost of establishing
and maintaining the network [Link] several connections are multiplexed, they
call for demultiplexing at the receiving end. In the case of the transport layer, the
communication takes place only between two processes and not between two machines.
Hence, communication at the transport layer is also known as peer-to-peer or process-to-
process communication.

Fragmentation and re-assembly: When the transport layer receives a


large message from the session layer, it breaks the message into smaller units depending
upon the requirement. This process is called fragmentation. Thereafter, it is passed to the
network layer. Conversely, when the transport layer acts as the receiving process, it
reorders the pieces of a message before reassembling them into a message.

Addressing :Transport Layer deals with addressing or labelling a frame. It also


differentiates between a connection and a transaction. Connection identifiers are ports or
sockets that label each frame, so the receiving device knows which process it has been
sent from. This helps in keeping track of multiple-message conversations. Ports or sockets
address multiple conservations in the same location.

Transmission control protocol User datagram protocol


Basis (TCP) (UDP)

Type of Service TCP is a connection-oriented protocol. UDP is the Datagram-oriented


Connection-orientation means that the protocol. This is because
communicating devices should establish there is no overhead for
a connection before transmitting data and opening a connection,
Transmission control protocol User datagram protocol
Basis (TCP) (UDP)

maintaining a connection, and


terminating a connection. UDP
is efficient for broadcast and
should close the connection after multicast types of network
transmitting the data. transmission.

The delivery of data to the


TCP is reliable as it guarantees the destination cannot be
Reliability delivery of data to the destination router. guaranteed in UDP.

TCP provides extensive error-checking UDP has only the basic error
Error checking mechanisms. It is because it provides checking mechanism using
mechanism flow control and acknowledgment of data. checksums.

Acknowledgment An acknowledgment segment is present. No acknowledgment segment.

There is no sequencing of
Sequencing of data is a feature of data in UDP. If the order is
Transmission Control Protocol (TCP). this required, it has to be
means that packets arrive in order at the managed by the application
Sequence receiver. layer.

UDP is faster, simpler, and


Speed TCP is comparatively slower than UDP. more efficient than TCP.

There is no retransmission of
Retransmission of lost packets is possible lost packets in the User
Retransmission in TCP, but not in UDP. Datagram Protocol (UDP).

TCP has a (20-60) bytes variable length UDP has an 8 bytes fixed-
Header Length header. length header.

Weight TCP is heavy-weight. UDP is lightweight.

Handshaking Uses handshakes such as SYN, ACK, It’s a connectionless protocol


Techniques SYN-ACK i.e. No handshake

Broadcasting TCP doesn’t support Broadcasting. UDP supports Broadcasting.


Transmission control protocol User datagram protocol
Basis (TCP) (UDP)

TCP is used by HTTP, UDP is used by DNS, DHCP,


Protocols HTTPs, FTP, SMTP and Telnet. TFTP, SNMP, RIP, and VoIP.

UDP connection is message


Stream Type The TCP connection is a byte stream. stream.

Overhead Low but higher than UDP. Very low.

What is the TCP Segment Header?


Every TCP segment consists of 20 bytes fixed format header. Header options may follow
the fixed header. With a header so that it can tag up to 65535 data bytes.
The TCP header format is shown in the figure below −

Source Port
It is a 16-bit source port number used by the receiver to reply.

Destination Port
It is a 16-bit destination port number.

Sequence Number
The sequence number of the first data byte in this segment. During the SYN Control bit is
set, and the sequence number is n, and the first data byte is n + 1.

Acknowledgement Number
If the ACK control bit is set, this field contains the next number that the receiver expects
to receive.
Data Offset
The several 32-bit words in the TCP header shows from where the user data begins.

Reserved (6 bit)
It is reserved for future use.

URG
It indicates an urgent pointer field that data type is urgent or not.

ACK
It indicates that the acknowledgement field in a segment is significant, as discussed
early.

PUSH
The PUSH flag is set or reset according to a data type that is sent immediately or not.

RST It Resets the connection.


SYN
It synchronizes the sequence number.

FIN
This indicates no more data from the sender.

Window
It is used in Acknowledgement segment. It specifies the number of data bytes, beginning
with the one indicated in the acknowledgement number field that the receiver is ready to
accept.

Checksum
It is used for error detection.

Options
The IP datagram options provide additional punctuality. It can use several optional
parameters between a TCP sender and receiver. It depends on the options used. The
length of the field may vary in size, but it can't be larger than 40 bytes due to the header
field's size, which is 4 bit.
The most typical option is the maximum segment size MASS option. A TCP receiver
communicates to the TCP sender the total length of the segment it can accept with this
option. The other various options are used for flow control and congestion control, each
explained in the table shown in the table.

Table of Options
The table of options in TCP segment header is as follows −
Kind Length Meaning

0 - End of option list

1 - No operation

2 4 Maximum segment size

3 3 Window Scale

4 2 Sack-permitted

5 X Sack

8 10 Time Stamps

Padding
Options in each may vary in size, and it may be necessary to "pad" the TCP header with
zeros so that the segment ends on a 32-bit word boundary as per the standard.

Data
Although in some cases like acknowledgement segments with no data in the reverse
direction, the variable-length field carries the application data from sender to receiver.
This field, connected with the TCP header fields, constitute a TCP segment.

DNS
An application layer protocol defines how the application processes running on different
systems, pass the messages to each other.

o DNS stands for Domain Name System.


o DNS is a directory service that provides a mapping between the name of a host on the
network and its numerical address.
o DNS is required for the functioning of the internet.
o Each node in a tree has a domain name, and a full domain name is a sequence of symbols
specified by dots.
o 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.
o For example, suppose the FTP site at EduSoft had an IP address of [Link], most
people would reach this site by specifying [Link]. 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.

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.

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.

World Wide Web (WWW)


The World Wide Web is abbreviated as WWW and is commonly known as the
web. The WWW was initiated by CERN (European library for Nuclear Research) in
1989.
WWW can be defined as the collection of different websites around the world,
containing different information shared via local servers(or computers).
History:
It is a project created, by Timothy Berner Lee in 1989, for researchers to work
together effectively at CERN. is an organization, named the World Wide Web
Consortium (W3C), which was developed for further development of the web. This
organization is directed by Tim Berner’s Lee, aka the father of the web.
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 [Link] server, the browser follows the
hyperlink by sending a message to the [Link] server asking it for the page.
Here the browser displays a web page on the client machine when the user clicks
on a line of text that is linked to a page on [Link], the browser follows the
hyperlink by sending a message to the [Link] server asking for the page.
Working of WWW:
The World Wide Web is based on several different technologies: Web browsers,
Hypertext Markup Language (HTML) and Hypertext Transfer Protocol (HTTP).
A Web browser is used to access web pages. Web browsers can be defined as
programs which display text, data, pictures, animation and video on the Internet.
Hyperlinked resources on the World Wide Web can be accessed using software
interfaces provided by Web browsers. Initially, Web browsers were used only for
surfing the Web but now they have become more universal. 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:
 HyperText Information System
 Cross-Platform
 Distributed
 Open Standards and Open Source
 Uses Web Browsers to provide a single interface for many services
 Dynamic, Interactive and Evolving.
 “Web 2.0”

Components of the Web: There are 3 components of the web:

1. Uniform Resource Locator (URL): serves as a system for resources on


the web.
2. HyperText Transfer Protocol (HTTP): specifies communication of
browser and server.
3. Hyper Text Markup Language (HTML): defines the structure,
organisation and content of a webpage.

Assignment questions
1. Explain transport service primitive.
Answer(LISTEN,CONNECT,SEND,RECEIVE,DISCONNECT) explain these
primitives.
2. Explain elements of transport protocols. Answer( addressing,
connection establishment, connection release, flow control and
buffering, multiplexing, crash recovery)
3. Differences between TCP/UDP. (any 7-8 differences)
4. UDP header and TCP segment header
5. Explain architecture of E-mail and WWW .

You might also like