UNIT IV Udp TCP
UNIT IV Udp TCP
UNIT IV Udp TCP
1
PROCESS-TO-PROCESS DELIVERY
• The data link layer is responsible for delivery of frames
between two neighboring nodes over a link. This is called
node-to-node delivery.
• The network layer is responsible for delivery of datagrams
between two hosts. This is called host-to-host delivery.
• Real communication takes place between two processes
(application programs).
• The transport layer is responsible for process-to-process
delivery—the delivery of a packet, part of a message, from one
process to another. Two processes communicate in a
client/server relationship.
Figure: Types of data deliveries
PORT NUMBERS
• Whenever we need to deliver something to one specific
destination among many, we need an address.
• At the data link layer, we need a MAC address to choose one
node among several nodes if the connection is not point-to-
point. A frame in the data link layer needs a destination MAC
address for delivery and a source address for the next node's
reply.
• At the network layer, we need an IP address to choose one host
among millions. A datagram in the network layer needs a
destination IP address for delivery and a source IP address for
the destination's reply.
• At the transport layer, we need a transport layer address, called
a port number, to choose among multiple processes running on
the destination host. The destination port number is needed for
delivery; the source port number is needed for the reply.
Figure: Port numbers
Figure: IP addresses versus port numbers
PORT NUMBERS
• The port numbers are 16-bit integers between 0 and 65,535.
• The client program defines itself with a port number, chosen randomly
by the transport layer software running on the client host.
• The server process must also define itself with a port number. This
port number, however, cannot be chosen randomly.
• The Internet has decided to use universal port numbers for servers;
these are called well-known port numbers.
• Well-known ports:- the ports ranging from 0 to 1,023 are assigned and
controlled by Internet Assigned Number Authority( IANA).
• Registered ports:- the ports ranging from 1,024 to 49,151 are not
assigned or controlled by IANA. They can only be registered with
IANA to prevent duplication.
• Dynamic ports:- the ports ranging from 49,152 to 65,535 are neither
controlled nor registered. They can be used by any process.
• The combination of an IP address and a port number is called a socket
address.