Chapter 3
Chapter 3
and
Session layer
By - Sneha Nandanwar
TRANSPORT LAYER
⚫ The transport layer is the fourth layer in the open system
interconnection (OSI) model, and is responsible for end-to-end
communication over a network.
⚫ It provides logical communication between application
processes running on different hosts within a layered architecture
of protocols and other network components.
⚫ Transport layer collects message segments from applications,
and transmits them into the network
⚫ The transport layer is also responsible for the management of
error correction, providing quality and reliability to the end
user.
⚫ This layer enables the host to send and receive error corrected data,
packets or messages over a network and is the network component
that allows multiplexing.
SERVICES OFFERED BY
TRANSPORT LAYER
⚫ Length - Length field specifies the entire length of UDP packet (including
header). It is 16-bits field and minimum value is 8-byte, i.e. the size of UDP
header itself.
⚫ Checksum - This field stores the checksum value generated by the sender
before sending. IPv4 has this field as optional so when checksum field does not
contain any value it is made 0 and all its bits are set to zero.
UDP APPLICATIONS
Here are few applications where UDP is used to
transmit data:
⚫ Domain Name Services
⚫ Simple Network Management Protocol
⚫ Trivial File Transfer Protocol
⚫ Routing Information Protocol
⚫ Kerberos
TRANSMISSION CONTROL
PROTOCOL
⚫ TCP (Transmission Control Protocol) is a standard that defines how to
⚫ TCP works with the Internet Protocol (IP), which defines how
⚫ Together, TCP and IP are the basic rules defining the Internet.
⚫ TCP ensures that the data reaches intended destination in the same order it was
sent.
⚫ TCP is connection oriented. TCP requires that connection between two remote
points be established before sending actual data.
⚫ TCP provides full duplex server, i.e. it can perform roles of both receiver and
sender.
TCP SEGMENT HEADER
TCP SEGMENT HEADER
⚫ Source Port Address –
16 bit field that holds the port address of the application that is
sending the data segment.
⚫ Destination Port Address –
16 bit field that holds the port address of the application in the host
that is receiving the data segment.
⚫ Sequence Number –
32 bit field that holds the sequence number, i.e, the byte number of
the first byte that is sent in that particular segment. It is used to
reassemble the message at the receiving end if the segments are
received out of order.
⚫ Acknowledgement Number –
32 bit field that holds the acknowledgement number, i.e, the byte
number that the receiver expects to receive next. It is an
acknowledgment for the previous bytes being received successfully.
TCP SEGMENT HEADER
⚫ Header Length (HLEN) –
This is a 4 bit field that indicates the length of the TCP header by
number of 4-byte words in the header, i.e, if the header is of 20
bytes(min length of TCP header), then this field will hold 5
(because 5 x 4 = 20) and the maximum length: 60 bytes, then it’ll
hold the value 15(because 15 x 4 = 60). Hence, the value of this
field is always between 5 and 15.
⚫ Window size –
This field tells the window size of the sending TCP in bytes.
⚫ Checksum –
This field holds the checksum for error control. It is mandatory in
TCP as opposed to UDP.
TCP SEGMENT HEADER
⚫ 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
⚫ 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.
TCP THREE WAY
HANDSHAKING
TCP THREE WAY
HANDSHAKING
TCP DATA TRANSFER
TCP CONNECTION TERMINATION
TCP FLOW CONTROL
DRAWBACKS IN TCP FLOW
CONTROL
SILLY WINDOW SYNDROME
⚫ Silly window syndrome is a problem in computer networking
caused by poorly-implemented TCP flow control.
⚫ If a server with this problem is unable to process all incoming
data, it requests that its clients reduce the amount of data they
send at a time (the “window” setting on a TCP packet).
⚫ If the server continues to be unable to process all incoming
data, the window becomes smaller and smaller, sometimes to
the point that the data transmitted is smaller than the packet
header, making data transmission extremely inefficient.
⚫ The name of this problem is due to the window size shrinking
to a “silly” value.
SILLY WINDOW SYNDROME
⚫ CHECKSUM-
⚫ Session Creation(Authentication-Authorization)
⚫ Session Restoration
⚫ Checkpointing
⚫ Session Creation
1. Session will be initiated as packet enters into the layer.
2. Maintaining the session for further coordination.
3. Authentication-Authorization
4. The establishment of session between machines is an important
service provided by session layer. This session is responsible
for creating a dialog between connected machines. The Session
Layer provides mechanism for opening, closing and managing
a session between end-user application processes
SESSION LAYER
⚫ Session Restoration
1. Any packet is missing or interruption has occurred.
2. In case of any inactive or waiting session.
3. Synchronization
SESSION LAYER
⚫ Checkpointing