Unit 4-2
Unit 4-2
o While Data Link Layer requires the MAC address (48 bits address contained inside
the Network Interface Card of every host machine) of source-destination hosts to
correctly deliver a frame and the Network layer requires the IP address for
appropriate routing of packets, in a similar way Transport Layer requires a Port
number to correctly deliver the segments of data to the correct process amongst
the multiple processes running on a particular host.
o A port number is a 16-bit address used to identify any client-server program
uniquely.
o The two main Transport layer protocols are:
Services
o The socket provides bidirectional FIFO Communication facility over the network.
o A socket connecting to the network is created at each end of the communication.
o Each socket has a specific address. This address is composed of an IP address and
a port number.
o Socket are generally employed in client server applications.
o The server creates a socket, attaches it to a network port addresses then waits for
the client to contact it.
o The client creates a socket and then attempts to connect to the server socket.
o When the connection is established, transfer of data takes place.
Addressing
Connection Establishment/Release
o The transport layer creates and releases the connection across the network.
o This includes a naming mechanism so that a process on one machine can indicate
with whom it wishes to communicate.
ZCoER, Pune
o The transport layer enables us to establish and delete connections across the
network to multiplex several message streams onto one communication channel.
Flow Control
Multiplexing
o The transport layer establishes a separate network connection for each transport
connection required by the session layer.
o To improve throughput, the transport layer establishes multiple network
connections.
o When the issue of throughput is not important, it multiplexes several transport
connections onto the same network connection, thus reducing the cost of
establishing and maintaining the network connections.
Congestion Control
What is congestion?
o A state occurring in network layer when the message traffic is so heavy that it
slows down network response time.
Effects of Congestion
o Congestion Control is a mechanism that controls the entry of data packets into
the network, enabling a better use of a shared network infrastructure and
avoiding congestive collapse.
o Congestive-Avoidance Algorithms (CAA) are implemented at the TCP layer as the
mechanism to avoid congestive collapse in a network.
o TCP
o UDP
o Divides the data into a several packets, provides numbering to these packets.
o Transmits these packets to the destination.
o At Receiver side :
o Reassemble the received packets and transmits them to the application layer.
SYN
o Client picks a random sequence number x and sends a SYN packet, which may
also include additional TCP flags and options.
SYN ACK
o Server increments x by one, picks own random sequence number y, appends its
own set of flags and options, and dispatches the response.
ACK
ZCoER, Pune
Sequence number contains the sequence number of data bytes in a particular session
Acknowledgment When the ACK flag is set, then this contains the next sequence
number number of the data byte and works as an acknowledgment for the
previous data received.
ZCoER, Pune
ACK If the ACK is set to 0, then it means that the data packet does not
contain an acknowledgment.
Advantages of TCP
Disadvantage of TCP
o It increases a large amount of overhead as each segment gets its own TCP
header, so fragmentation by the router increases the overhead.
ZCoER, Pune
Applications of UDP
o Used for simple request-response communication when the size of data is less
and hence there is lesser concern about flow and error control.
o It is a suitable protocol for multicasting as UDP supports packet switching.
o UDP is used for some routing update protocols like RIP(Routing Information
Protocol).
o Normally used for real-time applications which can not tolerate uneven delays
between sections of a received message.
o Following implementations uses UDP as a transport layer protocol:
o NTP (Network Time Protocol)
o DNS (Domain Name Service)
o BOOTP, DHCP.
o NNP (Network News Protocol)
o Quote of the day protocol
o TFTP, RTSP, RIP.
o The application layer can do some of the tasks through UDP-
o Trace Route
o Record Route
o Timestamp
o UDP takes a datagram from Network Layer, attaches its header, and sends it to
the user. So, it works fast.
o Actually, UDP is a null protocol if you remove the checksum field.
o Reduce the requirement of computer resources.
o When using the Multicast or Broadcast to transfer.
o The transmission of Real-time packets, mainly in multimedia applications.
o It preserves the message boundaries, and at the same time, detects lost data,
duplicate data, and out-of-order data.
o A protocol is designed to handle real-time traffic (like audio and video) of the
Internet, is known as Real Time Transport Protocol (RTP).
o It does not have any delivery mechanism like multicasting or port numbers.
Applications of RTP
Quality-of-Service (QoS)
ZCoER, Pune
o Video and audio conferencing require bounded delay and loss rate.
o Video and audio streaming requires bounded packet loss rate, it may not be so
sensitive to delay.
Differentiated Service
o It provides reduced state services i.e. maintaining state only for larger granular
flows rather than end-to-end flows tries to achieve the best of both worlds.
o Simpler signaling:
Many applications and users may only want to specify a more qualitative notion
of service.
o TCP should not care whether IP is running over which media i.e. fiber or radio.
o The proper approach to dealing with lost packets is to send them again and as
quickly as possible.
o When a packet is lost on a wired network, the sender should slow down.
o When one is lost on a wireless network, the sender should try harder.
o When the sender does not know what the network is, it is difficult to make the
correct decision.
o In TCP-1, connection goes from the sender to the base station. i.e. first stage.
o Mobile host (Receiver) gets data from base station antenna in TCP-2.
o The base station simply copies packets between the connections in both
directions.
o This scheme solve the time out problem. Both connection, sender to base station
and base station to receiver are homogeneous.
o The Timeouts on the first connection can slow the sender down, whereas timeout
on the second one can speed it up. Other parameter can also be tuned separately
for two connections.
o The disadvantage of this scheme is, to break the TCP into two segments.
o UDP does not suffer from the same problem as TCP, wireless communication also
introduces difficulties for it.
ZCoER, Pune
o The main trouble is that programs use UDP expecting it to be highly reliable.
Wireless communication also affects areas other than just performance.