0% found this document useful (0 votes)
60 views

End To End Issues:: TH TH

TCP is a connection-oriented and reliable protocol that establishes connections between a source and destination using a three-way handshake. It provides mechanisms for reordering packets and flow control. TCP connections are established through a three-way handshake and terminated through a four-way handshake using SYN, ACK, and FIN flags. The protocol ensures reliable in-order delivery of segments through sequence numbers, acknowledgments, and retransmissions.

Uploaded by

Mathew Manoj
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views

End To End Issues:: TH TH

TCP is a connection-oriented and reliable protocol that establishes connections between a source and destination using a three-way handshake. It provides mechanisms for reordering packets and flow control. TCP connections are established through a three-way handshake and terminated through a four-way handshake using SYN, ACK, and FIN flags. The protocol ensures reliable in-order delivery of segments through sequence numbers, acknowledgments, and retransmissions.

Uploaded by

Mathew Manoj
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 9

TCP

TCP stands for Transmission Control Protocol. It is connection oriented and


reliable protocol. It has a re-order and flow control mechanism.

END TO END ISSUES:


It takes place between source and destination. It involves 5 major steps. They are

1. Connection establishment

2. RTT

3. Out of order

4. Resource availability

5. Channel capacity

CONNECTION ESTABLISHMENT:
Before transmitting the data, connection should be established between the sender
and the receiver.

RTT: (ROUND TRIP TIME)


RTT is used to find out the time taken for the source to reach the destination and
also the destination to reach the source. To reach each station that belongs to the same
network the RTT will be same.

OUT OF ORDER:
Out of order may be due to delay and missing of data during transmission.

DELAY:

The delay may be due to failure in the link or traffic has occurred. For ex, there
are 5 packets to be transmitted and the first 3 packets have reached safely. On the arrival of
the 4th packet, if there is a failure in the link then they take a new path and reach the
destination. And on the arrival of the 5th packet the link is normal, and then they take the
usual path. This cause a delay if packet 4. Destination has 1,2,3,5 and 4 arrives in delay. This
leads to out of order.

MISSING:

When the buffer is full and the packets keep in arriving, then out of order occurs.
TTL identifies how long the packet can be in the network. The destination will be having
MSL (Maximum Segment Life time). If the packet arrives within the time, then the datas are
in order. When the MSL expires then it is concluded that the data is missing and the sends a
NACK only if it uses selective ARQ.

RESOURCE AVAILABILITY:
Buffer size of the receiver should be known by the sender because sender
should transmit the datas accordingly so that to avoid missing of the packets to take place. If
the buffer size is exceeded, the packets will be discarded.

CHANNEL CAPACITY:
The sender should identify each and every link to know the channel capacity
and choose the minimum channel capacity to transmit the data accordingly.

SEGMENT FORMAT:
The transmission takes place from one process to another process. Both the
sender and the receiver has buffer.

SENDER RECEIVER

APPLICATION APPLICATION
PROCESS PROCESS

WRITES BYTES READS BYTES

TCP TCP

RECEIVER BUFFER
SENDER BUFFER

TRANSMIT SEGMENT

SEGMENT SEGMENT SEGMENT SEGMENT


TCP if the sender side machine will writes in the machine and receiver side
TCP will help in reading the packets in the buffer.

PACKET HEADER FRAME FORMAT:

SOURCE PORT DESTINATION PORT

SEQUENCE NUMBER

ACKNOWLEDGEMENT NUMBER

HLEN RESERVED FLAG ADVERTISED WINDOW SIZE

(0)

CHECK SUM URGENT POINTER

OPTIONAL

DATA

PORT NUMBER:
The port id should be known to transmit the data.

<Source port, source IP address, destination port, destination IP address>

SEQUENCE NUMBER:
It checks whether the packets are in order. It is sent by the sender.

ACKNOWLEGDEMENT NUMBER:
The next expected packet number will be sent by the receiver.

HLEN:
Header length is specified.

RESERVED:
6 bits sre reserved for future.
FLAG:
There are 6 bits of flags. They are

•SYN- synchronization:

Sets the value to be 1 when the connection is established.

• FIN- finish:

Sets the value to be 1 when the connection is terminated.

•RST- reset:

Suppose the receiver is not receiving the expected packet, then it resets the flag
bit.

• PSH- push:

It pushes the data into the packet.

• URG- urgent:

If the URG pointer is 1, then it means that the packet is an urgent packet.
When that packet is kept at the end of the sender buffer and when the sender sees
the URG packet, it transmits that packet first.

•ACK- acknowledgement:

The receiver always sets the ACK number.

ADVERTISING WINDOW SIZE:


The sender and the receiver will advertise the window size according to the
buffer size.

OPTIONAL:
Optional information is additional information about the packet.

TCP CONNECTION (ESTABLISHMENT AND TERMINATION):

TCP CONNECTION (ESTABLISHMENT):


To transmit the data between the sender and the receiver, first the TCP connection
is established because TCP is reliable. The connection is established by 3-way handshake.
SYN bit is used to establish the connection.

ACTIVE OPEN:
If the sender is initiating the establishment if the connection, then it is known as
active open.

PASSIVE OPEN:

If the receiver is initiating the establishment of a connection, then it is known as


passive open.

ACTIVE OPEN PASSIVE OPEN

(CLIENT) (SERVER)

SYN: seq x

Seq: y, ACK: x+1

ACK: y+1

It is not necessary that the sequence number should start with 0 or 1. Client sends the SYN bit
with the sequence number as x to the server. The server in turns sends an ACK bit as x+1 and
a sequence number y, when the client receives it they send their ACK bit as y+1.

TCP CONNECTION (TERMINATION):


The termination connection is given by 4-way hand shake.

ACTIVE OPEN PASSIVE OPEN

(CLIENT) (SERVER)

FIN: Seq: x

ACK:x+1, Seq y
FIN: Seq y+1, ACK: x+1

Seq:x+1, ACK:y+2

The termination is established by FIN bit. The client sends the FIN bit with the sequence
number as x and the server replies it by sending the ACK bit as x+1. After sending the
SERVER sending the ACK bit, it waits for some time to check whether there is any delay od
data or any link failure.

TIME WAITED= 2* MSL

MSL is the Maximum Segment Time which is 120 seconds.

STATE TRANSITION DIAGRAM:


The node represents the state, link represents the transmission of data taking place and the
label represents the event or action taking place.

---------------- > server/receiver

Client/ sender
The receiver establishes a connection, when its application or the process needs the data
urgently from the sender. The application need is listened in the listen state for both the
sender and the receiver.

There are 3 terminations constraints:

1) The sender is closing first

2) The receiver is terminating first

3) Both the sender and the receiver is closing at the same time.

Sender terminating first:

FIN WAIT 1 FIN WAIT 2 TIME WAIT

Receiver terminating first:

CLOSE WAIT LAST ACK CLOSED


Both terminating at the same time:

FIN WAIT 1 CLOSING TIME WAIT CLOSED

Thus this state diagram explains the TCP connection establishment and termination.

2- marks:
1) Mention the steps involved during the transmission of data.

The five steps involved during the transmission of data is:

a) Connection establishment

b) RTT

c) Out of order

d) Resource availability

e) Channel capacity

2) Define MSL.

The destination will be having a maximum life time known as MSL (Maximum
Segment Life). If the packets arrive within the time, then the data is in order. When
the MSL expires then it is concluded that the data is missing respectively.

3) Explain resource availability.

The sender should know the buffer size of the receiver before sending the data,
so as to avoid missing of the packet. If the buffer size is exceeded, the packet will be
discarded.

4) Mention the different types of flag bit.

• SYN

• FIN

• RST

• PSH

• URG

• ACK
5) Define active open and passive open.

ACTIVE OPEN:

If the sender is initiating the establishment if the connection, then it is known as


active open.

PASSIVE OPEN:

If the receiver is initiating the establishment of a connection, then it is known as


passive open.

6) What are the 3 termination constraints?

1) The sender is closing first.

2) The receiver is terminating first.

3) Both the sender and the receiver is closing at the same time.

8-marks:
1) Explain in detail TCP connection establishment and termination.

16-mark:
1) Explain TCP in detail.

You might also like