Beruflich Dokumente
Kultur Dokumente
TRANSPORT LAYER
&
DOMAIN NAME SYSTEM
The next point is about the ACKs. Notice that only two
ACKs are sent here. The first one acknowledges only the
first frame; the second one acknowledges three frames. In
Selective Repeat, ACKs are sent when data are delivered to
the network layer. If the data belonging to n frames are
delivered in one shot, only one ACK is sent for all of them.
Figure 2.23 Flow diagram for Example 2.8
PIGGYBACKING
A technique called piggybacking is
used to improve the efficiency of the
bidirectional protocols.
b).With a neat diagram, describe the TCP/IP reference model. Explain the
protocol functions of each layer (10 marks)
2a). List different types of addressing in TCP. Explain all types of addressing
with a suitable example . (10M)
User Datagram
Protocol
Objectives
Upon completion you will be able to:
TCP/IP 45
Protocol Suite
Figure 11.1 Position of UDP in the TCP/IP protocol suite
TCP/IP 46
Protocol Suite
11.1 PROCESS-TO-PROCESS
COMMUNICATION
Before we examine UDP, we must first understand host-to-host
communication and process-to-process communication and the difference
between them.
Port Numbers
Socket Addresses
TCP/IP 47
Protocol Suite
socket
TCP/IP 49
Protocol Suite
Figure 11.2 UDP versus IP
TCP/IP 50
Protocol Suite
Figure 11.3 Port numbers
TCP/IP 51
Protocol Suite
Figure 11.4 IP addresses versus port numbers
TCP/IP 52
Protocol Suite
Figure 11.5 ICANN ranges
TCP/IP 53
Protocol Suite
Note:
TCP/IP 54
Protocol Suite
Table 11.1 Well-known ports used with UDP
TCP/IP 55
Protocol Suite
Example 1
In UNIX, the well-known ports are stored in a file called
/etc/services. Each line in this file gives the name of the server
and the well-known port number. We can use the grep utility to
extract the line corresponding to the desired application. The
following shows the port for TFTP. Note TFTP can use port 69
on either UDP or TCP.
SNMP uses two port numbers (161 and 162), each for a different
purpose, as we will see in Chapter 21.
TCP/IP 57
Protocol Suite
Figure 11.6 Socket address
TCP/IP 58
Protocol Suite
11.2 USER DATAGRAM
TCP/IP 59
Protocol Suite
UDP is a connectionless, unreliable
transport layer protocol with no
embedded flow or error control
mechanism except the checksum for
error detection.
TCP/IP 61
Protocol Suite
Note:
UDP length =
IP length − IP header’s length
TCP/IP 62
Protocol Suite
11.3 CHECKSUM
UDP checksum calculation is different from the one for IP and ICMP. Here
the checksum includes three sections: a pseudoheader, the UDP header,
and the data coming from the application layer.
TCP/IP 63
Protocol Suite
Figure 11.8 Pseudoheader for checksum calculation
TCP/IP 64
Protocol Suite
Figure 11.9 Checksum calculation of a simple UDP user datagram
TCP/IP 65
Protocol Suite
11.4 UDP OPERATION
UDP uses concepts common to the transport layer. These concepts will be
discussed here briefly, and then expanded in the next chapter on the TCP
protocol.
Connectionless Services
Flow and Error Control
Encapsulation and Decapsulation
Queuing
Multiplexing and Demultiplexing
TCP/IP 66
Protocol Suite
Figure 11.10 Encapsulation and decapsulation
TCP/IP 67
Protocol Suite
Figure 11.11 Queues in UDP
TCP/IP 68
Protocol Suite
Figure 11.12 Multiplexing and demultiplexing
TCP/IP 69
Protocol Suite
Chapter 25
Transmission
Control Protocol
Objectives
Upon completion you will be able to:
• Be able to name and understand the services offered by TCP
• Understand TCP’s flow and error control and congestion control
• Be familiar with the fields in a TCP segment
• Understand the phases in a connection-oriented connection
• Understand the TCP transition state diagram
• Be able to name and understand the timers used in TCP
• Be familiar with the TCP options
TCP/IP 70
Protocol Suite
Figure 12.1 TCP/IP protocol
suite
TCP/IP 71
Protocol Suite
12.1 TCP SERVICES
We explain the services offered by TCP to the processes at the application
layer.
Process-to-Process Communication
Stream Delivery Service
Full-Duplex Communication
Connection-Oriented Service
Reliable Service
TCP/IP 72
Protocol Suite
Transmission Control Protocol (TCP) is one
of the transport layer protocols in the
TCP/IP protocol suite.
TCP/IP 74
Protocol Suite
Example 1
TCP/IP 75
Protocol Suite
Figure 12.2 Stream delivery
TCP/IP 76
Protocol Suite
Figure 12.3 Sending and
receiving buffers
TCP/IP 77
Protocol Suite
Figure 12.4 TCP segments
TCP/IP 78
Protocol Suite
12.2 TCP FEATURES
To provide the services mentioned in the previous section, TCP has several
features that are briefly summarized in this section.
Numbering System
Flow Control
Error Control
Congestion Control
TCP/IP 79
Protocol Suite
Note:
TCP/IP 80
Protocol Suite
Example 2
TCP/IP 82
Protocol Suite
Note:
TCP/IP 83
Protocol Suite
12.3 SEGMENT
A packet in TCP is called a segment
Format
Encapsulation
TCP/IP 84
Protocol Suite
Figure 11.7 User datagram format
TCP/IP 85
Protocol Suite
Figure 12.5 TCP segment
format
TCP/IP 86
Protocol Suite
Figure 12.6 Control field
TCP/IP 87
Protocol Suite
Table 12.2 Description of flags in the control field
TCP/IP 88
Protocol Suite
Figure 12.7 Pseudoheader
added to the TCP datagram
TCP/IP 89
Protocol Suite
Note:
TCP/IP 90
Protocol Suite
Figure 12.8 Encapsulation
and decapsulation
TCP/IP 91
Protocol Suite
A TCP connection normally consists of three
phases: 1. connection establishment
2. data transfer
3. connection termination.
Connection Establishment
Data Transfer
Connection Termination
Connection Reset
TCP/IP 93
Protocol Suite
Figure 12.9 Connection establishment
using three-way handshaking
TCP/IP 94
Protocol Suite
Note:
TCP/IP 95
Protocol Suite
Note:
TCP/IP 96
Protocol Suite
Note:
TCP/IP 97
Protocol Suite
Figure 12.10 Data transfer
TCP/IP 98
Protocol Suite
Note:
TCP/IP 99
Protocol Suite
Figure 12.11 Connection termination
using three-way handshaking
TCP/IP 100
Protocol Suite
Note:
TCP/IP 101
Protocol Suite
Figure 12.12 Half-close
TCP/IP 102
Protocol Suite
1 a).Explain the different protocols used in noiseless
channels ( Go-Back- N Protocol & Selective repeat
Prptocol. (20 marks)
25.103
2. a). Explain the different fields in TCP header and mention the fields
that are used for Addressing, error control and flow control.
( 10 marks)
1. a). Explain the different fields in TCP header and mention the
fields that are used for Addressing, error control and flow control.
( 10 marks)
)
1a.Explain the different fields of IPv4 datagram format.
Each
3b. Explain with neat diagram the three phases in
10 M
Mobile host communication.
4a. Explain the Go-Back-N protocol &
Each
Selective Repeat ARQ with suitable FSMs.
10 M
10
Q1
• In a block, the prefix length is /24; what is the mask?
• A) 255.255.255.0
• B) 255.255.242.0
• C) 255.255.0.0
• D) none of the above
• A) is 20 to 60 bytes long
• B) is 20 bytes long
• C) is 60 bytes long
• D) none of the above
• A) 428
• B) 407
• C) 107
• D) 427
• http://www.froydwess.com/2014/04/mcqs-in-data-
communications-and-networking.html