Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
21 views

Computer Network Notes

This document contains important questions about computer networks. It gives overview of important computer topics. This is the second part of computer network notes.

Uploaded by

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

Computer Network Notes

This document contains important questions about computer networks. It gives overview of important computer topics. This is the second part of computer network notes.

Uploaded by

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

1. What is the transport layer? Explain in brief.

The transport layer is the fourth layer in the open systems interconnection(OSI)
network model. The OSI model divides the tasks involved with moving information
between networked computers into seven smaller, more manageable task groups.
Each of the seven OSI layers is assigned a task or group of tasks.
The transport layer's tasks include error correction as well as segmenting and de-
segmenting data before and after it's transported across the network. This layer is
also responsible for flow control and making sure that segmented data is
delivered over the network in the correct sequence. Layer 4 (the transport layer)
uses the transmission control protocol (TCP) & user data protocol (UDP) to carry
out its tasks. The transport layer takes services from the Network layer and
provides services to the Application layer
On the sender’s side: The transport layer receives data (message) from the
Application layer and then performs Segmentation, divides the actual message
into segments, adds source and destination’s port numbers into the header of the
segment, and transfers the message to the Network layer.
On the receiver’s side: The transport layer receives data from the Network layer,
reassembles the segmented data, reads its header, identifies the port number, and
forwards the message to the appropriate port in the Application layer.
2. Draw the diagram of the TCP header and explain the use of the following:

1. Source and destination port address:A 16-bit field that holds the port address
of the application that is sending the data segment.
A 16-bit field that holds the port address of the application in the host that is
receiving the data segment.

2. Sequence and acknowledgment numbers:A 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 of
the segments that are received out of order.
A 32-bit field that holds the acknowledgment number, i.e, the byte number that
the receiver expects to receive next. It is an acknowledgment of the previous
bytes being received successfully.
3. Code bits:
4. Window bits:It is a 16-bit field. It contains the size of data that the receiver can
accept. This field is used for the flow control between the sender and receiver and
also determines the amount of buffer allocated by the receiver for a segment. The
value of this field is determined by the receiver.
5. 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.
3. Write a note on UDP.
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the
Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable
and connectionless protocol. So, there is no need to establish a connection prior
to data transfer.
Though Transmission Control Protocol (TCP) is the dominant transport layer
protocol used with most Internet services; provides assured delivery, reliability,
and much more but all these services cost us additional overhead and latency.
Here, UDP comes into the picture. For real-time services like computer gaming,
voice or video communication, and live conferences; we need UDP. Since high
performance is needed, UDP permits packets to be dropped instead of processing
delayed packets. There is no error checking in UDP, so it also saves bandwidth.
User Datagram Protocol (UDP) is more efficient in terms of both latency and
bandwidth.

4. What is the difference between TCP and UDP?


Basis Transmission control User datagram protocol
protocol(TCP) (UDP)
Type of Service TCP is a connection-oriented UDP is the Datagram-oriented
protocol. Connection-orientation protocol. This is because there is no
means that the communicating overhead for opening a connection,
devices should establish a maintaining a connection, and
connection before transmitting terminating a connection. UDP is
data and should close the efficient for broadcast and
connection after transmitting the multicast types of network
data. transmission.
Reliability TCP is reliable as it guarantees the The delivery of data to the
delivery of data to the destination destination cannot be guaranteed
router. in UDP.
Error checking TCP provides extensive error- UDP has only the basic error
mechanism checking mechanisms. It is checking mechanism using
because it provides flow control checksums.
and acknowledgment of data.
Acknowledgment An acknowledgment segment is No acknowledgment segment.
present.
Sequence Sequencing of data is a feature of There is no sequencing of data in
the Transmission Control Protocol UDP. If the order is required, it has
(TCP). this means that packets to be managed by the application
arrive in order at the receiver. layer.
Speed TCP is comparatively slower than UDP is faster, simpler, and more
UDP. efficient than TCP.
Retransmission Retransmission of lost packets is There is no retransmission of lost
possible in TCP, but not in UDP. packets in the User Datagram
Protocol (UDP).
Header Length TCP has a (20-60) bytes variable UDP has an 8 bytes fixed-length
length header. header.
Weight TCP is heavy-weight. UDP is lightweight.
Handshaking Uses handshakes such as SYN, It’s a connectionless protocol i.e.
Techniques ACK, and SYN-ACK No handshake
Broadcasting TCP doesn’t support UDP supports Broadcasting.
Broadcasting.
Protocols TCP is used by HTTP, HTTPS, FTP, UDP is used by DNS, DHCP, TFTP,
SMTP, and Telnet. SNMP, RIP, and VoIP.
Stream Type The TCP connection is a byte UDP connection is a message
stream. stream.
Overhead Low but higher than UDP. Very low.

5. What is UDP? What is the maximum and minimum size of a UDP datagram?
Also, discuss the use of UDP.
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the
Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an unreliable
and connectionless protocol. So, there is no need to establish a connection prior
to data transfer.
Though Transmission Control Protocol (TCP) is the dominant transport layer
protocol used with most Internet services; provides assured delivery, reliability,
and much more but all these services cost us additional overhead and latency.
In UDP, the header size is 8 bytes, and the packet size is up to 65,535 bytes. But
this packet size is not possible as the data needs to be encapsulated in the IP
datagram, and in an IP packet, the header size can be 20 bytes; therefore, the
maximum of UDP would be 65,535 minus 20. The size of the data that the UDP
packet can carry would be 65,535 minus 28 as 8 bytes for the header of the UDP
packet and 20 bytes for the IP header.
Application of UDP:
• Used for simple request-response communication when the size of data is
less and hence there is lesser concern about flow and error control.
• It is a suitable protocol for multicasting as UDP supports packet switching.
• UDP is used for some routing update protocols like RIP(Routing Information
Protocol).
• Normally used for real-time applications which can not tolerate uneven
delays between sections of a received message.
• The following implementations use UDP as a transport layer protocol: NTP
(Network Time Protocol), DNS (Domain Name Service), BOOTP, DHCP, NNP
(Network News Protocol), Quote of the day protocol, TFTP, RTSP, and RIP.
• The application layer can do some of the tasks through UDP- Trace Route,
Record Route, and Timestamp.
• UDP takes a datagram from Network Layer, attaches its header, and sends it
to the user. So, it works fast.
• UDP is a null protocol if you remove the checksum field.
6. Explain the header format of TCP.
TCP stands for Transmission Control Protocol. It is a transport layer protocol that
facilitates the transmission of packets from source to destination. It is a
connection-oriented protocol which means it establishes the connection prior to
the communication that occurs between the computing devices in a network. This
protocol is used with an IP protocol, so together, they are referred to as a TCP/IP.
• Source port: It defines the port of the application, which is sending the
data. So, this field contains the source port address, which is 16 bits.
• Destination port:It defines the port of the application on the receiving side.
So, this field contains the destination port address, which is 16 bits.
• Sequence number:This field contains the sequence number of data bytes in
a particular session.
• Acknowledgment number:When the ACK flag is set, then this contains the
next sequence number of the data byte and works as an acknowledgment
for the previous data received. For example, if the receiver receives the
segment number 'x', then it responds with 'x+1' as an acknowledgment
number.
• HLEN:It specifies the length of the header indicated by the 4-byte words in
the header. The size of the header lies between 20 and 60 bytes. Therefore,
the value of this field would lie between 5 and 15.
• Reserved:It is a 4-bit field reserved for future use, and by default, all are set
to zero.
• Flags:There are six control bits or flags:
• URG: It represents an urgent pointer. If it is set, then the data is
processed urgently.
• ACK: If the ACK is set to 0, then it means that the data packet does
not contain an acknowledgment.
• PSH: If this field is set, then it requests the receiving device to push
the data to the receiving application without buffering it.
• RST: If it is set, then it requests to restart a connection.
• SYN: It is used to establish a connection between the hosts.
• FIN: It is used to release a connection, and no further data exchange
will happen.
• Window size:It is a 16-bit field. It contains the size of data that the receiver
can accept. This field is used for the flow control between the sender and
receiver and also determines the amount of buffer allocated by the receiver
for a segment. The value of this field is determined by the receiver.
• Checksum:It is a 16-bit field. This field is optional in UDP, but in the case of
TCP/IP, this field is mandatory.
• Urgent pointer:It is a pointer that points to the urgent data byte if the URG
flag is set to 1. It defines a value that will be added to the sequence number
to get the sequence number of the last urgent byte.
• Options:It provides additional options. The optional field is represented in
32-bits. If this field contains data less than 32-bit, then padding is required
to obtain the remaining bits.

7. Explain the header format of UDP.


UDP header is an 8-bytes fixed and simple header, while for TCP it may vary from
20 bytes to 60 bytes. The first 8 Bytes contain all necessary header information
and the remaining part consist of data. UDP port number fields are each 16 bits
long, therefore the range for port numbers is defined from 0 to 65535; port
number 0 is reserved. Port numbers help to distinguish different user requests or
processes.
• Source Port:Source Port is a 2 Byte long field used to identify the port
number of the source.
• Destination Port:It is a 2 Byte long field, used to identify the port of the
destined packet.
• Length:Length is the length of UDP including the header and the data. It
is a 16-bits field.
• Checksum:Checksum is 2 Bytes long field. It is the 16-bit one’s
complement of the one’s complement sum of the UDP header, the
pseudo-header of information from the IP header, and the data, padded
with zero octets at the end (if necessary) to make a multiple of two
octets.
8. Compare the TCP header with the UDP header.
Both TCP and UDP use headers as part of packaging the message data for transfer
over network connections. Because TCP is the more robust of the two protocols,
its header is larger at 20 bytes with an option for additional data, while UDP
headers are limited to 8 bytes in size.
9. What is the session layer? discuss the design issue of the session layer.
The Session Layer is the 5th layer in the Open System Interconnection (OSI)
model. This layer allows users on different machines to establish active
communications sessions between them. It is responsible for establishing,
maintaining, synchronizing, and terminating sessions between end-user
applications. In Session Layer, streams of data are received and further marked,
which is then resynchronized properly, so that the ends of the messages are not
cut initially and further data loss is avoided. This layer basically establishes a
connection between the session entities. This layer handles and manipulates data
that it receives from the Session Layer as well as from the Presentation Layer.
Design Issues with Session Layer:
• Establish sessions between machines:The establishment of sessions
between machines is an important service provided by the session layer.
This session is responsible for creating a dialog between connected
machines. The Session Layer provides a mechanism for opening, closing,
and managing a session between end-user application processes, i.e. a
semi-permanent dialogue. This session consists of requests and responses
that occur between applications.
• Enhanced Services:Certain services such as checkpoints and management
of tokens are the key features of the session layer and thus it becomes
necessary to keep enhancing these features during the layer’s design.
• To help in Token management and Synchronization:The session layer plays
an important role in preventing the collision of several critical operations as
well as ensuring better data transfer over the network by establishing
synchronization points at specific intervals. Thus it becomes highly
important to ensure proper execution of these services.
10. Write the services provided by the session layer.
The session layer services are provided by a functional unit set, which constitutes
the session layer. The session layer can be understanding as a general-purpose
tool kit out of which the user selects the tools to be used.
The functions provided by the session layers are as follows:
Session Establishment:The session layer’s primary function is to provide and
establish connections between communicating users, known as sessions. It can
transfer the data over these sessions in a reliable and orderly way. It can settle a
session between two computers for communication, file transfer, remote login, or
other purposes. It can establish Connection-oriented and connectionless
sessions, but a connectionless session is of no use for the session layer user-
oriented.
Normal Data Transfer:It is the essential function of the session layer. The
exchange of data between user entities can either be a two-way alternate (half-
duplex) or two ways simultaneous (full-duplex).
Dialog Management:In some cases, the session connections are full-duplex, but
the upper layers sometimes communicate in half-duplex modes. In such cases,
the session layer has to keep track of whose turn it talks which is known as dialog
management. Data tokens are used to implement dialog management.
Synchronization: Checkpoints are the midway marks that are added after a
particular interval during the stream of data transfer. These points are also
referred to as synchronization points. The Session layer permits the process to
add these checkpoints. For example, suppose a file of 400 pages is being sent
over a network, then it is highly beneficial to set up a checkpoint after every 50
pages so that the next 50 pages are sent only when previous pages are received
and acknowledged.
Activity Management: The session layer allows the user to distinguish between
activities that are performed during a session. The user can split the message
stream up into logical units. These logical units are called an activity, and this
splitting of the message stream into activities is known as activity management.
Reporting:One of the features of the session layer is its reporting facility for
unexpected errors. It is a general-purpose mechanism that allows reporting for
troubles to peers if the user falls into it. This reporting is equally applicable to
user-detected errors, protocol errors, or some other unexpected errors.
11. Describe the retransmission, simplex, half-duplex, and full-duplex
transmission terms.
Retransmission:The retransmission means resending the packets over the
network that have been either lost or damaged. Here, retransmission is a
mechanism used by protocols such as TCP to provide reliable communication.
Here, reliable communication means that the protocol guarantees the packet's
delivery even if the data packet has been lost or damaged.
The networks are unreliable and do not guarantee the delay or the retransmission
of the lost or damaged packets. The network which uses a combination of
acknowledgment and retransmission of damaged or lost packets offers reliability.
Simplex transmission: In Simplex mode, the communication is unidirectional, as
on a one-way street. Only one of the two devices on a link can transmit, and the
other can only receive. The simplex mode can use the entire capacity of the
channel to send data in one direction.
Example: Keyboard and traditional monitors. The keyboard can only introduce
input, the monitor can only give the output.
Half-Duplex transmission:In half-duplex mode, each station can both transmit and
receive, but not at the same time. When one device is sending, the other can only
receive, and vice versa. The half-duplex mode is used in cases where there is no
need for communication in both directions at the same time. The entire capacity
of the channel can be utilized for each direction.
Example: Walkie-talkie in which message is sent one at a time and messages are
sent in both directions.
Full-Duplex transmission: In full-duplex mode, both stations can transmit and
receive simultaneously. In full-duplex mode, signals going in one direction share
the capacity of the link with signals going in another direction, this sharing can
occur in two ways: Either the link must contain two physically separate
transmission paths, one for sending and the other for receiving Or the capacity is
divided between signals traveling in both directions.
Full-duplex mode is used when communication in both directions is required all
the time. The capacity of the channel, however, must be divided between the two
directions.
Example:Telephone Network in which there is communication between two
persons by a telephone line, through which both can talk and listen at the same
time.
12. What is the presentation layer? Write the design issue of the presentation
layer.
Presentation Layer is the 6th layer in the Open System Interconnection (OSI)
model. This layer is also known as the Translation layer, as this layer serves as a
data translator for the network. The data that this layer receives from the
Application Layer is extracted and manipulated here as per the required format to
transmit over the network. The main responsibility of this layer is to provide or
define the data format and encryption. The presentation layer is also called as
Syntax layer since it is responsible for maintaining the proper syntax of the data
which it either receives or transmits to other layers.
Design issues with Presentation Layer:
• The standard way of encoding data: The presentation layer follows a
standard way to encode data when it needs to be transmitted. This encoded
data is represented as character strings, integers, floating-point numbers,
and data structures composed of simple components. It is handled
differently by different machines based on the encoding methods followed
by them.
• Maintaining the Syntax and Semantics of distributed information: The
presentation layer manages and maintains the syntax as well as logic and
meaning of the information that is distributed.
• Standard Encoding on the wire: The data structures that are defined to be
exchanged need to be abstract along with the standard encoding to be used
“on the wire”.
13. What is cryptography? Distinguish between symmetric and asymmetric key
cryptography.
Cryptography is a technique of securing information and communications through
the use of codes so that only those persons for whom the information is intended
can understand it and process it. Thus preventing unauthorized access to
information. The prefix “crypt” means “hidden” and the suffix graph means
“writing”.
In Cryptography the techniques which are used to protect information are
obtained from mathematical concepts and a set of rule-based calculations known
as algorithms to convert messages in ways that make it hard to decode them.
These algorithms are used for cryptographic key generation, digital signing, and
verification to protect data privacy, web browsing on the internet, and to protect
confidential transactions such as credit card and debit card transactions.
Symmetric Key Cryptography: It is an encryption system where the sender and
receiver of a message use a single common key to encrypt and decrypt messages.
Symmetric Key Systems are faster and simpler but the problem is that sender and
receiver have to somehow exchange keys in a secure manner. The most popular
symmetric-key cryptography system is Data Encryption System(DES).
Asymmetric Key Cryptography: Under this system, a pair of keys is used to encrypt
and decrypt information. A public key is used for encryption and a private key is
used for decryption. The public key and Private Key are different. Even if the public
key is known by everyone the intended receiver can only decode it because he
alone knows the private key.
14. Define cryptography with the help of a block diagram of symmetric and
asymmetric key cryptography.
Symmetric key cryptography:It involves the usage of one secret key along with
encryption and decryption algorithms which help in securing the contents of the
message. The strength of symmetric key cryptography depends upon the number
of key bits. It is relatively faster than asymmetric key cryptography. There arises a
key distribution problem as the key has to be transferred from the sender to the
receiver through a secure channel.
Asymmetric key cryptography:It is also known as public-key cryptography
because it involves the usage of a public key along with the secret key. It solves
the problem of key distribution as both parties use different keys for
encryption/decryption. It is not feasible to use for decrypting bulk messages as it
is very slow compared to symmetric-key cryptography.

15. Explain Nagle’s algorithm in brief.


Nagle’s algorithm is an algorithm used in implementations of TCP/IP that controls
traffic congestion on a network. Nagle’s algorithm limits the transmission of small
datagrams and controls the size of the Transmission Control Protocol (TCP)
sending window. The algorithm increases the efficiency of routers by reducing the
latency of the routing process. It is also an important mechanism for enabling
large internetworks such as the Internet to handle TCP/IP applications (such as
Telnet applications) that communicate using large numbers of small Internet
Protocol (IP) packets.
The Nagle algorithm processes data on the sending side of TCP applications by a
method called nagling. It detects small-sized messages and accumulates those
messages into larger TCP packets before sending data across the wire. This
process avoids the generation of unnecessarily large numbers of small packets.
16. What is silly window syndrome in TCP flow control? Explain Nagle’s
algorithm and Clark’s solution for the syndrome created by the sender and
receiver.
Silly Window Syndrome is a problem that arises due to poor implementation of
TCP. It degrades the TCP performance and makes the data transmission extremely
inefficient. The problem is called so because
• It causes the sender window size to shrink to a silly value.
• The window size shrinks to such an extent that the data being transmitted is
smaller than TCP Header.
Cause-1: Sender window transmitting one byte of data repeatedly:Suppose only
one byte of data is generated by an application. The poor implementation of TCP
leads to transmitting this small segment of data. Every time the application
generates a byte of data, the window transmits it. This makes the transmission
process slow and inefficient. The problem is solved by Nagle’s algorithm.
Nagle’s algorithm suggests:
• The sender should send only the first byte on receiving one-byte data from
the application.
• Sender should buffer all the rest bytes until the outstanding byte gets
acknowledged.
• In other words, the sender should wait for 1 RTT(Round Trip Time).
After receiving the acknowledgment, the sender should send the buffered data in
one TCP segment. Then, the sender should buffer the data again until the
previously sent data gets acknowledged.
Cause-2: Receiver window accepting one byte of data repeatedly: Suppose
consider the case when the receiver is unable to process all the incoming data. In
such a case, the receiver will advertise a small window size. The process continues
and the window size becomes smaller and smaller. A stage arrives when it
repeatedly advertises a window size of 1 byte. This makes receiving process slow
and inefficient. The solution to this problem is Clark’s Solution.
Clark’s solution suggests:
• The receiver should not send a window update for 1 byte.
• Receiver should wait until it has a decent amount of space available.
• Receiver should then advertise that window size to the sender.
17. What is MIME?
Multipurpose Internet Mail Extension (MIME) is a standard that was proposed by
Bell Communications in 1991 in order to expand the limited capabilities of email.
MIME is a kind of add-on or a supplementary protocol that allows non-ASCII data
to be sent through SMTP. It allows the users to exchange different kinds of data
files on the Internet: audio, video, images, and application programs as well.
Growing demand for Email Messages as people also want to express themselves
in terms of Multimedia. So, MIME another email application is introduced as it is
not restricted to textual data.
MIME transforms non-ASCII data at the sender side to NVT 7-bit data and delivers
it to the client SMTP. The message on the receiver side is transferred back to the
original data. As well as we can send video and audio data using MIME as it
transfers them also in 7-bit ASCII data.
18. Explain different quality of services parameters available in the transport
layer.
1. Reliability:If a packet gets lost or acknowledgment is not received (at the
sender), the re-transmission of data will be needed. This decreases the reliability.
The importance of reliability can differ according to the application.
For example, E- mail and file transfer need to have a reliable transmission as
compared to that of audio conferencing.
2. Delay:Delay of a message from source to destination is a very important
characteristic. However, delay can be tolerated differently by the different
applications.
For example, The time delay cannot be tolerated in audio conferencing (needs a
minimum time delay), while the time delay in the e-mail or file transfer has less
importance.
3. Jitter:The jitter is the variation in the packet delay. If the difference between
delays is large, then it is called a high jitter. On the contrary, if the difference
between delays is small, it is known as low jitter.
Example: Case1:If 3 packets are sent at times 0, 1, 2 and received at 10, 11, 12.
Here, the delay is the same for all packets and it is acceptable for the telephonic
conversation.
Case2:If 3 packets 0, 1, 2 are sent and received at 31, 34, and 39, so the delay is
different for all packets. In this case, the time delay is not acceptable for the
telephonic conversation.
4. Bandwidth:Different applications need different bandwidths.
For example, Video conferencing needs more bandwidth in comparison to that of
sending an e-mail.
19. What is the RSA technique? Explain.
RSA algorithm is an asymmetric cryptography algorithm. Asymmetric actually
means that it works on two different keys i.e. Public Key and Private Key. As the
name describes that the Public Key is given to everyone and the Private key is kept
private.
An example of asymmetric cryptography:
• A client (for example browser) sends its public key to the server and
requests for some data.
• The server encrypts the data using the client’s public key and sends the
encrypted data.
• Client receives this data and decrypts it.
Since this is asymmetric, nobody else except the browser can decrypt the data
even if a third party has the public key of the browser.
The idea! The idea of RSA is based on the fact that it is difficult to factorize a large
integer. The public key consists of two numbers where one number is the
multiplication of two large prime numbers. And private key is also derived from
the same two prime numbers. So if somebody can factorize the large number, the
private key is compromised. Therefore encryption strength totally lies in the key
size and if we double or triple the key size, the strength of encryption increases
exponentially. RSA keys can be typically 1024 or 2048 bits long, but experts believe
that 1024-bit keys could be broken in the near future. But till now it seems to be
an infeasible task.
20. Write a note on:
1. Digital audio: Digital audio is a technology that is used to record, store,
manipulate, generate and reproduce sound using audio signals that have been
encoded in digital form.
It also refers to the sequence of discreet samples that are taken from an analog
audio waveform. Instead of a continuous sinusoidal wave, digital audio is
composed of discreet points which represent the amplitude of the waveform
approximately.
The more samples are taken, the better the representation, and hence impacts
the quality of the digital audio. Most modern multimedia devices can only process
digital audio, and in the case of cellphones requiring analog audio input, they still
convert it to digital before transmission.
2. Audio compression: A general way to think about lossless compression is that
for many types of files, including executable programs and code modules, it’s
absolutely imperative that all of the data in a compressed format is fully
reconstructed when the compression is reversed. Technologies like zip file utilities
provide this kind of service while unzipping files leads to fully reconstituted data
sets. In contrast, for music, image, or video, it may be acceptable to have some
data loss after compression. That’s because although the quality of the media may
be affected, these formats will still be digestible and useful with some data loss.
The achievement of lossless compression works through sets of highly
sophisticated algorithms. Many of these include modeling the data for
compression to evaluate how to cut down on the necessary storage space without
affecting the reconstitution of the data set. Experts point out that all sorts of
different lossless compression strategies work differently. Any technique that can
decrease storage requirements while providing full data reconstitution could be
described as lossless compression. Some of these work on the basis of probable
versus improbable data construction, where algorithms can guess or predict how
data sets may be put together in order to reconstitute a file.
A closer look at lossless compression algorithms shows that many of them work
through the principle of eliminating or handling redundancy. Using strategies like
bit string replacements and data conversion, these algorithms can make files
smaller while providing a kind of shorthand that machines can use to reconstitute
the data at a later time. Again, there are many ways to do this, including helpful
pointers that can provide consistent values for redundant bits of data.
3. Streaming audio: Audio streaming is the practice of delivering real-time audio
through a network connection. This type of data transmission requires certain
protocols for handling the chronology of data packets or other transmission types,
to provide the end-user with on-demand content. In general, audio streaming
utilizes a buffering system and a secure data stream platform to allow end-users to
listen to full audio files without interruption. This type of data streaming also
requires significant bandwidth. Experts point out that high-quality audio
streaming is a somewhat recent phenomenon, and that in previous decades, a lot
of major types of connections such as dial-up Internet or slower bandwidth offers
would not accommodate uninterrupted audio streaming.
Much of today's audio streaming is done through sophisticated mobile devices
made to handle higher amounts of data streaming, along with voice
communications and more, with high-tech regional networking systems to
support this data use. Equipped with ultra-modern microprocessors and new
operating systems, today's class of mobile devices are some of the most elaborate
and high-powered devices available in today’s consumer market, and
accommodating good audio and video streaming is a major engineering
component for dominant device makers. The provision of these data-intensive
streaming services, and their popularity, are leading to frank discussions about the
practical limitations of the frequency spectrum, and bandwidth as a commodity.
22. Explain three-way handshaking.
Three-Way Handshaking:The connection establishment in TCP is called three-way
handshaking. The process starts with the server. The server program tells its TCP
that it is ready to accept a connection. This request is called a passive open.
Although the server TCP is ready to accept a connection from any machine in the
world, it cannot make the connection itself. The client program issues a request
for an active open. A client that wishes to connect to an open server tells its TCP
to connect to a particular server. TCP can now start the three-way handshaking
process.

23. How does the transport layer ensure that the complete message arrives at
the destination and in the proper order?
Through the use of error detection codes, such as a checksum, the transport layer
ensures the data is not corrupted by sending an acknowledgment message to the
sender.
24. What is the procedure for compressing data using run-length encoding?
Run-length encoding (RLE) is a simple form of lossless data compression that
runs on sequences with the same value occurring many consecutive times. It
encodes the sequence to store only a single value and its count.
For example, consider a screen containing plain black text on a solid white
background. There will be many long runs of white pixels in the blank space and
many short runs of black pixels within the text.
WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWW
WWWWWWWWWWWWWBWWWWWWWWWWWWWW
With a run-length encoding (RLE) data compression algorithm applied to the
above hypothetical scan line, it can be rendered as 12W1B12W3B24W1B14W.
This can be interpreted as a sequence of twelve W’s, one B, twelve W’s, three B’s,
etc.
25. Explain the TCP header and working of TCP protocol and differentiate
between TCP and UDP with frame format.
The Transmission Control Protocol (TCP) header is the first 24 bytes of a TCP
segment that contains the parameters and state of an end-to-end TCP socket. The
TCP header is used to track the state of communication between two TCP
endpoints. Since TCP segments are inserted (encapsulated) in the payload of the
IP packet the TCP header immediately follows the IP header during transmission.
TCP does not need to keep track of which systems are communicating, it only
needs to track which end-to-end sockets are currently open. Internet Protocol
handles the logical addressing, routing, and host-to-host connectivity.
Working:In TCP, the connection is established by using three-way handshaking.
The client sends the segment with its sequence number. The server, in return,
sends its segment with its own sequence number as well as the acknowledgment
sequence, which is one more than the client sequence number. When the client
receives the acknowledgment of its segment, then it sends the acknowledgment
to the server. In this way, the connection is established between the client and the
server.

Difference between TCP and UDP:


Basis Transmission control User datagram protocol
protocol(TCP) (UDP)
Type of Service TCP is a connection-oriented UDP is the Datagram-oriented
protocol. Connection-orientation protocol. This is because there is no
means that the communicating overhead for opening a connection,
devices should establish a maintaining a connection, and
connection before transmitting terminating a connection. UDP is
data and should close the efficient for broadcast and
connection after transmitting the multicast types of network
data. transmission.
Reliability TCP is reliable as it guarantees the The delivery of data to the
delivery of data to the destination destination cannot be guaranteed
router. in UDP.
Error checking TCP provides extensive error- UDP has only the basic error
mechanism checking mechanisms. It is checking mechanism using
because it provides flow control checksums.
and acknowledgment of data.
Acknowledgment An acknowledgment segment is No acknowledgment segment.
present.
Sequence Sequencing of data is a feature of There is no sequencing of data in
the Transmission Control Protocol UDP. If the order is required, it has
(TCP). this means that packets to be managed by the application
arrive in order at the receiver. layer.
Speed TCP is comparatively slower than UDP is faster, simpler, and more
UDP. efficient than TCP.
Retransmission Retransmission of lost packets is There is no retransmission of lost
possible in TCP, but not in UDP. packets in the User Datagram
Protocol (UDP).
Header Length TCP has a (20-60) bytes variable UDP has an 8 bytes fixed-length
length header. header.
Weight TCP is heavy-weight. UDP is lightweight.
Handshaking Uses handshakes such as SYN, It’s a connectionless protocol i.e.
Techniques ACK, and SYN-ACK No handshake
Broadcasting TCP doesn’t support UDP supports Broadcasting.
Broadcasting.
Protocols TCP is used by HTTP, HTTPS, FTP, UDP is used by DNS, DHCP, TFTP,
SMTP, and Telnet. SNMP, RIP, and VoIP.
Stream Type The TCP connection is a byte UDP connection is a message
stream. stream.
Overhead Low but higher than UDP. Very low.

You might also like