Section 2 - Networks
Section 2 - Networks
Faculty of Engineering
• congestion control
• flow control
• connection setup
local or
▪ UDP: User Datagram Protocol regional ISP
The applications associated with those protocols require that all application data
be received in the correct order and without gaps. TCP provides this service
whereas UDP does not.
Sheet 4: Question 5
▪ Is it possible for an application to enjoy reliable data transfer even
when the application runs over UDP? If so, how?
Yes. The application developer can put reliable data transfer into the application
layer protocol.
However, this would require a significant amount of work and debugging.
Sheet 4: Question 3
▪ Describe why an application developer might choose to run an
application over UDP rather than TCP
An application developer may not want its application to use TCP’s congestion
control, which can throttle the application sending rate at times of congestion.
Often, designers of IP telephony and IP video-conference applications choose to
run their applications over UDP because they want to avoid TCP’s congestion
control. Also, some applications do not need the reliable data transfer provided
by TCP.
Sheet 4: Question 4
▪ Why is it that voice and video traffic is often sent over TCP rather
than UDP in today’s Internet?
Since most firewalls are configured to block UDP traffic, using TCP for video and
voice traffic lets the traffic through the firewalls.
Socket programming
socket: door between application process and end-end-transport
protocol
application application
socket controlled by
process process app developer
transport transport
network network controlled
link by OS
link Internet
physical physical
application
The IP address of the destination host and the port number of the socket in
the destination process.
Sheet 4: Question 2
▪ Consider a TCP connection between Host A and Host B. Suppose that
the TCP segments traveling from Host A to Host B have source port
number x and destination port number y. What are the source and
destination port numbers for the segments traveling from Host B to
Host A?
For each persistent connection, the Web server creates a separate “connection
socket”. Each connection socket is identified with the four tuples. When it receives
a segment, it examines its four fields and determines to which socket it should pass
the payload. Thus, the requests from A and B pass through different sockets.
The identifier for both sockets has 80 for the destination port; however, the
identifiers for these sockets have different values for source IP addresses.
Thanks