User Datagram Protocol(UDP) - · PDF fileUser Datagram Protocol(UDP) ... •Hence, the...

Click here to load reader

  • date post

  • Category


  • view

  • download


Embed Size (px)

Transcript of User Datagram Protocol(UDP) - · PDF fileUser Datagram Protocol(UDP) ... •Hence, the...

User Datagram Protocol(UDP)

UDP is a connectionless protocol.

There is no mechanism for ensuring that data sent is received by the destination.

Hence, it is an unreliable protocol.

A unit of data sent using UDP is called a Datagram.

UDP is used in real time applications like audio or video broadcasting, chatting applications where prompt delivery is preferred over accurate delivery.

UDP attaches 8 bytes of header fields to the data to be sent.

These fields include: A length field, a checksum field, and source and destination port numbers.

UDP Features

Connection-less service:All Datagrams are independent of each other even though they come from the same source. They are free to take up any network path to reach the destination.These datagrams are not numbered.

Flow and Error Control:It doesnt provide any flow control so the receiver can overflow with incoming messages.

UDP doesnt support any other error control mechanism , except for the checksum.There are no acknowledgements sent from destination to the source.

Encapsulation and De-capsulation: The UDP encapsulates and de-capsulates messages in an IP datagram for message exchange.

ICMP(Internet Control Message Protocol)

The IP provides unreliable and connection-less datagram delivery.

It doesnt have any error detection or correction mechanism.

The ICMP is used to overcome this drawback. It is used along with IP.

It reports the presence of errors and sends the control messages on behalf of IP.

ICMP is a network layer protocol.

ICMP packets are encapsulated in the IP datagrams and then sent to lower layer.

The ping command uses ICMP packet to test whether a station is reachable.

TCP Header Format

Every TCP packet begins with a 20 byte fixed format header.

The TCP header(segment) without data is used for sending the acknowledgements and the control information.

Ports and Sockets:

A port is a 16 bit logical number assigned for uniquely identifying a process/application running on a host machine.

When an application wants to communicate with another application on a different computer, ports are used.

E.g., Application A running on computer 1 provides destination IP address and Port number of Application B for which data is intended.

The TCP protocol of computer 2 uses the port number to direct the message to Application B.

Ports numbers(0 to 1023)- Well known Ports, (1224 to 49151)-Registered ports, Private Ports-(49152-65535)


A Socket is a logical number comprising of the IP address and the port number.

So, a pair of Sockets is required to identify a TCP connection between two applications on two different hosts.

Domain Name Server(DNS)

The application layer programs operate on the concept of clients and servers.

Source and destination addresses are needed for this communication to take place.

The addressing in application programs is different from the other layers. E.g., e-mail address is like [email protected] where web page address is like

These addresses are easy for people to remember and use but not suitable for IP protocol.

Therefore an alias address has to be mapped to the IP address.

DNS is used to handle naming or addressing within the Internet.

DNS is not directly used by the user. It is used by another application program to carry out the mapping.

mailto:[email protected]://

For mapping purpose, an application program calls a library procedure called a Resolver.

The name is passed as a parameter to the resolver.

The resolver sends a UDP packet to the local DNS server which looks up the name and returns the corresponding IP address to the resolver.

The resolver then sends this address to the application program.

Hence, the program is able to establish a TCP connection or directly send the UDP packets to the destination.

File Transfer Protocol

FTP is a standard Internet mechanism which helps a host to copy files from another host.

Following issues may be associated with the file transfer over the internet.

Two system may represent text and data in different ways.

The directory structure of two systems may be different.

Two systems may use different file naming conventions.

FTP provides solutions to all these problems.

Basic FTP model

FTP establishes two types of connections between the client and for Control information and other for data transfer.

FTP uses port 21 for control information and port 20 for data transfer.

The control connection is kept alive during entire FTP interactive session.

The data connection is first opened , file is transferred and data connection is closed. This is done for transferring each file.