CNND QB UT2
CNND QB UT2
A VLAN (Virtual Local Area Network) is a network configuration method that logically
segments a single physical network into multiple isolated networks. It works at the Data Link
Layer (Layer 2) of the OSI model. Devices within the same VLAN can communicate directly,
while communication between VLANs requires a router or Layer 3 switch. VLANs help reduce
broadcast traffic, enhance security, and simplify network management by grouping devices
based on function, department, or application, regardless of their physical location.
The Domain Name System (DNS) is a distributed naming system used to translate
human-readable domain names like www.example.com into machine-readable IP addresses
like 192.0.2.1. It functions like a phonebook for the internet, allowing users to access
websites without remembering numerical IPs. DNS is organized in a hierarchical structure
involving root servers, top-level domain (TLD) servers, and authoritative name servers. It plays a
crucial role in web browsing, email delivery, and other internet-based services by resolving
domain names quickly and efficiently through a system of queries and caching.
A Remote Procedure Call (RPC) is a protocol that allows a program to invoke a procedure (or
function) on another system, usually a remote server, as if it were a local function call. The RPC
mechanism abstracts the complexity of network communication, making remote interactions
seamless for the user. The client sends a request to the server with the necessary parameters,
and the server executes the procedure, returning the result to the client. RPC is commonly used
in distributed systems for inter-process communication and building networked applications.
SNMP (Simple Network Management Protocol) is a widely used protocol for monitoring and
managing network devices such as routers, switches, servers, and printers. It allows network
administrators to collect performance data, configure devices, and detect issues across a
network. SNMP operates using a client-server model, where the SNMP manager requests
information from SNMP agents on devices. The agents provide information stored in a
Management Information Base (MIB). SNMP is crucial for network administration, helping to
maintain the health and efficiency of a network.
Image compression techniques are methods used to reduce the size of image files while
maintaining acceptable quality. There are two main types:
● Lossy Compression: This technique reduces file size by discarding some of the image
data, which results in a loss of quality. Common lossy algorithms include JPEG (Joint
Photographic Experts Group), where the compression reduces file size significantly but
can cause visible artifacts.
● Lossless Compression: This method retains all original image data, ensuring no quality
loss. It uses algorithms like PNG (Portable Network Graphics) and GIF (Graphics
Interchange Format), which are ideal for images requiring sharp details or transparency.
These techniques are widely used in digital imaging, web development, and media storage to
balance file size and image quality.
7. Write a short note on: Leaky Bucket
The Leaky Bucket algorithm is a traffic shaping mechanism used in networking to control the
rate at which data packets are sent over a network. It works by buffering incoming packets in a
"bucket" and releasing them at a fixed rate, thus smoothing out bursty traffic. If the bucket
overflows, meaning packets arrive faster than the system can process, they are discarded. This
mechanism helps to avoid network congestion by ensuring that data is transmitted at a steady,
controlled rate, making it useful for applications like voice over IP (VoIP) or video streaming
where consistent data flow is essential.
Data Integrity Retains all original data, no Some data is lost, cannot be
loss in quality. fully restored.
File Size Reduction Provides moderate reduction Provides higher file size
in file size. reduction.
Use Cases Ideal for text files, images Used for multimedia like
with transparency, and audio images, audio, and video
files that require high quality. where quality loss is
acceptable.
Quality No loss of quality; perfect Quality is compromised for
fidelity. smaller file sizes.
HTTP (HyperText Transfer Protocol) is a protocol used for transmitting hypertext via the World
Wide Web. It enables communication between web browsers (clients) and web servers. HTTP
follows a request-response model where the client sends an HTTP request to the server, and
the server responds with the requested resource or an error message. HTTP operates over
TCP/IP and is stateless, meaning each request is independent, and the server does not retain
any information about previous requests. HTTP/1.1 and HTTP/2 are common versions, with
HTTP/2 offering improvements in speed and efficiency over HTTP/1.1.
Huffman Coding is a lossless data compression algorithm used to reduce the size of data by
assigning variable-length codes to different characters. The most frequent characters get
shorter codes, while less frequent characters are assigned longer codes. The algorithm creates
a binary tree, known as a Huffman Tree, where each leaf node represents a character, and the
path from the root to the leaf represents the character's binary code. Huffman coding is widely
used in data compression formats like ZIP files and JPEG image compression.
● Flow Control: Manages data transfer rates to prevent congestion, using a sliding
window protocol.
● Error Control: Uses checksums to detect errors and ensures corrupted data is
retransmitted.
● Ordered Data Transfer: Ensures data is delivered in the correct order, even if packets
arrive out of sequence.
These services make TCP suitable for applications requiring reliable and ordered data
transmission, like web browsing and file transfers.
UDP (User Datagram Protocol) is a connectionless and lightweight protocol used for fast data
transmission where reliability is not a priority. Key services provided by UDP include:
● Speed: It transmits data without waiting for acknowledgments, making it faster than TCP.
● No Error Recovery: Unlike TCP, UDP does not retransmit lost packets or ensure the
data is error-free.
● Unreliable Delivery: Data packets may be lost, duplicated, or arrive out of order, but
UDP does not guarantee delivery.
● Efficient for Broadcasting: Suitable for applications where time-sensitive data is more
important than reliability (e.g., streaming or online gaming).
UDP is widely used in applications that require quick data transmission and can tolerate some
data loss, such as DNS, VoIP, and video streaming.
13. Connectionless and Connection-Oriented Protocols
Data Ordering Data may arrive out of order. Data arrives in the same
order it was sent.
Data Ordering Ensures data arrives in the Data may arrive out of order.
correct order.
UDP (User Datagram Protocol) is a connectionless protocol that is primarily used for
applications that require fast data transmission and can tolerate some data loss. Since UDP
does not provide error correction, ordering, or retransmission, it is ideal for time-sensitive and
real-time applications where speed is prioritized over reliability.
○ Used for voice communication over the internet. VoIP services prioritize low
latency, so UDP is preferred despite its lack of reliability.
○ Video and audio streaming applications like Netflix, YouTube, and Spotify use
UDP to ensure minimal delay and smooth playback, even if some packets are
lost.
○ Multiplayer online games use UDP to send real-time data between players.
Speed is more critical than ensuring every packet arrives, so UDP is ideal for
gaming.
○ SNMP uses UDP to monitor and manage network devices because it requires
low overhead and can handle occasional packet loss.
○ A distance-vector routing protocol used in networks, which employs UDP for its
routing updates due to its efficiency and simplicity.
TCP Congestion Control is a mechanism that helps prevent network congestion by adjusting
the rate at which data is sent. It ensures that the network does not become overwhelmed with
too much data, which could lead to packet loss and delays. TCP uses several algorithms to
manage congestion, including:
1. Slow Start: Initially, TCP starts with a small congestion window (CWND) and increases it
exponentially with each acknowledgment (ACK) received, until a threshold is reached.
2. Congestion Avoidance: Once the threshold is crossed, TCP switches to a more
gradual increase in CWND (additive increase) to avoid overwhelming the network.
3. Fast Retransmit: When three duplicate ACKs are received (indicating packet loss), TCP
retransmits the lost packet immediately without waiting for a timeout.
4. Fast Recovery: After packet loss is detected, TCP reduces the CWND size to a fraction
of its original size (usually half), then increases it slowly again.
These algorithms ensure that TCP adapts to the network conditions, providing efficient and
reliable data transmission without causing congestion.
17. Explain TCP Three-Way Handshaking With Diagram
○ The client initiates the connection by sending a SYN packet to the server. This
packet includes an initial sequence number (ISN) chosen by the client, indicating
the starting point for data transmission.
○ Upon receiving the client's SYN packet, the server responds with a SYN-ACK
packet. This response serves two purposes:
■ SYN: The server's ISN is included, establishing its starting point for data
transmission.
■ ACK: Acknowledges the receipt of the client's SYN packet by setting the
acknowledgment number to the client's ISN plus one.
○ The client receives the server's SYN-ACK packet and sends an ACK packet
back to the server. This packet acknowledges the server's ISN by setting the
acknowledgment number to the server's ISN plus one. At this stage, the
connection is fully established, and data transfer can commence.
Diagram:
For a visual representation of the TCP Three-Way Handshake, you can refer to the following
resources:
● GeeksforGeeks:
● Guru99:
○ Offers a comprehensive guide on the TCP Three-Way Handshake, including a
step-by-step breakdown and diagram.
● Wireshark Wiki:
These resources provide clear diagrams and in-depth explanations to enhance your
understanding of the TCP Three-Way Handshake process.
The TCP Header is crucial for establishing and maintaining a connection in TCP. Here's a
simplified breakdown:
3. Sequence Number (32 bits): Tracks the position of the byte stream.
4. Acknowledgment Number (32 bits): Indicates the next expected byte.
6. Flags (9 bits): Includes control flags like SYN, ACK, FIN, etc.
7. Window Size (16 bits): Specifies flow control window size.
9. Urgent Pointer (16 bits): Points to urgent data if the URG flag is set.
10.Options: Additional configuration options.
Diagram Links:
Connection Establishment in TCP occurs through the three-way handshake process, which
ensures both parties are ready for data transmission. The process involves three main steps:
2. Guru99:
Explanation of Diagram:
1. SYN: The client sends a packet to the server to begin the connection.
2. SYN-ACK: The server responds with an acknowledgment of the client’s request.
3. ACK: The client confirms the server’s acknowledgment, completing the connection.
At this point, the connection is fully established, and data transfer can begin.
20. Describe Remote Procedure Call (RPC)
Remote Procedure Call (RPC) is a protocol that allows a program to execute a procedure
(function or subroutine) on a remote server as if it were a local call. It abstracts the complexities
of network communication and allows for client-server interaction.
2. Marshalling:
○ The arguments are packaged (marshalled) into a format that can be sent over the
network.
○ The server receives the request, unmarshals the arguments, executes the
function, and returns the result to the client.
○ The client receives the result, which is unmarshalled (converted back into its
original format) and used locally.
Advantages of RPC:
○ The client does not need to worry about the underlying network details; it can
simply call a function as if it were local.