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

Unit 4-2

Computer networks - unit 4

Uploaded by

nandini.4715
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Unit 4-2

Computer networks - unit 4

Uploaded by

nandini.4715
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

ZCoER, Pune

Process to Process Delivery

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:

Transmission Control Protocol


It provides reliable communication between two hosts.
User Datagram Protocol
It provides unreliable communication between two hosts.

Services

o Connection-oriented communication: It is normally easier for an application to


interpret a connection as a data stream rather than having to deal with the
underlying connection-less models, such as the datagram model of the User
Datagram Protocol (UDP) and of the Internet Protocol (IP).
o Same order delivery: The network layer doesn't generally guarantee that packets
of data will arrive in the same order that they were sent, but often this is a
desirable feature. This is usually done through the use of segment numbering,
with the receiver passing them to the application in order. This can cause head-
of-line blocking.
o Reliability: Packets may be lost during transport due to network congestion and
errors. By means of an error detection code, such as a checksum, the transport
protocol may check that the data is not corrupted, and verify correct receipt by
ZCoER, Pune

sending an ACK or NACK message to the sender. Automatic repeat request


schemes may be used to retransmit lost or corrupted data.
o Flow control: The rate of data transmission between two nodes must sometimes
be managed to prevent a fast sender from transmitting more data than can be
supported by the receiving data buffer, causing a buffer overrun. This can also be
used to improve efficiency by reducing buffer underrun.
o Congestion avoidance: Congestion control can control traffic entry into a
telecommunications network, so as to avoid congestive collapse by attempting to
avoid oversubscription of any of the processing or link capabilities of the
intermediate nodes and networks and taking resource reducing steps, such as
reducing the rate of sending packets. For example, automatic repeat requests
may keep the network in a congested state; this situation can be avoided by
adding congestion avoidance to the flow control, including slow start. This keeps
the bandwidth consumption at a low level in the beginning of the transmission,
or after packet retransmission.
o Multiplexing: Ports can provide multiple endpoints on a single node. For
example, the name on a postal address is a kind of multiplexing and distinguishes
between different recipients of the same location. Computer applications will
each listen for information on their own ports, which enables the use of more
than one network service at the same time. It is part of the transport layer in the
TCP/IP model, but of the session layer in the OSI model.

Socket in Computer Network

o A socket is one endpoint of a two way communication link between two


programs running on the network.
o The socket mechanism provides a means of inter-process communication (IPC)
by establishing named contact points between which the communication take
place.
o Like ‘Pipe’ is used to create pipes and sockets is created using ‘socket’ system
call.
ZCoER, Pune

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.

Elements of Transport Layer Protocol

Addressing

o Transport Layer deals with addressing or labelling a frame.


o It also differentiates between a connection and a transaction.
o Connection identifiers are ports or sockets that label each frame, so the receiving
device knows which process it has been sent from.
o This helps in keeping track of multiple-message conversations.
o Ports or sockets address multiple conservations in the same location.
o Transport Service Access Point (TSAP) is used.
System Ports (0 – 1023) … User Ports ( 1024 – 49151)
Private/Dynamic Ports (49152 – 65535)

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

o The underlying rule of flow control is to maintain a synergy between a fast


process and a slow process.
o The transport layer enables a fast process to keep pace with a slow one.
o Acknowledgements are sent back to manage end-to-end flow control.
o Go back N algorithms are used to request retransmission of packets starting with
packet number N.
o Selective Repeat is used to request specific packets to be retransmitted.

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 As delay increases, performance decreases.


ZCoER, Pune

o If delay increases, retransmission occurs, making situation worse.

Congestion control algorithms

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.

Types of Congestion control algorithms

o Leaky bucket algorithm


o Token bucket algorithm

Transport Layer Protocols

o TCP
o UDP

Transmission Control Protocol (TCP)

o TCP provides acknowledgement of the received packets.


o Resends the lost packets.
o It is used by application protocols like HTTP and FTP.
o It is a connection-oriented protocol that means it establishes the connection
prior to the communication that occurs between the computing devices in a
network.
o The connection will remain established until the communication is not completed
between the sender and the receiver.
o This protocol is used with an IP protocol, so together, they are referred to as a
TCP/IP.
o At the Transmitter side :
o The main functionality of the TCP is to take the data from the application layer.
ZCoER, Pune

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.

o All TCP connections begin with a three-way handshake


o Before the client or the server can exchange any application data, they must
agree on starting packet sequence numbers, as well as a number of other
connection specific variables, from both sides.
o The sequence numbers are picked randomly from both sides for security reasons.

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

o Client increments both x and y by one and completes the handshake by


dispatching the last ACK packet in the handshake.
o Once the three-way handshake is complete, the application data can begin to
flow between the client and the server.
o The client can send a data packet immediately after the ACK packet.
o But the server must wait for the ACK before it can dispatch any data.
o This startup process applies to every TCP connection and carries an important
implication for performance of all network applications using TCP: each new
connection will have a full roundtrip of latency before any application data can be
transferred.

TCP Header format

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

HLEN specifies the length of the header

Reserved reserved for future use

URG urgent pointer

ACK If the ACK is set to 0, then it means that the data packet does not
contain an acknowledgment.

PSH push the data

RST restart a connection

SYN establish a connection between the hosts

FIN release a connection

Window size size of data that the receiver can accept

Advantages of TCP

o It provides a connection-oriented reliable service, which means that it guarantees


the delivery of data packets. If the data packet is lost across the network, then the
TCP will resend the lost packets.
o It provides a flow control mechanism using a sliding window protocol.
o It provides error detection by using checksum and error control by using Go Back
or ARP protocol.
o It eliminates the congestion by using a network congestion avoidance algorithm
that includes various schemes such as additive increase/multiplicative decrease
(AIMD), slow start, and congestion window.

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

User Datagram Protocol (UDP)

o UDP is a Transport Layer protocol.


o UDP is a part of the Internet Protocol suite, referred to as UDP/IP suite.
o Unlike TCP, it is an unreliable and connectionless protocol.
o So, there is no need to establish a connection prior to data transfer.
o The UDP helps to establish low-latency and loss-tolerating connections establish
over the network.
o The UDP enables process to process communication.
o Though Transmission Control Protocol (TCP) provides assured delivery, reliability,
and much more but all these services cost us additional overhead and latency.
o Here, UDP comes into the picture. For real-time services like computer gaming,
voice or video communication, live conferences; we need UDP. Since high
performance is needed, UDP permits packets to be dropped instead of
processing delayed packets.
o There is no error checking in UDP, so it also saves bandwidth.
o User Datagram Protocol (UDP) is more efficient in terms of both latency and
bandwidth.
o UDP Header

Source Port Used to identify the port number of the source.


Destination Port Used to identify the port number of the destination.
Length Length is the length of UDP
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.

Stream Control Transmission Protocol (SCTP )

o It is a new reliable, message oriented transport layer protocol.


ZCoER, Pune

o Designed for Internet applications that have recently been introduced.

1. IUA (ISDN over IP)

2. M2UA and M3UA (telephony signalling)

3. H.248 (media gateway control)

4. H.323 (IP telephony),

5. SIP (IP telephony)

o SCTP combines the best features of UDP and TCP.

o SCTP is a reliable message-oriented protocol.

o It preserves the message boundaries, and at the same time, detects lost data,
duplicate data, and out-of-order data.

Real Time Transport Protocol (RTP)

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 RTP must be used with UDP.

o It does not have any delivery mechanism like multicasting or port numbers.

o RTP supports different formats of files like MPEG and MJPEG.

o It is very sensitive to packet delays and less sensitive to packet loss.

Applications of RTP

o RTP mainly helps in media mixing, sequencing and time-stamping.

o Voice over Internet Protocol (VoIP)

o Video Teleconferencing over Internet.

o Internet Audio and video streaming.

Quality-of-Service (QoS)
ZCoER, Pune

o It refers to traffic control mechanisms that seek to either differentiate


performance based on application or network-operator requirements or provide
predictable or guaranteed performance to applications, sessions, or traffic
aggregates. Basic phenomenon for QoS means in terms of packet delay and
losses of various kinds.

Need for QoS –

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.

o Time-critical applications (real-time control) in which bounded delay is


considered to be an important factor.

o Valuable applications should be provided better services than less valuable


applications.

Differentiated Service

o Differentiated Service is a stateful solution in which each flow doesn’t mean a


different state.

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 Flexible Service Models:


IntServ has only two classes, want to provide more qualitative service classes:
want to provide ‘relative’ service distinction.

o Simpler signaling:
Many applications and users may only want to specify a more qualitative notion
of service.

TCP and UDP for Wireless Networks

o TCP should not care whether IP is running over which media i.e. fiber or radio.

o Wireless transmission links are highly unreliable.


ZCoER, Pune

o They lose the packets all the time.

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.

You might also like