Transport Layer Topics To Cover: Udp, TCP
Transport Layer Topics To Cover: Udp, TCP
UDP, TCP
1
Process-to-Process Delivery
• 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, as we will see later.
2
Transport Protocols
• Send data between application processes on source and destination hosts
• End-to-end (or host-to-host) communications
• Internet transport protocols: TCP, UDP, SCTP, DCCP
• Transmission Control Protocol: connection-oriented, error control, flow
control, congestion control
• User Datagram Protocol: unreliable connection-less delivery (same as IP)
• Addressing is common to all transport protocols
• Port is abstract view of end-point for communications; actual end-point is
process
Internet Applications
• Most Internet applications follow a client/server model of initiating
communication:
1. Client initiates communication
2. Server waits for client to initiate communication
3. Once the communication is initiated, data can flow in both directions
(client to server and server to client)
• For client to initiate communication to server, the client needs to know IP
address of server, and:
• Protocol number: identifies transport protocol used by both hosts
• 8-bit number; e.g. 6 = TCP, 17 = UDP; 1 = ICMP
• Port number: identifies application process on a host
• 16-bit number; 0-1023 well-known ports; 1024-49151
• registered ports; 49152 dynamic/private ports
Multiple Applications, Multiple Transport
Protocols
•
User Datagram Protocol
• UDP is a unreliable connection-less transport protocol
• Takes Data from the application layer, attaches a UDP header, and delivers
to IP.
• UDP provides checksum over the packet
• UDP segments may be: lost, arrive out of order, duplicated, arrive in error
• UDP is used by applications which:
• Require simplicity, e.g. TFTP, network management in
• embedded devices
• Don't require reliability, e.g. voice and video
• applications, network management
• Require low overheads, e.g. voice and video applications
• (require low delay)
User Datagram Format
•
10
TCP Segment Fields
• Source/Destination port
• Sequence number of the first data byte in this segment
• Acknowledgement number: sequence number of the next data byte
TCP expects to receive
• Header Length: Size of header (measured in 4 bytes)
• Window: number of bytes the receiver is willing to accept (for flow
control)
• Checksum: error detection on TCP segment
• Urgent pointer points to the sequence number of the last byte of
urgent data in the segment
• Options: such as maximum segment size, window scaling, selective
acknowledgement,
TCP Segment Flags
• Flags (1 bit each, if 1 the ag is true or on):
• CWR: Congestion Window Reduced
• ECE: Explicit Congestion Notification Echo
• URG: segment carries urgent data, use the urgent pointer field;
receiver should notify application program of urgent data as
soon as possible
• ACK: segment carries ACK, use the ACK field
• PSH: push function
• RST: reset the connection
• SYN: synchronies the sequence numbers
• FIN: no more data from sender