Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Transport Layer.

Similar presentations


Presentation on theme: "The Transport Layer."— Presentation transcript:

1 The Transport Layer

2 The Transport Service Services provided to the application layer by using the network layer service Transport header of a segment exchanged between two users is not read by routers and packet switches.

3 The nesting of TPDUs, packets, and frames.
Transport Service The nesting of TPDUs, packets, and frames.

4 The socket primitives for TCP.
Berkeley Sockets The socket primitives for TCP.

5 Elements of Transport Protocols
Addressing Connection Establishment Connection Release Flow and Congestion Control Buffering Multiplexing, Demultiplexing

6 UDP and TCP User Datagram Protocol (UDP) provides only of multiplexing/ demultiplexing of data exchange between different applications. It is connectionless service. Transmission Control Protocol (TCP) provides a reliable service to the applications. It is connection oriented service.

7 UDP and TCP Addressing Whenever a UDP socket is created, an available or a specified port number is assigned to it. The UDP socket is determined only by the destination port number. The source port number serves as a return address. The TCP server application has a “welcoming socket” for accepting connection requests. When a client socket is created, a port number is assigned to it and a connection is requested. TCP server socket is determined by the source IP address, source port number, destination IP address, destination port number.

8 The TCP Service Model Some assigned ports. Port Protocol Use 21 FTP
File transfer 23 Telnet Remote login 25 SMTP 69 TFTP Trivial File Transfer Protocol 79 Finger Lookup info about a user 80 HTTP World Wide Web 110 POP-3 Remote access 119 NNTP USENET news Some assigned ports.

9 UDP Segment Header The UDP header.

10 Real-Time Transport Protocol (RTP)
(a) The position of RTP in the protocol stack. (b) Packet nesting.

11 RTP Header Add Hdr 4B pad Sources # Coding Type The RTP header.

12 Transport Control Protocol (TCP)
TCP Connection Establishment TCP Connection Release TCP Connection Management Modeling TCP Transmission Policy TCP Flow and Congestion Control TCP Timer Management

13 The TCP Segment Header TCP Header.

14 The pseudoheader included in the TCP checksum.
The TCP Segment Header The pseudoheader included in the TCP checksum.

15 TCP Connection Establishment
6-31 (a) TCP connection establishment in the normal case. (b) Call collision.

16 TCP Connection Management Modeling
Client starts TCP Wait 30s CLOSED Send SYN TIME_WAIT SYN_SENT Receive FIN, Send ACK Receive SYN & ACK Send ACK FIN_WAIT_2 ESTABLISHED Send FIN Receive ACK FIN_WAIT_1

17 TCP Connection Management Modeling
Server application creates LISTEN socket Receive ACK CLOSED LAST_ACK LISTEN Send FIN Receive SYN Send SYN & ACK CLOSE_WAIT SYN_RCVD Receive ACK Receive FIN Send ACK ESTABLISHED

18 TCP Mechanisms TCP is a combination of Go Back N and Selective Repeat protocols. Receiver sends ack with the sequence number of the last received byte. It is cumulative, meaning that it acks all previously received segments. Sender keeps only the info about the first unack-ed segment, and retransmits the previous segment when it the timer expires or when it receives 3 identical ACKs. Receiver has buffer and may receive segments out of order.

19 TCP ACK Generation When a segment arrives in order and all previous data are acked, receiver waits for 500ms and sends ACK. When a segment arrives in order and there is one segment waiting for ACK, the ACK is sent immediately. When a segment arrives out of order, immediately send ACK with the next expected sequence number. Arrival of segment that fills the gap. Immediately send ACK.

20 Flow Control Processor of the receiver often handles multiple applications and tasks, so the speed of handling of a specific application is variable and limited. Receiver sends the receive window with each ACK, that specifies the empty space in the receiver buffer. Sender makes sure that the difference between the last byte sent and the last byte acked is smaller than the receive window, so that the receive buffer is not overflowed.

21 TCP Transmission Policy
Window management in TCP.

22 Congestion Control When a timeout period expires, sender retransmits a packet, and timer is triggered again but it is set to twice the previous value. When a new segment is generated, or when ACK is received, the timer is set to the estimated timeout period. Window size (w) is initially set to 0 and threshold size (t) is set to some large value. When w<t, w grows exponentially fast (incremented by one whenever it receives ACK)-slow-start phase. When w>t, w grows linearly (roughly by 1 once per RTT). When triple ACK occcurs, the t=w/2, w=t. If timeout happens, t=w/2, w=1.

23 Congestion Control Sender must ensure that:
Last byte sent – Last byte ACKed ≤ min{Congestion Window, Received Window}

24 TCP Congestion Control
An example of the Internet congestion algorithm.

25 TCP Timer Management (a) Probability density of ACK arrival times in the data link layer. (b) Probability density of ACK arrival times for TCP.

26 Timeout Calculation Timeout is Timeout=2RTT
where RTT is a round-trip time: RTT=αRTT+(1-α)M, α=7/8 Alternatively timeout is: Timeout = RTT+4xD where D is estimated variance: D=αD+(1-α)|RTT-M|

27 TCP Versions TCP Reno TCP Vegas is modification of Reno
TCP Tahoe is older version

28 Splitting a TCP connection into two connections.
Wireless TCP and UDP Splitting a TCP connection into two connections.


Download ppt "The Transport Layer."

Similar presentations


Ads by Google