Module 4 - New
Module 4 - New
Presentation Material
Department of Computer Science & Engineering
Semester
Course Code: 19CS3602 VI
:
Course Title: Computer Networks Year: 3rd
Faculty Name:
8
• Acknowledgement Number –
A 32-bit field that holds the acknowledgement number, i.e, the byte
number that the receiver expects to receive next. It is an
acknowledgement for the previous bytes being received
successfully.
• Header Length (HLEN) –
This is a 4-bit field that indicates the length of the TCP header by a
number of 4-byte words in the header
9
• Control flags –
These are 6 1-bit control bits that control connection establishment,
connection termination, connection abortion, flow control, mode of transfer
etc. Their function is:
• URG: Urgent pointer is valid
• ACK: Acknowledgement number is valid( used in case of cumulative acknowledgement)
• PSH: Request for push
• RST: Reset the connection
• SYN: Synchronize sequence numbers
• FIN: Terminate the connection
• Window size –
This field tells the window size of the sending TCP in bytes.
10
• Checksum –
This field holds the checksum for error control. It is mandatory in
TCP as opposed to UDP
• Urgent pointer –
This field (valid only if the URG control flag is set) is used to point to
data that is urgently required that needs to reach the receiving
process at the earliest. The value of this field is added to the
sequence number to get the byte number of the last urgent byte.
11
TCP Connection Establishment
• Connections are established in TCP by means of the three-way
handshake
• To establish a connection, one side, say, the server, passively waits
for an incoming connection by executing the LISTEN and ACCEPT
primitives
• The other side, say, the client, executes a CONNECT primitive,
specifying the IP address and port to which it wants to connect
• The CONNECT primitive sends a TCP segment with the SYN bit on
and ACK bit off and waits for a response
12
13
14
TCP Connection Release
• One way to avoid data loss is to use symmetric release, in which each
direction is released independently of the other one.
• One can envision a protocol in which host 1 says: I am done. Are you
done too? If host 2 responds: I am done too. Goodbye, the
connection can be safely released.
• Unfortunately, this protocol does not always work.
22
23
24
25
26
TCP Congestion Control
• When the load offered to any networks is more than it can handle,
congestion builds up. The Internet is no exception.
• Algorithms have been developed over the past decade to deal with
congestion.
• Although the network layer also tries to manage congestion, most of
the heavy lifting is done by TCP because the real solution to
congestion is to slow down the data rate.