20
TCP/IP

TCP/IP

Embed Size (px)

DESCRIPTION

introduction to TCP/IP

Citation preview

Page 1: TCP/IP

TCP/IP

Page 2: TCP/IP

IntroductionTCP: Major Transport Protocol in the

TCP/IP suite

Uses unreliable datagram service offered by IP when sending data to another computer

Provides reliable data delivery service to applications

Page 3: TCP/IP

The Need for Reliable TransportReliability is fundamental in a computer

system

Software in the internet must provide the same level of reliability as a computer system

Software must guarantee prompt and reliable communication without any loss, duplication, and change in the order

Page 4: TCP/IP

Transmission Control ProtocolReliability is the responsibility of the

Transport Layer

In TCP/IP, TCP provides reliable transport service

Most internet applications use TCP as no other protocol has proved to work better

Page 5: TCP/IP

Service provided by TCPConnection-Oriented servicePoint-to-pointComplete ReliabilityFull-duplex communicationStream interfaceReliable Connection StartupGraceful Connection Shutdown

Page 6: TCP/IP

End-to-End Service and DatagramsApplications can request a connection

TCP connections are called Virtual Connections Created by Software only Internet does not provide software or hardware

support for the connections TCP software modules on two computers create

an illusion of a connection

Page 7: TCP/IP

End-to-End Service and Datagrams

TCP uses IP to carry messages

TCP message encapsulated in IP datagram and sent to the destination

On the destination host, IP passes the contents to TCP

Page 8: TCP/IP

End-to-End Service and Datagrams

Page 9: TCP/IP

Achieving ReliabilityThe major problems in the reliable delivery

are:

Unreliable delivery by the underlying communication system

System reboot

Page 10: TCP/IP

Packet Loss and RetransmissionHow does TCP achieve Reliability?

RetransmissionAn Acknowledgement is used to verify that data

has arrived successfully.

If Acknowledgement does not arrive, the previous data is retransmitted.

Page 11: TCP/IP

Packet Loss and Retransmission

Page 12: TCP/IP

How Long Should TCP Wait Before Retransmitting?Time for acknowledgement to arrive depends

onDistance to destinationCurrent traffic conditions

Multiple connections can be opened simultaneously.

Traffic conditions change rapidly.

Page 13: TCP/IP

Adaptive RetransmissionSet a timer. It sounds so easy, but …What time

interval?Too long?

– You are spending time waiting for something that is just not going to happen.

Too short?– You will resend needlessly.

Page 14: TCP/IP

Adaptive RetransmissionKeep estimate of round trip time on each

connection

Use current estimate to set transmission timer

Know as Adaptive Retransmission

Key to TCP’s success

Page 15: TCP/IP

Comparison of Retransmission Times

Page 16: TCP/IP

Buffers, Flow Control & Windows

Page 17: TCP/IP

Three-Way Handshake to Close a Connection

Page 18: TCP/IP

Three-way Handshake to Begin a ConnectionThis will not mean much until you look at the

packets, butSYN

– Randomly chosen sequence number, S1:0SYN + ACK

– S2:S1+1ACK

– S1+1:S2+1

Page 19: TCP/IP

Congestion ControlThe goal is to avoid adding retransmissions to

an already congested network

Reduce window size quickly in response to lost messagesAssumption: loss is due to congestion

Resume carefully. Otherwise the network will swing wildly between congestion and under utilization

Page 20: TCP/IP

TCP Segment Format