TCP vs.

UDP

1

UDP 

UDP is datagram-oriented and datagramconnectionless protocol. protocol. No reliability and flow control mechanisms, no error recovery mechanisms. TFTP (69), RPC (111), ECHO (7) , DAYTIME (13) , SNMP (161) and NTP (123) uses UDP.  

2

UDP Header Format

3

UDP Header Format 

Source Port number : Used to identify the port of the sending application process. Destination Port number: Used to identify the receiving process on the destination host. UDP Length: Length of UDP header and data in bytes. UDP Checksum : covers the UDP header and UDP data.
4   

RPC 

RPC is implemented in the client-server clientoperation through a technique called STUB. STUB is acting as a proxy for application. Based on extending the notion of local procedure calling, so that the called procedure need not exist in the same address space as the calling procedure. The two processes may be on the same system, or they may be on different systems with a network connecting them.
5  

RPC Flow

6

RTP 

RTP stands for Real Time Transport Protocol and used in multimedia applications such as music-onmusic-on-demand, video conferencing, videovideoonon-demand and such real time applications . RTP is based on UDP hence no flow control, error control and no acknowledgement and no mechanism for retransmission. 

7

RTP

8

RTP 

Version: Indicates Version number. The value is 2. P bit: Indicates that the packet has been padded to a multiple of 4 bytes. X bit: Indicates that the extension header is present. CC field: indicates the number of sources present.
9   

RTP 

M bit: Indicates start of the frame (Video frame of start of word in an audio channel). Payload type: Indicates encoding algorithm used. Sequence number: Used by the receiver to detect packet loss. Time stamp : indicates sampling instant of the first byte in RTP data packet, used to reduce jitter at the receiver.   

10

RTCP 

RTCP is the control protocol for RTP and provides feedback on the quality of the data transmitted (ex: delay, jitter, bandwidth and receiver report etc). It does not support transport of data. The feedback information is used by the encoding process to increase the data rate. RTCP packets are : sender report, receiver report, source description, BYE and APP.
11  

TCP 

Connection oriented Protocol, reliable, byte stream service. It provides flow control. TCP does not support multicasting and broadcasting. TCP header is of 20 bytes. With options, the Max length is 60 bytes.  

12

TCP

13

TCP header Format 

Source Port and Destination Port: indicates the sending and receiving application port number. Sequence number and ACK number: used by the receiver to identify the loss of packets. ACK number contains next sequence number. Header length: Length of TCP header. Reserved: Reserved for future use and must be set to 0.
14  



TCP header Format 
  

 

URG: Urgent Pointer. ACK: Used to indicate ACK number is valid. PSH: The receiver should pass this data to the application as soon as possible. RST: Used to reset the connection. SYN: Synchronize sequence number. This bit is set to 1 for every new connection. FIN: No more data from the sender.

15

TCP header Format 

Window size: Specifies the number of bytes the sender is willing to accept. Checksum: Used for error detection. Urgent Pointer: if URG is set, the segment contains urgent data. Options: Provides other functions.
16   

TCP vs. UDP

17

Sign up to vote on this title
UsefulNot useful