Title: COMP 416 Internet Protocols and Software
1COMP 416Internet Protocols and Software
- Instructor Zhijun Wang
- Lab1 will be given next week at PQ604B and
PQ605 at the class time - Todays contents
- UDP (Chap. 11)
- TCP (Chap.12)
2Key thinks
- What are the major differences between UDP and
TCP? - Where are the application domains for UDP and
TCP? - Why does TCP work well?
- What are the disadvantages of UDP and TCP?
3Chapter 11
User DatagramProtocol
Objectives
- Be able to explain process-to-process
communication - Know the format of a UDP user datagram
- Understand the operation of UDP
- Know when it is appropriate to use UDP
4Figure 1 Position of UDP in the TCP/IP
protocol suite
5Figure 2 UDP versus IP
UDP (User Datagram Protocol) is a connectionless,
unreliable transport protocol. UDP is a simple
protocol using a minimum overhead.
6Figure 3 Port numbers
UDP uses port number to identify processes. A
port number has 16 bits, the range is from 0 to
65,535. The client process defines itself with a
port number, called ephemeral port number which
is recommended to be greater than 1023. The
server process also defines itself with a port
number which is a well-known port number in the
range 0-1023.
7Figure 4 IP addresses versus port numbers
IP addresses identify devices Port numbers
identify processes
8Figure 5 ICANN ranges
ICANN International Corporation for Assigned
Names and Numbers
Well-known ports the ports ranging from 0 to
1023 are assigned and controlled by
ICANN. Registered ports the ports ranging from
1024 to 49,151 are not assigned and
controlled by ICANN. They can only be registered
with ICANN to prevent duplication. Dynamic
ports the ports ranging from 49,152 to 65,535
are neither controlled nor registered. They
can be used as temporary or private numbers
9Table 1 Well-known ports used with UDP
10 Socket address
Socket address a combination of IP address and a
port number
11Example 1
An SNMP client residing on a host with IP address
132.23.43.31 sends a message to an SNMP (Port
161) server residing on a host with IP addresses
32.23.2.1. What is the pair of sockets used in
this communication? Solution In the client, the
socket address is IP address combined with an
ephemeral ports X, (132.23.43.31, X). In the
server, the socket address is (32.23.2.1, 161).
12Figure 6 User datagram format
UDP packets are called user datagrams and have a
fixed-size header of 8 bytes.
Error check for the user datagram
13Figure 7 Encapsulation and decapsulation
UDP connectionless service User datagrams are
not numbered No relationship between different
user datagrams even if they are coming from the
same user.
UDP unreliable service No flow and error control
14Figure 8 Queues in UDP
There are one outgoing and one incoming queues
used for sending and receiving datagrams. The
queues usually are identified by the port numbers.
15Applications of UDP
- UDP is suitable for a process that requires
simple-response communication with little concern
for flow and error control - UDP is suitable for a process with internal flow
and error-control mechanism, e.g., Trivial File
Transfer Protocol (TFTP). - UDP is a suitable transport protocol for
multicasting. - UDP is used for management processes such as
SNMP. - UDP is used for route updating protocols such as
Routing Information Protocol (RIP).
16Congestion Control of UDP
- DCCP Datagram Congestion Control Protocol
- RFC4340 http//www.read.cs.ucla.edu/dccp/rfc4340
.txt