Computer Networking Question Bank[1]
Computer Networking Question Bank[1]
CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection. It is a network protocol
used in Ethernet to avoid data collisions during transmission over a shared communication channel.
How it works:
1. Carrier Sense: Each device checks the channel (wire) before sending data to see if it is free.
2. Multiple Access: Many devices share the same communication medium.
○ After detection, they stop transmitting immediately and send a jam signal to inform
others.
○ Each device waits for a random backoff time before trying again.
Why it is important:
Transmission Send data any Send only at the start of time slots
time
Conclusion:
● Slotted ALOHA improves performance by reducing collision chances using time slots.
● Pure ALOHA is easier but less efficient.
3. Explain the different types of firewalls. Why are firewalls necessary in a network?
A firewall is a security device (hardware or software) that controls what data is allowed to enter or leave a
network.
Types of Firewalls:
4. What is the difference between network layer delivery and transport layer
delivery?
Feature Network Layer Delivery Transport Layer Delivery
In simple terms:
● Transport Layer ensures data goes from one application/process to another on the correct
computer.
Path Dedicated path for entire Data sent in small packets via
communication different paths
Resource Fixed, reserved for one connection Shared among many users
Usage
Efficiency Less efficient (idle time wastes High efficiency (dynamic use)
resources)
Conclusion:
● Packet switching is like email – data is broken into pieces and reassembled at the end.
6. Describe the various framing methods used in data communication.
Framing is a technique used in the Data Link Layer to divide the stream of bits from the Network Layer
into frames (data units).
Framing Methods:
○ The first field of the frame tells the number of characters in the frame.
○ Problem: If the count field is corrupted, the whole frame may be lost.
○ Special flag byte (e.g., 01111110) marks the beginning and end of a frame.
○ If the same flag appears in data, extra bytes (stuffing) are added to differentiate it.
○ If 5 consecutive 1’s appear in data, a 0 is automatically inserted to avoid confusion with flag.
○ Frame boundaries are identified using unusual signals not used for normal data.
Summary:
IPv6 offers more addresses, better performance, and built-in security, making it ideal for the modern
internet.
Data order Sent and received in order May arrive out of order
Example:
Key Concepts:
Steps:
3. Each router updates its own table using the Bellman-Ford algorithm:
Problems:
● Count to Infinity: When a route fails, incorrect distance values may increase slowly.
● Slow convergence.
Solutions:
● Split Horizon: Don’t send info back on the same path it came from.
● Poison Reverse: Send route as infinite if it uses the sender as the next hop.
10. Describe the different approaches to packet switching and explain them.
Disadvantages:
Types:
Advantages:
Disadvantages:
Cryptography is the science of securing data by converting it into a format that is unreadable to
unauthorized users. It ensures data confidentiality, integrity, authentication, and non-repudiation.
● Encryption: Converting plaintext into unreadable ciphertext using an algorithm and a key.
Types of Cryptography:
○ Uses two keys: public key (encryption) and private key (decryption).
○ No key is used.
Keys Used One key (same for encryption & Two keys (public and private)
decryption)
Security Less secure (key must be shared) More secure (private key kept
secret)
Example:
● Symmetric: Like a locked box with one key shared by sender and receiver.
● Asymmetric: Like a mailbox—anyone can drop a letter (public key), but only the owner can open it
(private key).
13. Define computer networks. Discuss different network topologies and their
advantages.
Computer Network is a group of interconnected devices that share data, resources, and applications.
14. Explain the OSI reference model and the functions of each layer.
The OSI (Open Systems Interconnection) model is a framework with 7 layers, each having specific
functions to standardize networking.
○ Example: Ethernet.
○ Ensures reliable data transfer with error control and flow control.
○ Closest to users.
15. Discuss the key differences between LAN, MAN, and WAN.
Full Form Local Area Network Metropolitan Area Network Wide Area Network
Summary:
How It Works:
● The sender can send multiple frames (up to a window size N) without waiting for an
acknowledgment (ACK).
● If a frame is lost or damaged, the receiver discards that frame and all subsequent frames.
● The sender goes back and retransmits the lost frame and all frames sent after it — hence the name
Go-Back-N.
Example:
Advantages:
● Simple to implement.
Disadvantages:
Selective Repeat ARQ improves on Go-Back-N by retransmitting only the erroneous or lost frames, not
the entire sequence.
How It Works:
● The receiver stores correct frames even if they are out of order.
● Receiver reorders the frames before passing them to the application layer.
Example:
● Sender sends frames 0 to 4.
Advantages:
Disadvantages:
How It Works:
Example:
Advantages:
Disadvantages:
● Inefficient for high-speed or long-distance networks because the sender waits too long.
19. Explain the TCP three-way handshake process for connection establishment.
TCP (Transmission Control Protocol) uses a three-way handshake to establish a reliable connection
between client and server.
Steps:
○ The client sends a SYN message to the server to initiate a connection and indicates its
sequence number (e.g., Seq = 100).
○ The server replies with SYN-ACK, acknowledging the client’s SYN (Ack = 101) and
sending its own SYN (Seq = 200).
○ The client responds with an ACK acknowledging the server's SYN (Ack = 201).
Why Needed?
● Ensures both sides are ready and agree on initial sequence numbers.
20. What are the key differences between TCP and UDP?
Use Cases Web, email, file transfer Video streaming, gaming, VoIP
Error Checking Yes Yes, but no recovery
Summary:
● TCP is like a phone call — both parties talk in turn and confirm.
The transport layer ensures reliable and efficient communication between devices. However, it faces
several performance issues:
1. Delay (Latency):
2. Throughput:
3. Congestion:
● When too much data is sent too quickly, the network becomes congested.
4. Packet Loss:
5. Flow Control:
6. Error Control:
Flow Control is a technique used in data communication to ensure that the sender does not send
more data than the receiver can handle.
Importance:
Mechanisms:
1. Stop-and-Wait:
2. Sliding Window:
● Receiver gives the sender a “credit” or permission for how much data to send.
23. Describe the different types of transmission media with their pros and cons.
Coaxial Central conductor with Better noise resistance, Bulkier and costlier
Cable insulation and shielding more bandwidth than twisted
pair
Fiber Optic Transmits data as light Very high speed, long Expensive, fragile,
Cable through glass fibers distance, no interference hard to install
Radio Used in radio, TV, Wi-Fi Can travel long Affected by interference
Waves distances
24. List and explain the protocols used for unicast routing.
Unicast routing means routing data from one sender to one specific receiver.
25. What is the Domain Name System (DNS)? Discuss the main divisions of domain
name space.
DNS is like the phonebook of the internet. It translates domain names (like www.google.com) into IP
addresses (like 142.250.180.36) that computers use to communicate.
○ Categorized as:
4. Subdomains:
Adaptability Doesn’t adapt to changes in the Adapts to changes like link failure or
network congestion
Example Setting a fixed route for a home Routers in a corporate network using
router OSPF
27. Calculate the required bandwidth if signal power is 100 W, noise power is 10 W,
and transmission rate is 10 kbps.
Where:
● BB = bandwidth (Hz)
Given:
● Data Rate C=10 kbps=10,000 bpsC = 10 \text{ kbps} = 10,000 \text{ bps}
Subnetting:
Subnetting is the process of dividing a large network into smaller subnetworks (subnets).
Why Subnetting?
Example:
● and so on...
Advantages of Subnetting:
29. Draw and explain a network diagram illustrating the Link State Routing Algorithm
/\
1 2
/ \
B C
\ /
1 3
\/
○ To B: A → B (Cost = 1)
○ To C: A → C (Cost = 2)
○ To D: A → B → D (Cost = 1 + 1 = 2)
Key Features:
● Fast convergence.
30. Explain the concept and importance of Quality of Service (QoS) in networks
QoS refers to a set of techniques used to manage network traffic and guarantee performance for
critical applications.
● In real-time services like video calls, online games, and VoIP, delay or packet loss can affect
quality.
QoS Parameters:
QoS Techniques:
✅ Conclusion:
QoS ensures that critical applications get the required performance, making networks more efficient
and reliable.
Congestion control is vital to prevent network performance degradation due to overloaded links. Different
techniques are used to manage and control congestion:
● This technique prevents congestion by setting parameters in advance to avoid congestion, such
as limiting the transmission rate.
● Example: ATM (Asynchronous Transfer Mode), where traffic is regulated before sending.
● In this method, the network responds to congestion signals from routers and adjusts the sending
rate accordingly.
● Slow Start: Initially, the sender starts with a small window size and increases it exponentially.
● Congestion Avoidance: Once a threshold is reached, the sender increases the window size
linearly.
● Fast Recovery: After detecting packet loss, TCP reduces the window size and gradually increases
it again.
● A router monitors buffer occupancy and drops packets early to signal congestion before the buffer
fills up completely.
32. What is the transmission time for a 2-million-byte packet over a 300 kbps
channel?
Given:
Flow control ensures that the sender does not overwhelm the receiver with too much data. In the transport
layer, flow control is primarily achieved using the following methods:
● The sender can transmit multiple packets before receiving an acknowledgment, but only a limited
number at a time.
● The window size (number of unacknowledged packets) is adjusted dynamically based on the
receiver’s buffer capacity.
● In TCP, the receiver advertises a window size to the sender, indicating how much data it can
handle at once.
● The sender adjusts its transmission rate based on this window size to avoid overwhelming the
receiver.
3. Stop-and-Wait Protocol:
● In this protocol, the sender transmits one packet and waits for an acknowledgment before sending
the next one.
● TCP uses the Advertised Window to signal how much data the receiver can buffer.
● If the buffer is nearly full, the receiver may reduce the window size or send a zero window size to
temporarily stop the sender.
The Data Link Layer ensures reliable communication between devices over a physical link. Several design
issues must be addressed:
1. Framing:
● The data link layer must determine how to group bits into frames. This is done using delimiters to
mark the beginning and end of a frame.
● The data link layer is responsible for detecting and correcting errors in the transmitted data.
3. Flow Control:
● This ensures that data is sent at a rate that the receiver can handle. If the sender sends too quickly,
the receiver may be overwhelmed.
● The MAC protocol determines how multiple devices share the communication medium (e.g.,
Ethernet, Wi-Fi). It deals with issues like collision detection and avoidance.
5. Addressing:
● The data link layer uses MAC addresses to uniquely identify devices on a network.
6. Error Recovery:
Firewalls are critical for network security, providing a barrier between trusted internal networks and
untrusted external networks (e.g., the Internet). Their key applications include:
1. Packet Filtering:
● Firewalls analyze packets based on criteria like source IP address, destination IP address, port
number, and protocol type to determine whether the packet should be allowed or blocked.
2. Stateful Inspection:
● Firewalls track the state of active connections and make decisions based on the context of the traffic
(e.g., a response to an outbound request).
● Only legitimate return traffic is allowed, reducing the risk of unauthorized access.
● NAT helps in concealing internal IP addresses and translating them to external ones, providing an
additional layer of security.
4. Access Control:
● Firewalls can define rules that specify which users or devices can access which resources, based
on IP addresses, time, or other factors.
5. VPN Support:
● Many firewalls support Virtual Private Networks (VPNs), which allow secure remote access to
internal networks over an insecure public network (e.g., the Internet).
● Some firewalls incorporate Intrusion Detection Systems (IDS) and Intrusion Prevention
Systems (IPS) to detect and prevent unauthorized or malicious traffic.
● Modern firewalls can inspect traffic at the application layer, blocking malicious activity like SQL
injection, cross-site scripting (XSS), and more.
36. How is BOOTP different from DHCP?
BOOTP (Bootstrap Protocol) and DHCP (Dynamic Host Configuration Protocol) are both used to
assign IP addresses to devices on a network, but they have key differences:
1. BOOTP:
● Manual Configuration: BOOTP requires manual configuration of the server and client.
● Fixed IP Address: Typically assigns a fixed IP address to a device based on its MAC address.
● Used for Booting: Primarily designed for booting diskless workstations over a network. It sends a
request for an IP address and other boot-related information.
● Limited Options: BOOTP provides only the IP address and server information (like the boot
server).
2. DHCP:
● Dynamic IP Addressing: DHCP can assign temporary IP addresses (leases) to devices and renew
them as needed.
● Supports BOOTP: DHCP is backward compatible with BOOTP and can handle booting of diskless
clients as well.
Key Differences:
● BOOTP is primarily used for bootstrapping, while DHCP is more versatile for general network
configuration.
37. Describe various network topologies and list the advantages and disadvantages
of each.
1. Bus Topology:
● Advantages:
● Disadvantages:
○ Difficult to troubleshoot.
2. Star Topology:
● Description: All devices are connected to a central device, such as a switch or hub.
● Advantages:
● Disadvantages:
3. Ring Topology:
● Advantages:
● Disadvantages:
4. Mesh Topology:
● Advantages:
○ Data can take multiple paths, reducing the chance of network failure.
● Disadvantages:
5. Tree Topology:
● Description: A hybrid topology combining bus and star topologies, with groups of star networks
connected in a hierarchical manner.
● Advantages:
● Disadvantages:
○ If the central device fails, it can disrupt the whole branch of the network.
IPv4 Header:
● Fields:
IPv6 Header:
● Fields:
Key Differences:
39. What is the OSI model? Explain each layer with functions and examples.
The OSI (Open Systems Interconnection) model is a conceptual framework used to understand network
interactions in seven layers:
○ Function: Deals with the physical transmission of data over the network medium.
○ Function: Responsible for packet forwarding, routing, and logical addressing (IP addresses).
○ Function: Ensures reliable data transfer between devices, handling error correction and flow
control.
40. Explain any two error detection techniques in detail (e.g., parity check, CRC).
1. Parity Check:
● Description: A parity bit is added to the data to make the number of 1-bits either even (even parity)
or odd (odd parity).
● How it works:
○ Even Parity: The number of 1-bits in the data, including the parity bit, must be even.
○ Odd Parity: The number of 1-bits in the data, including the parity bit, must be odd.
● How it works:
○ The sender generates a CRC code by dividing the data by a predetermined polynomial
(generator polynomial) and appends the remainder to the data.
○ The receiver divides the received data by the same polynomial. If the remainder is zero, the
data is considered error-free.
41. What are the main applications of computer networks in real life?
● Sharing Resources: Printers, files, and storage devices can be shared over a network.
● Online Services: Access to websites, cloud storage, online shopping, and social media.
● Remote Access: VPNs allow remote workers to securely access company resources.
● Business Applications: Supply chain management, enterprise resource planning (ERP) systems.
42. Explain the structure of an IP header and the function of ARP (Address
Resolution Protocol).
9. Protocol: 8 bits (indicates the higher-layer protocol, e.g., TCP or UDP).
● Function: ARP maps an IP address to its corresponding MAC address on a local network.
● How it works:
1. A device broadcasts an ARP request to the network asking "Who has IP address X?"
3. The requesting device stores the mapping in its ARP table for future communication.