You are on page 1of 33

UNIT V

Transport Layer
&
Application Layer
Transport Layer

• UDP: User Datagram Protocol


• TCP: Transmission Control Protocol
Introduction to UDP

The UDP header.


1. Source Port: Source Port is a 2 Byte long field used to identify the port number

of the source.

2. Destination Port: It is a 2 Byte long field, used to identify the port of the

destination.

3. Length: Length is the length of UDP including the header and the data. It is a

16-bits field.

4. Checksum: Checksum is 2 Bytes long field. It is the 16-bit one’s complement of

the one’s complement sum of the UDP header.


Notes – Unlike TCP, the Checksum calculation is not mandatory in UDP. No Error
control or flow control is provided by UDP. Hence UDP depends on IP and ICMP for
error reporting. Also UDP provides port numbers so that is can differentiate between
users requests.
Applications of UDP: 
TCP: Transmission Control Protocol
The TCP Service Model

Well Known ports.


The TCP Segment Header

TCP Header.
The header of a TCP segment can range from 20-60 bytes. 40 bytes
are for options. If there are no options, a header is 20 bytes else it
can be of upmost 60 bytes. 
Header fields: 
 

• Source Port Address – 

A 16-bit field that holds the port address of the application that is

sending the data segment. 

• Destination Port Address – 

A 16-bit field that holds the port address of the application in the

host that is receiving the data segment. 

 
• Acknowledgement Number – 

A 32-bit field that holds the acknowledgement number, i.e, the byte number that the receiver

expects to receive next. It is an acknowledgement for the previous bytes being received

successfully. 

• Header Length (HLEN) – 

This is a 4-bit field that indicates the length of the TCP header by a number of 4-byte words

in the header, i.e if the header is 20 bytes(min length of TCP header), then this field will hold

5 (because 5 x 4 = 20) and the maximum length: 60 bytes, then it’ll hold the value

15(because 15 x 4 = 60). Hence, the value of this field is always between 5 and 15. 

 
• Window size – 

This field tells the window size of the sending TCP in bytes. 

• Checksum – 

This field holds the checksum for error control. It is mandatory in TCP as opposed

to UDP. 

• Urgent pointer – 

This field (valid only if the URG control flag is set) is used to point to data that is

urgently required that needs to reach the receiving process at the earliest. The
TCP Connection Establishment

6-31

(a) TCP connection establishment in the normal case.


(b) Call collision.
TCP Connection Release
TCP Connection Management Modeling

The states used in the TCP connection management finite state machine.
TCP Transmission Policy

Window management in TCP.


TCP Congestion Control

(a) A fast network feeding a low capacity receiver.


(b) A slow network feeding a high-capacity receiver.
TCP Timer Management

TCP Uses multiple timers to do works. The following are


the various types of Timers.
• Retransmission Timer
• Persistence Timer (Used to prevent Deadlocks)
• Keep Alive Timer (Connection is ideal for long Time)
• Ack Timer
• Retransmission Timer : The sender after sending the
data unit it will start the Retransmission Timer, if the
sender does not receive any acknowledge from the
receiver after some time Retransmission timer goes off
and the sender will retransmit the data unit once again.
• Persistence Timer : The Receiver sends an Ack with
window size of zero telling the sender to wait.
Later the receiver updates the window but the data unit
with the update is lost.
Now both sender and receiver will wait forever
resulting in a Deadlock state. To avoid this DL the
Persistence timer is set and once if the timer is gone
off the sender transmits a probe message to the
receiver.
• Keep Alive Timer : When a connection has been ideal
for a long time , the keep alive timer may go off to
cause one side to check if other side is still there.
If it fails to respond, the connection is Terminated.
The Application Layer
DNS – The Domain Name System
Name Space

i) Flat Name Space


ii) Hierarchical Name Space (Ex: Domain Name
space)
• Flat Name space searching will be difficult.
• Domain name space is a tree format having root at
the top.
• Each node in the tree has a domain name.
• Full Domain is a sequence of labels separated by
dots.
• The domain names are always read from leaves to
root.
• Domain names are of two types
i) Fully qualified domain names.
Ex: cse.gprec.ac.in
ii) Partially qualified domain names.
Ex: cse.gprec
Domain Name Space
• DNS Name space is a Hierarchical name
space.
Top Level Domain
• Ex: cse.gprec.ac.in

Most Specific Most Generic


The DNS Name Space

A portion of the Internet domain name space.


Resource Records

The principal DNS resource records types.


Name Servers

Part of the DNS name space showing the division into zones.
Thank You

You might also like