Upload
aibad-ahmed
View
1.662
Download
2
Embed Size (px)
DESCRIPTION
introduction to TCP/IP
Citation preview
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
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
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
Service provided by TCPConnection-Oriented servicePoint-to-pointComplete ReliabilityFull-duplex communicationStream interfaceReliable Connection StartupGraceful Connection Shutdown
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
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
End-to-End Service and Datagrams
Achieving ReliabilityThe major problems in the reliable delivery
are:
Unreliable delivery by the underlying communication system
System reboot
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.
Packet Loss and Retransmission
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.
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.
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
Comparison of Retransmission Times
Buffers, Flow Control & Windows
Three-Way Handshake to Close a Connection
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
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
TCP Segment Format