0% found this document useful (0 votes)
61 views23 pages

Computer networksUNIT 4

computer networksUNIT 4 PPT

Uploaded by

chinkyreddy1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views23 pages

Computer networksUNIT 4

computer networksUNIT 4 PPT

Uploaded by

chinkyreddy1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

UNIT -IV

TRANSPORT LAYER
• The Transport Services:
• a) Services Provided to the Upper Layers
• b) Transport Service Primitives
• c) Berkeley Socket
Services Provided to the Upper Layers
Transport Service Primitives
Berkeley Socket
• Socket:Create a new connection
• BIND:Assign local address to new socket
ELEMENTS OF TRANSPORT PROTOCOLS
• 1)ADDRESSING
• 2)Connection Establishment
• 3)Connection Release
1)ADDRESSING
• When an application (e.g., a user) process wishes to set up a
connection to a remote application process
• TSAP (Transport Service Access Point) to mean a specific endpoint in
the transport layer.
2)Connection Establishment

• Establishing a connection sounds easy, but it is actually surprisingly


tricky, send a CONNECTION REQUEST segment to the destination and
wait for a CONNECTION ACCEPTED reply.
• The problem occurs when the network can lose, delay, corrupt, and
duplicate packets.
1)NORMAL OPERATION
2) Delayed duplicate control segments
3)Duplicate CONNECTION REQUEST and
duplicate ACK
3)Connection Release

• Releasing a connection is easier than establishing one.


• there are two styles of terminating a connection: asymmetric release
and symmetric release
• Asymmetric release is the way the telephone system works: when
one party hangs up, the connection is broken.
• Symmetric release treats the connection as two separate
unidirectional connections and requires each one to be released
separately.
a)Normal Release case
b)ACK segment is lost
c) second DR being lost
TCP HEADER
• Header Length (HLEN): It specifies the size of the TCP header in 32-bit
words. The minimum size of the header is 5 words, and the maximum
size of the header is 15 words. Therefore, the maximum size of the
TCP header is 60 bytes, and the minimum size of the TCP header is 20
bytes.
• o Reserved: It is a six-bit field which is reserved for future use.
• o Control bits: Each bit of a control field functions individually and
independently. A control bit defines the use of a segment or serves as
a validity check for other fields
There are total six types of flags in control
field:
• o URG: The URG field indicates that the data in a segment is urgent.
• o ACK: When ACK field is set, then it validates the acknowledgement number.
• o PSH: The PSH field is used to inform the sender that higher throughput is
needed so if possible, data must be pushed with higher throughput.
• o RST: The reset bit is used to reset the TCP connection when there is any
confusion occurs in the sequence numbers.
• o SYN: The SYN field is used to synchronize the sequence numbers in three types
of segments: connection request, connection confirmation ( with the ACK bit set ),
and confirmation acknowledgement.
• o FIN: The FIN field is used to inform the receiving TCP module that the sender
has finished sending data. It is used in connection termination in three types of
segments: termination request, termination confirmation, and acknowledgement
of termination confirmation.
• Window Size: The window is a 16-bit field that defines the size of the
window.
• o Checksum: The checksum is a 16-bit field used in error detection.
• o Urgent pointer: If URG flag is set to 1, then this 16-bit field is an
offset from the sequence number indicating that it is a last urgent
data byte.
• o Options and padding: It defines the optional fields that convey the
additional information to the receiver
TCP Operation
UDP
• The User Datagram Protocol (UDP) provides an alternative,
connectionless, transport service to TCP for applications where
reliable stream service is not needed. UDP datagrams can be
droppped, duplicated or delivered out of order, exactly as for IP.
• UDP segments (also commonly called datagrams, ) have a minimal
(8-byte) header. Data transfer with UDP has no initial connection
overhead, and (obviously) no waiting for ACK segments as in TCP.
Some typical UDP-based services include DNS, streaming multimedia
and "Voice over IP" applications.
• Source port address: It defines the address of the application process
that has delivered a message. The source port address is of 16 bits
address.
• o Destination port address: It defines the address of the application
process that will receive the message. The destination port address is
of a 16-bit address.
• o Total length: It defines the total length of the user datagram in
bytes. It is a 16-bit field.
• o Checksum: The checksum is a 16-bit field which is used in error
detection.

You might also like