5/6/2015© 2010 Raymond P. Jefferis IIILect Transport Layer
5/6/2015© 2010 Raymond P. Jefferis IIILect Position in OSI Model
5/6/2015© 2010 Raymond P. Jefferis IIILect Position in TCP/IP Model
5/6/2015© 2010 Raymond P. Jefferis IIILect Functions Provides data transfer services to the Application layer Uses the services of the Network layer Adds error and congestion control Sequences packets and insures complete delivery Establishes and releases connections Handles flow control and congestion
5/6/2015© 2010 Raymond P. Jefferis IIILect Error Control Network layer can be unreliable Packets can arrive out of sequence –arrange in order –detect and remove duplicates Data link can crash –reconnect if necessary –complete unfinished transmission
5/6/2015© 2010 Raymond P. Jefferis IIILect Packet (octet) Ordering Packets (octets in TCP) are given sequence numbers Credit scheme for packet acknowledgment –octets are acknowledged in blocks –permission granted for specified number of additional octets
5/6/2015© 2010 Raymond P. Jefferis IIILect Congestion Control Permission to transmit specified number of octets is explicitly given (credits) –partly determined by available buffer space –partly determined by network delays Receiver can issue credits for unavailable space, assuming it will become available in time to avoid overflow Window size is variable, depends on conditions at the time
5/6/2015© 2010 Raymond P. Jefferis IIILect TCP Flow Control Receiver grants window of 2000 octets Transmitter sends 1000 octets Receiver ACKs 1000 Window is then 1000 etc.
5/6/2015© 2010 Raymond P. Jefferis IIILect TCP Header
5/6/2015© 2010 Raymond P. Jefferis IIILect Re: Flow Control Note that header includes ACK number Header also includes window size Thus ACK can update remaining window
5/6/2015© 2010 Raymond P. Jefferis IIILect TCP Header Fields SRC/DST port - local/remote user Sequence number - for each octet Acknowledgment number - expected octet Header Length - offset to data Control flags –urgent, attn ACK field, push, reset connection, synch sequence numbers, end of data
5/6/2015© 2010 Raymond P. Jefferis IIILect TCP Header Fields (cont’d) Window - number of octets granted (credit) Checksum - Mod 16 sum of segment Urgent pointer - last octet in urgent data Options -
5/6/2015© 2010 Raymond P. Jefferis IIILect Types of Service Connection-oriented manages establishment of a connection, transfer of data over the connection, termination of the connection Connectionless datagrams sent and received
5/6/2015© 2010 Raymond P. Jefferis IIILect Connection Header Transmitter sends –SYN = 1 –Sequence Number = x Receiver sends –SYN = 1 –ACK = 1 –Sequence Number = y –ACK Number = x+1 (next expected octet)
5/6/2015© 2010 Raymond P. Jefferis IIILect Connection Header (cont’d) Transmitter –SYN = 1 –ACK Number = y + 1 (next ACK expected)
5/6/2015© 2010 Raymond P. Jefferis IIILect Data Segments 32-bit sequence number for each segment Sequence number applies to first octet in the data field Flow control credits are in octets PUSH (+URG flag if urgent) flag clears transmit buffer, signifying end of transmission block
5/6/2015© 2010 Raymond P. Jefferis IIILect Disconnecting CLOSE function in TCP Transport sets FIN flag on last segment of data to be sent
5/6/2015© 2010 Raymond P. Jefferis IIILect Connection Petri Diagram
5/6/2015© 2010 Raymond P. Jefferis IIILect Connection Transitions t1- passive open t2- active open; send SYN t3- send data; send SYN t4- close; send FIN t5- recv SIN; send SYN, ACK; recv RST t6- recv SYN, ACK; send ACK t7- recv FIN; send ACK; recv ACK t8- recv ACK t9- recv FIN; send ACK t10- close; send FIN
5/6/2015© 2010 Raymond P. Jefferis IIILect Transport Primitives Services available to Application Layer Connection-oriented Reliable end-to-end delivery User tasks call library procedures Support connection, of transport data units, and disconnection
5/6/2015© 2010 Raymond P. Jefferis IIILect Basic Transport Primitives
5/6/2015© 2010 Raymond P. Jefferis IIILect TCP Request Primitives
5/6/2015© 2010 Raymond P. Jefferis IIILect TCP Response Primitives