10
6.1. Transport Control Protocol (TCP) • It is the most widely used transport protocol in the world. • Provides reliable end to end connection between two hosts who want to communicate over an unreliable network. • TCP transport data across the networks in blocks called TCP segments. • when an application first starts using TCP, the TCP module on the client’s computer and the TCP module on the server’s computer start communicating with each other. 6.1.1 Addressing: It uses ports to define which type of network application from the server, the client want to communicate to.

6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

Embed Size (px)

Citation preview

Page 1: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1. Transport Control Protocol (TCP)• It is the most widely used transport protocol in the world.

• Provides reliable end to end connection between two hosts who want to communicate

over an unreliable network.

• TCP transport data across the networks in blocks called TCP segments.

• when an application first starts using TCP, the TCP module on the client’s computer and

the TCP module on the server’s computer start communicating with each other.

6.1.1 Addressing: It uses ports to define which type of network application from the

server, the client want to communicate to.

Page 2: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1.2 TCP Segments• A TCP connection is a bidirectional octet stream, along which every byte of data sent

has a sequence number.

TCP PACKET HEADER

Field Name Bits

Source Port 16

Destination Port 16

Sequence Number 32

Acknowledgment Number 32

Window 16

URG Flag 1

ACK Flag 1

PSH Flag 1

RST Flag 1

SYN Flag 1

FIN Flag 1

Options 1

Data

Page 3: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1.3 TCP Service Primitives

6.1.3.1 TCP request primitives

• ACTIVE-OPEN – used to initiate a connection, and results in TCP sending a SYN message.

• ACTIVE-OPEN-DATA – same like above but can contain data as well.

• FULL-PASSIVE-OPEN – tell TCP to listen for connection requests from a specified remote sites.• UNSPECIFIED-PASSIVE-OPEN – tell TCP to listen for connection requests from any remote sites.

• CLOSE and ABORT – used to terminate a connection normally and abnormally.

• SEND – to transfer data over the connection.

• STATUS – to determine the connection status.

Page 4: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1.3 TCP Service Primitives

6.1.3.2 TCP confirm and indication primitives

• OPEN-SUCCESS confirm– tell an application whether an ACTIVE-OPEN request has

succeeded.

• OPEN-FAILURE confirm– tell an application whether an ACTIVE-OPEN request has failed.

• OPEN-ID primitive provides the connection identification.

• STATUS request is met with a STATUS-RESPONSE to obtain the connection status.

• TERMINATE confirm – tells the application that the connection has ended.

• CLOSING – tells an application that the remote TCP entity has issued a CLOSE request.

• DELIVER – to indicate the delivery of the data in across end.

• ERROR– to indicate if an error has occurred.

Page 5: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1.5 Connection States

6.1.5.1 Connection Establishment

IDLE

CONN

SYN (x)

SYN (y) , ACK (x+1)

Client Server

• A TCP connection is usually established by a TCP client, using a 3-way handshake.

SYN o

IDLE

CONN

SYN o

SYN(x+1) , ACK (y+1)

Page 6: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1.5 Connection States

6.1.5.2 Connection Management

• Each peer includes an acknowledgement and window information with each packet.

• Sending data causes window to be filled.

• Acknowledgements from receiver will free up buffers in the senders queue.

• If data is received out-of-order , the receiver will buffer it till the missing segment is

received.

6.1.5.3 Connection Termination

• Either the client or server may terminate data transmission at any time by sending a

packet where the FIN bit is set.

Page 7: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.1.5 Connection States

6.1.5.4 Crash Handling

• If the connection is lost because of crash on one peer, any data sent on the other end

will cause the half-open connection to be discovered.

• Hence, the receiving peer sends a packet with the RST flag and a sequence number

derived from the incoming packet to signify that the connection is no longer in existence.

6.1.6 Flow Control

• TCP is a variable size sliding window protocol with time-out and retransmits.

• Each packet what an acknowledgement contains window, which is the number of octets

of data that the receiver is willing to accept, beginning with the sequence number in the

acknowledgement.

Page 8: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.2 TCP Limitations• TCP data and control messages have the same message header structure. Hence, for

even small amounts of data in each message percentage overhead is very high.

• The TCP checksum mechanism is very weak, as interface layer has it already, due to

which transport layer could well be subtle enough to escape detection with its scheme.

• It is hard to obtain QoS control over a TCP connection as setting the URG bit in a TCP

header does not affect normal flow control.

Page 9: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

6.2 User Datagram Protocol• It does not maintain an end to end connection with the remote UDP module and hence

is called connection less data transmission.

• It doesn’t provide guaranteed data delivery.

• It provides multiplexing of information between applications based on port number,

and also implements a checksum scheme to check the integrity of the data.

• Example network applications: NFS , SNMP and so forth.

Checksum: It is the method to validate the integrity of UDP data packets during the

transmission.

Flow Control: In UDP if more UDP packets arrive at the receiving end after the buffer is

overrun then ultimately it discards all those packets.

Page 10: 6.1. Transport Control Protocol (TCP) It is the most widely used transport protocol in the world. Provides reliable end to end connection between two hosts

Please Email the following project topics on Sunday

• Introduction and Objectives

• History and Current Technology

Email: [email protected]

Failure to do so, would be taken as offensive act and will severely affect your Class Performance.