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

Computer Networking Question Bank[1]

The document is a comprehensive question bank covering various topics in computer networking, including protocols like CSMA/CD, ALOHA, firewalls, routing algorithms, encryption methods, and network topologies. It explains key concepts such as the OSI model, differences between LAN, MAN, and WAN, and error control protocols like Go-Back-N and Selective Repeat ARQ. The content serves as a study guide for understanding fundamental networking principles and technologies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Computer Networking Question Bank[1]

The document is a comprehensive question bank covering various topics in computer networking, including protocols like CSMA/CD, ALOHA, firewalls, routing algorithms, encryption methods, and network topologies. It explains key concepts such as the OSI model, differences between LAN, MAN, and WAN, and error control protocols like Go-Back-N and Selective Repeat ARQ. The content serves as a study guide for understanding fundamental networking principles and technologies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Computer Networking Question Bank

1. Describe the CSMA/CD protocol used in Ethernet.

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.​

3.​ Collision Detection:​

○​ If two devices send data at the same time, a collision happens.​

○​ Devices detect this collision.​

○​ 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:

●​ It helps manage data traffic in Ethernet networks.​

●​ Reduces data loss due to collisions.​

2. Compare Pure ALOHA and Slotted ALOHA.


Feature Pure ALOHA Slotted ALOHA

Time division No time slots Divides time into equal slots

Transmission Send data any Send only at the start of time slots
time

Collision High Less compared to Pure ALOHA


chance

Efficiency 18.4% 36.8%

Complexity Simple Slightly complex due to synchronization

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:

1.​ Packet Filtering Firewall:​

○​ Checks each packet’s source/destination IP, port number, and protocol.​

○​ Fast but basic, doesn't inspect the content.​

2.​ Stateful Inspection Firewall:​

○​ Monitors the state of connections (TCP handshake, etc.).​

○​ Keeps track of active connections.​

○​ More secure than packet filtering.​

3.​ Application-Level Gateway (Proxy Firewall):​

○​ Works at the application layer (e.g., HTTP, FTP).​

○​ Filters traffic for specific applications.​

○​ Slower but offers better content control.​

4.​ Next-Generation Firewall (NGFW):​

○​ Includes deep packet inspection, intrusion prevention, and application awareness.​

○​ Offers high security with intelligent features.​

Why are firewalls necessary?

●​ Protect against hackers, viruses, and unauthorized access.​

●​ Monitor and filter incoming/outgoing data.​

●​ Enforce security policies.​

4. What is the difference between network layer delivery and transport layer
delivery?
Feature Network Layer Delivery Transport Layer Delivery

Focus Host-to-host delivery Process-to-process


delivery

Unit Packet Segment

Protocols IP (Internet Protocol) TCP, UDP

Reliability No guarantee (IP is TCP is reliable, UDP is not


unreliable)

Addressin Uses IP addresses Uses port numbers


g

In simple terms:

●​ Network Layer ensures data goes from one computer to another.​

●​ Transport Layer ensures data goes from one application/process to another on the correct
computer.​

5. Explain the differences between circuit switching and packet switching.


Feature Circuit Switching Packet Switching

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)

Delay Low once path is set Possible delay due to routing

Example Telephone network Internet, email, web browsing

Conclusion:

●​ Circuit switching is like a phone call – one path is fixed.​

●​ 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:

1.​ Character Count:​

○​ 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.​

2.​ Flag Bytes with Byte Stuffing:​

○​ 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.​

3.​ Bit Stuffing:​

○​ Used in bit-oriented protocols.​

○​ A special flag bit pattern is added at the start and end.​

○​ If 5 consecutive 1’s appear in data, a 0 is automatically inserted to avoid confusion with flag.​

4.​ Physical Layer Coding Violations:​

○​ Frame boundaries are identified using unusual signals not used for normal data.​

○​ Common in some high-speed networks.​

7. What are the advantages of IPv6 over IPv4?

Feature IPv4 IPv6

Address size 32-bit 128-bit (More addresses)

Address space Around 4.3 billion Virtually unlimited

Header format Complex Simplified for better routing

Security Optional (IPSec) Mandatory


Address Manual or DHCP Supports auto-configuration
configuration

NAT usage Common due to limited Not needed


addresses

Better support for IPv4-only networks Multimedia, mobile devices

Summary:

IPv6 offers more addresses, better performance, and built-in security, making it ideal for the modern
internet.

8. Differentiate between connection-oriented and connectionless services.

Feature Connection-Oriented Connectionless

Connection Requires setup before data is sent No setup needed

Data order Sent and received in order May arrive out of order

Reliability Reliable (error checking, Unreliable


retransmission)

Protocol TCP (Transmission Control Protocol) UDP (User Datagram Protocol)


example

Overhead More overhead (tracking connection) Less overhead

Example:

●​ Connection-Oriented: Like a phone call (talk after connection).​

●​ Connectionless: Like sending a letter (no confirmation).​

9. Explain the Distance Vector Routing algorithm in detail.


Distance Vector Routing is a routing algorithm where each router maintains a table (vector) showing the
best known distance to every destination.

Key Concepts:

1.​ Distance: Number of hops or cost to reach the destination.​

2.​ Vector: Routing table with distance to all destinations.​

3.​ Periodically Shared: Routers send their tables to neighboring routers.​

Steps:

1.​ Each router starts with its own routing table.​

2.​ Periodically, it sends the table to immediate neighbors.​

3.​ Each router updates its own table using the Bellman-Ford algorithm:​

○​ New distance = cost to neighbor + neighbor’s cost to destination.​

○​ Choose the shortest (minimum) distance.​

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.

There are two main approaches to packet switching:

1. Datagram Packet Switching:

●​ Each packet is treated independently.​

●​ Each has full destination address.​

●​ Packets may take different paths to reach the destination.​

●​ No guarantee of order or delivery.​

●​ Used in IP networks (Internet).​


Advantages:

●​ Efficient use of network.​

●​ Good for bursty data.​

Disadvantages:

●​ Packets may arrive out of order or get lost.​

2. Virtual Circuit Packet Switching:

●​ A logical path (virtual circuit) is set up before packets are sent.​

●​ All packets follow the same path.​

●​ Like circuit switching, but no physical path is reserved.​

Types:

●​ Switched Virtual Circuit (SVC): Temporary, created per session.​

●​ Permanent Virtual Circuit (PVC): Fixed path, like a leased line.​

Advantages:

●​ Ordered delivery of packets.​

●​ Less overhead per packet.​

Disadvantages:

●​ Setup time required before sending data.​

11. What is cryptography? Explain its basic mechanism and types.

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.

Basic Mechanism of Cryptography:

●​ Plaintext: The original readable message.​

●​ Encryption: Converting plaintext into unreadable ciphertext using an algorithm and a key.​

●​ Ciphertext: The encrypted message.​


●​ Decryption: Converting ciphertext back to plaintext using the key.​

Types of Cryptography:

1.​ Symmetric Key Cryptography:​

○​ Same key for encryption and decryption.​

○​ Fast and efficient.​

○​ Example: AES, DES.​

2.​ Asymmetric Key Cryptography:​

○​ Uses two keys: public key (encryption) and private key (decryption).​

○​ More secure but slower.​

○​ Example: RSA, ECC.​

3.​ Hash Functions:​

○​ No key is used.​

○​ Converts data to a fixed-size string (digest).​

○​ Used for data integrity (e.g., SHA-256, MD5).​

12. Discuss the difference between symmetric and asymmetric encryption.

Feature Symmetric Encryption Asymmetric Encryption

Keys Used One key (same for encryption & Two keys (public and private)
decryption)

Speed Faster Slower

Security Less secure (key must be shared) More secure (private key kept
secret)

Example AES, DES RSA, ECC


Algorithms
Use Case Encrypting large data Secure key exchange, digital
signatures

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.

Types of Network Topologies:

1.​ Bus Topology:​

○​ All devices share a single communication line.​

○​ Advantage: Easy and cheap to install.​

○​ Disadvantage: A failure in the main cable breaks the network.​

2.​ Star Topology:​

○​ All devices connect to a central hub.​

○​ Advantage: Easy to manage, one failure doesn't affect others.​

○​ Disadvantage: If the hub fails, the whole network fails.​

3.​ Ring Topology:​

○​ Devices are connected in a circular loop.​

○​ Advantage: Data flows in one direction; reduces collisions.​

○​ Disadvantage: A single break can stop the entire network.​

4.​ Mesh Topology:​

○​ Each device is connected to every other device.​

○​ Advantage: High fault tolerance.​

○​ Disadvantage: Expensive and complex.​


5.​ Tree Topology:​

○​ Hierarchical combination of star and bus.​

○​ Advantage: Scalable and manageable.​

○​ Disadvantage: Failure in higher nodes can impact lower nodes.​

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.

OSI Layers (from bottom to top):

1.​ Physical Layer:​

○​ Deals with transmission of raw bits.​

○​ Includes cables, switches, voltage levels.​

2.​ Data Link Layer:​

○​ Error detection, framing, and MAC addressing.​

○​ Example: Ethernet.​

3.​ Network Layer:​

○​ Responsible for routing and IP addressing.​

○​ Example: IP (Internet Protocol).​

4.​ Transport Layer:​

○​ Ensures reliable data transfer with error control and flow control.​

○​ Example: TCP, UDP.​

5.​ Session Layer:​

○​ Manages sessions between applications.​

○​ Maintains, opens, and closes communication.​

6.​ Presentation Layer:​

○​ Data translation, encryption, and compression.​

○​ Makes data understandable for the application layer.​


7.​ Application Layer:​

○​ Closest to users.​

○​ Provides services like email, file transfer, web browsing.​

○​ Example: HTTP, FTP, SMTP.​

15. Discuss the key differences between LAN, MAN, and WAN.

Feature LAN MAN WAN

Full Form Local Area Network Metropolitan Area Network Wide Area Network

Coverage Small (home, office) Medium (city) Large (country/world)


Area

Ownership Private May be private or public Mostly public

Speed High Moderate Comparatively low

Example Office network Cable TV network in a city Internet

Summary:

●​ LAN is best for small areas.​

●​ MAN is used to connect LANs in a city.​

●​ WAN connects devices over long distances, like the internet.​

16. Explain the Go-Back-N ARQ error control protocol.


Go-Back-N ARQ (Automatic Repeat reQuest) is an error-control protocol used in reliable data
communication.

How It Works:

●​ The sender can send multiple frames (up to a window size N) without waiting for an
acknowledgment (ACK).​

●​ The receiver keeps track of the next expected frame.​

●​ 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:

●​ Sender sends frames 0, 1, 2, 3, 4.​

●​ Receiver gets 0, 1, but frame 2 is lost.​

●​ Receiver discards frames 3 and 4.​

●​ Sender retransmits frames 2, 3, and 4.​

Advantages:

●​ Simple to implement.​

Disadvantages:

●​ Wastes bandwidth due to retransmission of correctly received frames.​

17. Explain the Selective Repeat ARQ protocol.

Selective Repeat ARQ improves on Go-Back-N by retransmitting only the erroneous or lost frames, not
the entire sequence.

How It Works:

●​ The sender can send multiple frames within a window.​

●​ The receiver stores correct frames even if they are out of order.​

●​ Only the incorrect or lost frames are retransmitted.​

●​ Receiver reorders the frames before passing them to the application layer.​

Example:
●​ Sender sends frames 0 to 4.​

●​ Frame 2 is lost, but 3 and 4 are received.​

●​ Receiver sends a NACK for frame 2.​

●​ Sender retransmits only frame 2, not 3 and 4.​

Advantages:

●​ Efficient use of bandwidth.​

Disadvantages:

●​ More complex to implement (requires buffers at the receiver).​

18. Describe the Stop-and-Wait ARQ mechanism.

Stop-and-Wait ARQ is the simplest error-control protocol.

How It Works:

●​ Sender sends one frame at a time and waits for an ACK.​

●​ If ACK is received, it sends the next frame.​

●​ If no ACK or a NACK is received, the sender retransmits the frame.​

Example:

●​ Sender → Frame 1 → Receiver​

●​ Receiver → ACK 1 → Sender​

●​ Sender sends Frame 2, and so on.​

Advantages:

●​ Simple and easy to implement.​

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:

1.​ SYN (Synchronize):​

○​ The client sends a SYN message to the server to initiate a connection and indicates its
sequence number (e.g., Seq = 100).​

2.​ SYN-ACK (Synchronize-Acknowledge):​

○​ The server replies with SYN-ACK, acknowledging the client’s SYN (Ack = 101) and
sending its own SYN (Seq = 200).​

3.​ ACK (Acknowledge):​

○​ The client responds with an ACK acknowledging the server's SYN (Ack = 201).​

After this, the connection is established and data transfer begins.

Why Needed?

●​ Ensures both sides are ready and agree on initial sequence numbers.​

20. What are the key differences between TCP and UDP?

Feature TCP (Transmission Control Protocol) UDP (User Datagram


Protocol)

Connection Connection-oriented Connectionless

Reliability Reliable (acknowledgments, Unreliable (no guarantee)


retransmissions)

Ordering Ensures packet order No ordering

Speed Slower due to overhead Faster

Use Cases Web, email, file transfer Video streaming, gaming, VoIP
Error Checking Yes Yes, but no recovery

Header Size Larger (20+ bytes) Smaller (8 bytes)

Summary:

●​ TCP is like a phone call — both parties talk in turn and confirm.​

●​ UDP is like sending a letter — it may or may not arrive.​

21. Discuss the performance issues of the transport layer.

The transport layer ensures reliable and efficient communication between devices. However, it faces
several performance issues:

1. Delay (Latency):

●​ Delay in data transmission due to network congestion or slow processing.​

●​ Affects real-time applications like video calls.​

2. Throughput:

●​ The rate at which data is successfully delivered.​

●​ Affects performance if too many retransmissions occur.​

3. Congestion:

●​ When too much data is sent too quickly, the network becomes congested.​

●​ Leads to packet loss and delay.​

4. Packet Loss:

●​ Some packets may get dropped due to congestion or errors.​

●​ Transport layer (like TCP) must detect and resend them.​

5. Flow Control:

●​ Prevents sender from overwhelming the receiver.​


●​ Poor flow control can cause buffer overflow and data loss.​

6. Error Control:

●​ Detects and corrects errors in transmission.​

●​ Adds extra processing and retransmission overhead.​

22. What is flow control? Explain its importance and mechanisms.

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:

●​ Prevents data loss due to buffer overflow.​

●​ Ensures smooth and efficient communication.​

●​ Maintains network stability.​

Mechanisms:

1. Stop-and-Wait:

●​ Sender sends one frame and waits for an acknowledgment.​

●​ Simple but slow.​

2. Sliding Window:

●​ Sender can send multiple frames before needing acknowledgment.​

●​ Receiver tells the sender how many frames it can accept.​

●​ More efficient for large data.​

3. Credit-Based Flow Control:

●​ Receiver gives the sender a “credit” or permission for how much data to send.​

●​ Once credit is used, sender must wait for more.​

23. Describe the different types of transmission media with their pros and cons.

1. Guided Media (Wired)


Type Description Pros Cons

Twisted Two wires twisted Cheap, easy to install Short range,


Pair Cable together (e.g., telephone vulnerable to
lines) interference

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

2. Unguided Media (Wireless)

Type Description Pros Cons

Radio Used in radio, TV, Wi-Fi Can travel long Affected by interference
Waves distances

Microwaves Line-of-sight transmission High bandwidth Weather-sensitive, needs


(e.g., satellite) clear path

Infrared Short-range (e.g., remote Secure, no Cannot penetrate walls,


controls) interference limited range

24. List and explain the protocols used for unicast routing.

Unicast routing means routing data from one sender to one specific receiver.

Common Unicast Routing Protocols:

1. RIP (Routing Information Protocol):

●​ Uses hop count as metric.​

●​ Max 15 hops allowed.​

●​ Simple, suitable for small networks.​

2. OSPF (Open Shortest Path First):


●​ Uses link state and Dijkstra’s algorithm.​

●​ Finds the shortest path using cost (bandwidth, delay).​

●​ Suitable for large networks.​

3. EIGRP (Enhanced Interior Gateway Routing Protocol):

●​ Cisco proprietary, combines features of RIP and OSPF.​

●​ Faster convergence and more reliable.​

4. BGP (Border Gateway Protocol):

●​ Used between autonomous systems on the internet.​

●​ Path vector protocol — selects best path based on various attributes.​

25. What is the Domain Name System (DNS)? Discuss the main divisions of domain
name space.

DNS (Domain Name System):

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.

How DNS Works:

1.​ You type a website name into your browser.​

2.​ DNS resolves it to the correct IP address.​

3.​ The browser connects to the IP and loads the site.​

Main Divisions of Domain Name Space:

1.​ Root Level:​

○​ Represented by a dot (.)​

○​ Top of the DNS hierarchy.​

2.​ Top-Level Domains (TLDs):​

○​ Examples: .com, .org, .net, .gov, .in​

○​ Categorized as:​

■​ Generic TLDs (gTLDs): .com, .edu​


■​ Country-code TLDs (ccTLDs): .in, .uk​

3.​ Second-Level Domains:​

○​ Directly below TLDs.​

○​ Example: In google.com, google is the second-level domain.​

4.​ Subdomains:​

○​ Further divisions under the second-level domain.​

○​ Example: mail.google.com — "mail" is a subdomain.​

26. Differentiate between static routing and dynamic routing

Feature Static Routing Dynamic Routing

Definition Routes are manually configured by Routes are automatically updated


the administrator using routing protocols

Configuration Manual Automatic

Adaptability Doesn’t adapt to changes in the Adapts to changes like link failure or
network congestion

Best For Small, simple networks Large, complex networks

Overhead No CPU or memory overhead Consumes CPU, memory, and


bandwidth

Protocols None (manually set) RIP, OSPF, EIGRP, BGP


Used

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.

We use the Shannon Capacity formula:

C=B⋅log⁡2(1+SN)C = B \cdot \log_2(1 + \frac{S}{N})

Where:

●​ CC = channel capacity (bps)​

●​ BB = bandwidth (Hz)​

●​ SN\frac{S}{N} = signal-to-noise ratio (SNR)​

Given:

●​ Signal Power S=100 WS = 100 \text{ W}​

●​ Noise Power N=10 WN = 10 \text{ W}​

●​ Data Rate C=10 kbps=10,000 bpsC = 10 \text{ kbps} = 10,000 \text{ bps}​

SNR = SN=10010=10\frac{S}{N} = \frac{100}{10} = 10

Now, plug values into the formula:

10,000=B⋅log⁡2(1+10)10,000 = B \cdot \log_2(1 + 10) 10,000=B⋅log⁡2(11)≈B⋅3.4610,000 = B \cdot \log_2(11)


\approx B \cdot 3.46 B=10,0003.46≈2,890 HzB = \frac{10,000}{3.46} \approx 2,890 \text{ Hz}

✅ Answer: Required bandwidth is approximately 2.89 kHz

28. Explain the concept of subnetting and its advantages

Subnetting:

Subnetting is the process of dividing a large network into smaller subnetworks (subnets).

Why Subnetting?

●​ Helps organize and manage IP addresses efficiently.​

●​ Reduces network traffic.​

●​ Improves security and performance.​

Example:

If a company owns a network 192.168.1.0/24, subnetting allows it to split into:


●​ 192.168.1.0/26 for HR​

●​ 192.168.1.64/26 for IT​

●​ and so on...​

Advantages of Subnetting:

1.​ Efficient IP Management: Prevents wastage of IP addresses.​

2.​ Improved Security: Different departments can be isolated.​

3.​ Reduced Congestion: Local traffic stays within the subnet.​

4.​ Simplified Troubleshooting: Easier to identify network problems.​

5.​ Customizable Network Design: Allocate addresses as per department needs.​

29. Draw and explain a network diagram illustrating the Link State Routing Algorithm

Link State Routing Algorithm:

●​ Each router builds a complete map (topology) of the network.​

●​ Routers use Dijkstra’s Algorithm to find the shortest path.​

Example Network Diagram:

/\

1 2

/ \

B C

\ /

1 3

\/

Step-by-Step Explanation (for Router A):

1.​ Router A knows its neighbors: B (1), C (2).​


2.​ Each router shares link state information with others.​

3.​ All routers build the same network graph.​

4.​ A uses Dijkstra’s Algorithm to compute:​

○​ 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.​

●​ Uses more memory and CPU than Distance Vector.​

●​ Protocol example: OSPF (Open Shortest Path First)​

30. Explain the concept and importance of Quality of Service (QoS) in networks

Quality of Service (QoS):

QoS refers to a set of techniques used to manage network traffic and guarantee performance for
critical applications.

Why is QoS Important?

●​ In real-time services like video calls, online games, and VoIP, delay or packet loss can affect
quality.​

●​ QoS ensures smooth, reliable, and prioritized communication.​

QoS Parameters:

1.​ Bandwidth – Data transfer capacity.​

2.​ Latency (Delay) – Time taken for a packet to reach destination.​

3.​ Jitter – Variation in packet delay.​

4.​ Packet Loss – Number of dropped packets.​

QoS Techniques:

●​ Traffic Shaping – Controls the rate of outgoing traffic.​

●​ Prioritization – Gives priority to important traffic (e.g., VoIP).​


●​ Resource Reservation – Reserves bandwidth using protocols like RSVP.​

●​ Congestion Management – Uses queues to manage excess traffic.​

✅ Conclusion:​
QoS ensures that critical applications get the required performance, making networks more efficient
and reliable.

31. Describe various congestion control techniques used in computer networks

Congestion control is vital to prevent network performance degradation due to overloaded links. Different
techniques are used to manage and control congestion:

1. Open Loop Control:

●​ 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.​

2. Closed Loop Control:

●​ In this method, the network responds to congestion signals from routers and adjusts the sending
rate accordingly.​

●​ Example: TCP Congestion Control.​

TCP Congestion Control includes:

●​ 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 Retransmit: If a packet is lost, the sender retransmits it quickly.​

●​ Fast Recovery: After detecting packet loss, TCP reduces the window size and gradually increases
it again.​

3. Random Early Detection (RED):

●​ A router monitors buffer occupancy and drops packets early to signal congestion before the buffer
fills up completely.​

4. Explicit Congestion Notification (ECN):


●​ ECN allows routers to mark packets instead of dropping them, which notifies the sender of
impending congestion.​

32. What is the transmission time for a 2-million-byte packet over a 300 kbps
channel?

To calculate the transmission time, we use the formula:

Transmission Time=Packet SizeTransmission Rate\text{Transmission Time} = \frac{\text{Packet


Size}}{\text{Transmission Rate}}

Given:

●​ Packet Size = 2 million bytes = 2,000,000×82,000,000 \times 8 bits = 16,000,000 bits​

●​ Transmission Rate = 300 kbps = 300,000 bps​

Transmission Time=16,000,000 bits300,000 bps=53.33 seconds\text{Transmission Time} = \frac{16,000,000


\, \text{bits}}{300,000 \, \text{bps}} = 53.33 \, \text{seconds}

✅ Answer: The transmission time is 53.33 seconds.

33. How is flow control achieved in the transport layer?

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:

1. Sliding Window Protocol:

●​ 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.​

●​ Commonly used in TCP to manage the flow of data.​

2. Window Size Adjustment:

●​ 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.​

●​ This ensures that the receiver is not flooded with data.​

4. TCP Flow Control:

●​ 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.​

34. Briefly discuss data link layer design issues

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.​

2. Error Detection and Correction:

●​ The data link layer is responsible for detecting and correcting errors in the transmitted data.​

●​ Common methods: CRC (Cyclic Redundancy Check), Parity Bit, Checksums.​

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.​

4. Medium Access Control (MAC):

●​ 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.​

●​ It provides direct addressing for devices on the same local network.​

6. Error Recovery:

●​ Ensures that lost or corrupted frames are retransmitted.​


35. What are the applications of firewalls in network security?

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.​

3. Proxying and Network Address Translation (NAT):

●​ Firewalls can act as a proxy to hide the internal network structure.​

●​ 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).​

6. Intrusion Detection and Prevention:

●​ Some firewalls incorporate Intrusion Detection Systems (IDS) and Intrusion Prevention
Systems (IPS) to detect and prevent unauthorized or malicious traffic.​

7. Application Layer Filtering:

●​ 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 Configuration: DHCP dynamically assigns IP addresses and network configuration to


clients.​

●​ Dynamic IP Addressing: DHCP can assign temporary IP addresses (leases) to devices and renew
them as needed.​

●​ Multiple Configuration Options: In addition to assigning IP addresses, DHCP can configure


options such as DNS servers, default gateway, and more.​

●​ Supports BOOTP: DHCP is backward compatible with BOOTP and can handle booting of diskless
clients as well.​

Key Differences:

●​ BOOTP is static, while DHCP is dynamic.​

●​ 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:

●​ Description: All devices are connected to a single central cable (bus).​

●​ Advantages:​

○​ Easy and inexpensive to implement.​


○​ Requires less cable compared to other topologies.​

●​ Disadvantages:​

○​ A failure in the bus cable affects the whole network.​

○​ Difficult to troubleshoot.​

○​ Performance degrades with heavy traffic.​

2. Star Topology:

●​ Description: All devices are connected to a central device, such as a switch or hub.​

●​ Advantages:​

○​ Easy to manage and add new devices.​

○​ If one device fails, the rest of the network remains unaffected.​

●​ Disadvantages:​

○​ Central device failure can bring down the entire network.​

○​ Requires more cabling.​

3. Ring Topology:

●​ Description: Each device is connected to two other devices, forming a ring.​

●​ Advantages:​

○​ Efficient data transmission, as data travels in one direction.​

○​ Simple to implement in smaller networks.​

●​ Disadvantages:​

○​ A failure in any device or connection breaks the network.​

○​ Troubleshooting can be difficult.​

4. Mesh Topology:

●​ Description: Every device is connected to every other device in the network.​

●​ Advantages:​

○​ High redundancy and fault tolerance.​

○​ Data can take multiple paths, reducing the chance of network failure.​
●​ Disadvantages:​

○​ Very expensive due to the high number of connections.​

○​ Complex to set up and maintain.​

5. Tree Topology:

●​ Description: A hybrid topology combining bus and star topologies, with groups of star networks
connected in a hierarchical manner.​

●​ Advantages:​

○​ Scalable and easy to manage.​

○​ Suitable for large networks.​

●​ Disadvantages:​

○​ If the central device fails, it can disrupt the whole branch of the network.​

○​ Requires more cabling.​

38. Compare IPv4 and IPv6 headers in detail.

IPv4 Header:

●​ Length: 20-60 bytes.​

●​ Fields:​

1.​ Version: 4 bits (IPv4).​

2.​ Header Length: 4 bits (specifies the length of the header).​

3.​ Type of Service (ToS): 8 bits (used for QoS).​

4.​ Total Length: 16 bits (length of the entire packet).​

5.​ Identification: 16 bits (used for fragmenting packets).​

6.​ Flags: 3 bits (used for fragmentation).​

7.​ Fragment Offset: 13 bits (position of fragment in the original packet).​

8.​ Time to Live (TTL): 8 bits (limits packet lifetime).​

9.​ Protocol: 8 bits (identifies the higher-layer protocol).​

10.​Header Checksum: 16 bits (error-checking the header).​


11.​Source Address: 32 bits (source IP address).​

12.​Destination Address: 32 bits (destination IP address).​

13.​Options: Variable length (optional additional data).​

IPv6 Header:

●​ Length: 40 bytes (fixed length).​

●​ Fields:​

1.​ Version: 4 bits (IPv6).​

2.​ Traffic Class: 8 bits (used for QoS).​

3.​ Flow Label: 20 bits (used for efficient routing).​

4.​ Payload Length: 16 bits (size of the payload).​

5.​ Next Header: 8 bits (specifies the next header type).​

6.​ Hop Limit: 8 bits (similar to TTL in IPv4).​

7.​ Source Address: 128 bits (source IP address).​

8.​ Destination Address: 128 bits (destination IP address).​

Key Differences:

●​ IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses.​

●​ IPv6 eliminates the checksum field.​

●​ IPv6 supports better security and routing efficiency.​

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:

1.​ Layer 1: Physical Layer:​

○​ Function: Deals with the physical transmission of data over the network medium.​

○​ Examples: Cables, switches, hubs, and electrical signals.​

○​ Example Devices: Ethernet cables, fiber optics.​

2.​ Layer 2: Data Link Layer:​


○​ Function: Provides error-free transfer of data frames between nodes on the same network.​

○​ Examples: Ethernet, Wi-Fi.​

○​ Example Devices: Network Interface Cards (NICs), switches.​

3.​ Layer 3: Network Layer:​

○​ Function: Responsible for packet forwarding, routing, and logical addressing (IP addresses).​

○​ Examples: IP, ICMP (for error reporting).​

○​ Example Devices: Routers.​

4.​ Layer 4: Transport Layer:​

○​ Function: Ensures reliable data transfer between devices, handling error correction and flow
control.​

○​ Examples: TCP, UDP.​

○​ Example Devices: End systems (computers, servers).​

5.​ Layer 5: Session Layer:​

○​ Function: Manages sessions or connections between applications.​

○​ Examples: NetBIOS, RPC.​

○​ Example Devices: None specific, it's an application-level service.​

6.​ Layer 6: Presentation Layer:​

○​ Function: Translates data into a format understandable by the application, including


encryption and compression.​

○​ Examples: JPEG, SSL/TLS.​

○​ Example Devices: None specific.​

7.​ Layer 7: Application Layer:​

○​ Function: Provides network services directly to end users and applications.​

○​ Examples: HTTP, FTP, SMTP.​

○​ Example Devices: Web browsers, email clients.​

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.​

●​ Limitation: It can only detect single-bit errors, not multiple-bit errors.​

2. Cyclic Redundancy Check (CRC):

●​ Description: CRC uses polynomial division to detect errors in data transmission.​

●​ 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.​

●​ Advantages: Detects multiple-bit errors and provides high reliability.​

●​ Common Use: Ethernet frames, disk storage devices.​

41. What are the main applications of computer networks in real life?

●​ Communication: Email, instant messaging, video conferencing.​

●​ 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.​

●​ Multimedia: Streaming services for audio, video, and online gaming.​

●​ 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).

IP Header Structure (IPv4):

1.​ Version: 4 bits (indicates the version of IP, usually 4).​


2.​ Header Length: 4 bits (specifies the length of the IP header).​

3.​ Type of Service: 8 bits (provides QoS information).​

4.​ Total Length: 16 bits (length of the entire IP packet).​

5.​ Identification: 16 bits (identifies the packet, used for fragmentation).​

6.​ Flags: 3 bits (used for fragmentation).​

7.​ Fragment Offset: 13 bits (indicates where the fragment belongs).​

8.​ Time to Live (TTL): 8 bits (limits the packet's lifespan).​

9.​ Protocol: 8 bits (indicates the higher-layer protocol, e.g., TCP or UDP).​

10.​Header Checksum: 16 bits (checks for errors in the header).​

11.​Source Address: 32 bits (source IP address).​

12.​Destination Address: 32 bits (destination IP address).​

13.​Options: Variable length (optional field for various additional features).​

ARP (Address Resolution Protocol):

●​ 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?"​

2.​ The device with IP X responds with its MAC address.​

3.​ The requesting device stores the mapping in its ARP table for future communication.​

You might also like