🌐

Computer Networks MCQ

Test your Computer Networks knowledge with 100 multiple choice questions covering fundamentals to advanced concepts, with instant feedback and explanations.

100 Questions 40 Beginner 40 Intermediate 20 Advanced

How This Practice Test Works

Every question below expands right on this page — click a question to reveal its four options, pick the one you think is correct, and you'll get instant feedback along with the correct answer and a short explanation of the reasoning. Questions are grouped by difficulty, so start with the 40 beginner questions to confirm your fundamentals, work through the 40 intermediate ones, and finish with the 20 advanced questions that mirror what exams and technical screenings actually ask. There's no sign-up, no timer, and no limit — retake the test as often as you like.

Curated by Tech Baithak Editorial Team  ·  Last updated: June 2026

1

What does IP stand for in networking?

A

Correct Answer

Internet Protocol

Explanation

IP (Internet Protocol) is the principal communications protocol responsible for delivering packets across network boundaries based on IP addresses.

2

What is the purpose of the OSI model?

B

Correct Answer

A conceptual framework dividing network communication into 7 layers, each with distinct functions

Explanation

The OSI (Open Systems Interconnection) model has 7 layers: Physical, Data Link, Network, Transport, Session, Presentation, Application. It is a reference model; TCP/IP maps to it roughly.

3

What layer of the OSI model does IP operate at?

C

Correct Answer

Network (Layer 3)

Explanation

IP operates at the Network layer (Layer 3), responsible for logical addressing and routing packets between networks.

4

What is a MAC address?

B

Correct Answer

A unique 48-bit hardware address assigned to network interface cards at manufacture

Explanation

MAC (Media Access Control) addresses are 48-bit hardware addresses (e.g., AA:BB:CC:DD:EE:FF) used at the Data Link layer for communication within a local network.

5

What does DNS stand for?

C

Correct Answer

Domain Name System

Explanation

DNS translates human-readable domain names (google.com) into IP addresses (142.250.80.46), acting as the internet's phone book.

6

What is the purpose of DHCP?

A

Correct Answer

Dynamically assigning IP addresses to devices on a network

Explanation

DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses, subnet masks, default gateways, and DNS servers to devices joining a network.

7

What is a router?

B

Correct Answer

A device that forwards packets between different networks using IP addresses

Explanation

Routers operate at Layer 3 (Network layer) and route packets between different networks (e.g., LAN to internet) based on routing tables and IP addresses.

8

What is a switch?

B

Correct Answer

A Layer 2 device that forwards frames within a LAN using MAC address tables

Explanation

Switches learn MAC addresses and forward frames only to the correct port, unlike hubs that broadcast to all ports. Switches operate at the Data Link layer.

9

What is TCP and how does it differ from UDP?

B

Correct Answer

TCP provides reliable, ordered, connection-oriented delivery; UDP is connectionless with no delivery guarantees but lower overhead

Explanation

TCP (connection-oriented, with handshake, acknowledgments, retransmissions) is used for reliable data like web pages and email. UDP (connectionless, no guarantees) is used for real-time apps like video calls.

10

What is an IP address?

B

Correct Answer

A logical address uniquely identifying a device on a network, used for routing

Explanation

IPv4 addresses are 32-bit numbers (e.g., 192.168.1.1). IPv6 addresses are 128-bit. IP addresses identify devices and are used by routers to forward packets.

11

What is the difference between IPv4 and IPv6?

B

Correct Answer

IPv4 uses 32-bit addresses (4.3 billion); IPv6 uses 128-bit addresses (340 undecillion)

Explanation

IPv4 address exhaustion drove IPv6 adoption. IPv6 has 128-bit addresses, built-in IPSec support, stateless auto-configuration, and eliminates NAT need.

12

What is NAT (Network Address Translation)?

B

Correct Answer

Converting private IP addresses to public IP addresses for internet communication, allowing multiple devices to share one public IP

Explanation

NAT allows multiple devices with private IPs (192.168.x.x) to share a single public IP address. The router modifies source addresses in outgoing packets and reverses them for incoming packets.

13

What is a firewall?

B

Correct Answer

A network security device or software that monitors and filters incoming/outgoing traffic based on rules

Explanation

Firewalls filter traffic based on IP addresses, ports, protocols, and state. Packet-filtering, stateful inspection, and next-generation firewalls (NGFW) offer increasing sophistication.

14

What is a VPN?

B

Correct Answer

A Virtual Private Network creating an encrypted tunnel over a public network for secure communication

Explanation

VPNs encrypt traffic between a client and VPN server, providing privacy, anonymity, and secure access to remote networks as if directly connected.

15

What is HTTP?

B

Correct Answer

HyperText Transfer Protocol — the application-layer protocol for fetching resources (web pages, images) on the World Wide Web

Explanation

HTTP uses a request-response model. The client sends HTTP methods (GET, POST, PUT, DELETE) and the server responds with status codes (200 OK, 404 Not Found) and data.

16

What is HTTPS and why is it important?

B

Correct Answer

HTTP secured with TLS/SSL encryption, authenticating the server and encrypting data in transit

Explanation

HTTPS encrypts HTTP traffic using TLS, preventing eavesdropping and MITM attacks. The TLS handshake authenticates the server via certificates and establishes a shared session key.

17

What is a subnet mask?

B

Correct Answer

A 32-bit number that divides an IP address into network and host portions

Explanation

Subnet mask 255.255.255.0 (/24 in CIDR) means the first 24 bits are the network portion and the last 8 bits identify hosts within that subnet (256 addresses).

18

What does FTP stand for and what is it used for?

B

Correct Answer

File Transfer Protocol — for transferring files between client and server over a network

Explanation

FTP operates on ports 20 (data) and 21 (control), providing file upload/download. SFTP (over SSH) and FTPS (FTP over TLS) are secure alternatives.

19

What is the loopback address in networking?

B

Correct Answer

127.0.0.1 (IPv4) or ::1 (IPv6) — a virtual address routing traffic back to the same host

Explanation

The loopback address (127.0.0.1) allows a host to communicate with itself. Used for testing network applications without actual network hardware.

20

What is the default port number for HTTP?

D

Correct Answer

80

Explanation

HTTP uses port 80 by default. HTTPS uses port 443. Ports identify specific network services on a host.

21

What is a LAN?

B

Correct Answer

A Local Area Network connecting devices within a limited geographic area like a home or office

Explanation

LANs (Local Area Networks) use Ethernet (wired) or Wi-Fi (wireless), typically owned by a single organization, with speeds from 100 Mbps to 100 Gbps.

22

What is a WAN?

B

Correct Answer

A Wide Area Network spanning large geographic areas, typically using leased lines or internet infrastructure

Explanation

WANs (e.g., the internet, corporate WANs) connect multiple LANs across cities or countries. They use technologies like MPLS, Frame Relay, and SD-WAN.

23

What is ping used for?

B

Correct Answer

Testing reachability and round-trip time to a host using ICMP Echo Request/Reply messages

Explanation

ping sends ICMP Echo Request packets and measures the time for Echo Reply to return (RTT). Used to test connectivity and measure latency.

24

What is the purpose of the ARP protocol?

B

Correct Answer

Resolving IP addresses to MAC addresses on a local network

Explanation

ARP (Address Resolution Protocol) broadcasts "Who has IP x.x.x.x?" and receives the corresponding MAC address for Data Link layer communication within a subnet.

25

What is a broadcast address?

B

Correct Answer

A special IP address (all host bits set to 1) used to send packets to all devices on a subnet

Explanation

For subnet 192.168.1.0/24, the broadcast address is 192.168.1.255. Packets sent to this address are delivered to all devices on the subnet.

26

What is SSH?

B

Correct Answer

Secure Shell — an encrypted protocol for secure remote login and command execution

Explanation

SSH (port 22) replaces insecure Telnet/rlogin, providing encrypted shell access, port forwarding, and secure file transfer (SFTP/SCP) using public-key or password authentication.

27

What is SMTP used for?

B

Correct Answer

Sending email — Simple Mail Transfer Protocol operating on port 25 (or 587 for submission)

Explanation

SMTP sends email from clients to servers and between servers. IMAP (port 993) and POP3 (port 995) are used to retrieve email from servers.

28

What is the purpose of ICMP?

B

Correct Answer

Internet Control Message Protocol — carrying error messages and operational information (ping, traceroute) at the network layer

Explanation

ICMP (Layer 3) carries messages like "host unreachable," "time exceeded" (used by traceroute), and Echo Request/Reply (ping). Not for data transfer.

29

What is bandwidth in networking?

B

Correct Answer

The maximum data transfer rate of a network connection, measured in bits per second

Explanation

Bandwidth is the capacity of a network link (e.g., 1 Gbps Ethernet). Throughput is actual achieved data rate, always ≤ bandwidth. Latency is delay — different from bandwidth.

30

What is a proxy server?

B

Correct Answer

An intermediary server that forwards client requests to other servers, providing caching, filtering, or anonymity

Explanation

Proxy servers sit between clients and servers. Forward proxies serve clients (caching, filtering). Reverse proxies serve servers (load balancing, SSL termination). Transparent proxies don't modify requests.

31

What is a port number in networking?

B

Correct Answer

A 16-bit number identifying a specific process or service on a host, enabling multiple services on one IP address

Explanation

Ports (0-65535) identify application-layer services. Well-known ports (0-1023): HTTP=80, HTTPS=443, SSH=22, FTP=21. Source ports (ephemeral) identify connections from clients.

32

What is traceroute used for?

B

Correct Answer

Discovering the path packets take from source to destination by incrementing TTL and mapping each hop

Explanation

Traceroute sends packets with TTL=1,2,3... Each router decrements TTL; on TTL=0, it sends "Time Exceeded" ICMP back. This maps each hop's IP address and latency.

33

What is the difference between TCP and UDP connection setup?

B

Correct Answer

TCP uses a 3-way handshake (SYN, SYN-ACK, ACK) to establish a connection; UDP is connectionless with no handshake

Explanation

TCP's 3-way handshake: client sends SYN, server responds SYN-ACK, client sends ACK. This establishes connection state. UDP sends data immediately without setup.

34

What is Ethernet?

B

Correct Answer

A family of wired networking standards (IEEE 802.3) operating at the Data Link layer, using CSMA/CD

Explanation

Ethernet is the dominant wired LAN technology. It uses frames with MAC addresses. Modern Ethernet (1000BASE-T, 10GBASE-T) uses star topology with switches rather than shared bus.

35

What is Wi-Fi?

B

Correct Answer

A wireless networking technology (IEEE 802.11) allowing devices to connect to networks via radio waves

Explanation

Wi-Fi standards: 802.11n (Wi-Fi 4), 802.11ac (Wi-Fi 5, 5GHz, up to 3.5 Gbps), 802.11ax (Wi-Fi 6, 2.4/5/6GHz). Uses access points for infrastructure mode.

36

What does SSL/TLS do?

B

Correct Answer

Provides cryptographic security: authentication via certificates and encryption of data in transit

Explanation

TLS (Transport Layer Security, the successor to SSL) establishes encrypted channels using asymmetric cryptography for key exchange and symmetric encryption for data. Used by HTTPS, SMTP, and more.

37

What is a hub and how does it differ from a switch?

B

Correct Answer

A hub broadcasts all frames to all ports; a switch forwards frames only to the destination port based on MAC tables

Explanation

Hubs create a collision domain — all ports share bandwidth. Switches learn MAC addresses and create separate collision domains per port, dramatically improving performance.

38

What is a collision domain?

B

Correct Answer

A network segment where simultaneous transmissions cause collisions and require retransmission

Explanation

In Ethernet (CSMA/CD), devices in the same collision domain contend for the shared medium. Switches separate collision domains per port. Hubs extend collision domains.

39

What is BGP?

B

Correct Answer

Border Gateway Protocol — the routing protocol used between autonomous systems on the internet

Explanation

BGP (the "protocol of the internet") manages how packets are routed between different networks (autonomous systems, ASes). ISPs and large organizations use BGP to exchange routing information.

40

What is the purpose of a default gateway?

B

Correct Answer

The router IP address that devices use to forward packets destined for networks outside their local subnet

Explanation

When a device wants to communicate with an IP outside its subnet, it sends the packet to the default gateway (usually the router). The router then forwards it toward the destination.

1

What is OSPF and what algorithm does it use to compute routes?

D

Correct Answer

Open Shortest Path First — a link-state interior gateway protocol that floods link-state advertisements and uses Dijkstra's shortest-path-first algorithm to build a routing table

Explanation

OSPF routers exchange link-state advertisements (LSAs) to build an identical topology database, then each independently runs Dijkstra's algorithm to compute shortest paths, supporting areas and VLSM for scalability.

2

What is the TCP 3-way handshake and why is it necessary?

B

Correct Answer

The 3-way handshake (SYN→SYN-ACK→ACK) synchronizes sequence numbers between client and server, establishing a reliable bidirectional connection

Explanation

SYN: client proposes initial seq num. SYN-ACK: server acknowledges and proposes its own seq num. ACK: client acknowledges server. This establishes seq nums needed for reliable, ordered delivery.

3

What is TCP slow start?

B

Correct Answer

A congestion control mechanism that begins with a small congestion window and doubles it each RTT until loss or ssthresh is reached

Explanation

TCP slow start exponentially increases the congestion window (cwnd) each round until either a packet loss occurs (drops cwnd to 1 or half) or ssthresh is reached (switches to congestion avoidance).

4

What is the difference between stateful and stateless firewalls?

B

Correct Answer

Stateful firewalls track connection state and allow return traffic automatically; stateless evaluate each packet independently without context

Explanation

Stateful inspection tracks TCP/UDP connections in a state table. Return packets matching established connections are automatically allowed. Stateless firewalls apply rules to each packet independently (faster but less context-aware).

5

What is VLAN (Virtual LAN)?

B

Correct Answer

A logical network segment on a physical switch, isolating broadcast domains without separate hardware

Explanation

VLANs segment a physical switch into multiple logical networks using 802.1Q VLAN tags. Devices in different VLANs cannot communicate without a router (Layer 3 switch) handling inter-VLAN routing.

6

What is the difference between distance vector and link-state routing?

B

Correct Answer

Distance vector routers know only next-hop and cost (Bellman-Ford); link-state routers know the full topology and use Dijkstra

Explanation

Distance vector (RIP): slow convergence, count-to-infinity problem. Link-state (OSPF, IS-IS): routers flood topology info, build a complete map, faster convergence, more scalable.

7

What is QoS (Quality of Service)?

B

Correct Answer

Mechanisms for prioritizing network traffic to guarantee bandwidth, latency, and packet loss targets for specific applications

Explanation

QoS uses traffic classification, queuing disciplines (WFQ, DSCP/DiffServ marking), shaping, and policing to prioritize voice/video over bulk traffic to meet SLA requirements.

8

What is the difference between TCP Reno and TCP CUBIC?

B

Correct Answer

TCP Reno uses linear growth in congestion avoidance; TCP CUBIC uses a cubic function for faster bandwidth utilization on high-BDP links

Explanation

CUBIC (Linux default) maintains a cubic window growth function based on elapsed time since last loss, independently of RTT. It better utilizes high-bandwidth, high-latency links than Reno's RTT-dependent additive increase.

9

What is a CDN (Content Delivery Network)?

B

Correct Answer

A distributed network of servers caching content close to users, reducing latency and origin server load

Explanation

CDNs (Cloudflare, Akamai, CloudFront) distribute content to edge nodes worldwide. DNS returns the IP of the nearest edge server, reducing latency from 200ms+ to <20ms for cached content.

10

What is the difference between TCP half-close and full-close?

B

Correct Answer

Half-close: one side finishes sending and sends FIN while still receiving (unidirectional close); full-close: both sides send FIN (4-way handshake)

Explanation

TCP teardown uses a 4-way handshake: FIN→ACK→FIN→ACK. Each side independently closes its sending direction, allowing half-duplex close when one side is done sending but still receiving.

11

What is MPLS (Multi-Protocol Label Switching)?

B

Correct Answer

A technique routing packets based on short labels rather than IP addresses, improving forwarding speed and enabling traffic engineering

Explanation

MPLS adds a label between Layer 2/3 headers. Label-switching routers forward based on labels (faster than IP lookup). Used by ISPs for traffic engineering, VPNs, and QoS.

12

What is network address translation and what problems does it create?

B

Correct Answer

NAT breaks end-to-end connectivity (peers can't initiate connections to NATed devices), complicates protocols embedding IPs in payloads, and requires hole punching for P2P

Explanation

NAT breaks the internet's end-to-end model. Protocols like FTP (PORT command embeds IP) and SIP/VoIP need ALGs. P2P requires NAT traversal (STUN/TURN/ICE) for hole punching.

13

What is the CAP theorem in distributed systems?

B

Correct Answer

A distributed systems theorem: a system can guarantee at most two of Consistency, Availability, and Partition tolerance simultaneously

Explanation

CAP (Brewer): during a network partition, a distributed system must choose between Consistency (all nodes see same data) or Availability (every request gets a response). Partition tolerance is required in real networks.

14

What is QUIC and why was it developed?

B

Correct Answer

A Google-developed transport protocol over UDP, providing TLS encryption, multiplexed streams, and zero-RTT connection establishment

Explanation

QUIC (now standardized as RFC 9000, used by HTTP/3) runs over UDP, eliminating TCP head-of-line blocking. It integrates TLS 1.3 for 0-RTT/1-RTT setup and supports connection migration.

15

What is SDN (Software-Defined Networking)?

B

Correct Answer

An architecture separating the control plane (centralized controller) from the data plane (forwarding devices), enabling programmable network management

Explanation

SDN decouples the control plane (routing decisions) from the data plane (packet forwarding). Controllers (OpenDaylight, ONOS) program switches via OpenFlow, enabling dynamic traffic engineering.

16

What is the difference between routing and forwarding?

B

Correct Answer

Routing builds and maintains routing tables (slow, per-destination); forwarding is the per-packet lookup and switching in hardware (fast)

Explanation

Routing protocols (OSPF, BGP) compute paths and populate routing tables (control plane). Forwarding uses the table to switch packets in hardware (data plane, ASICs, nanoseconds per packet).

17

What is HTTP/2 and how does it improve on HTTP/1.1?

B

Correct Answer

HTTP/2 enables multiplexed streams over a single TCP connection, header compression (HPACK), server push, and binary framing — eliminating HTTP/1.1 head-of-line blocking

Explanation

HTTP/1.1 opens multiple TCP connections for parallelism. HTTP/2 multiplexes many streams over one connection, uses HPACK for header compression, and allows server push for proactive resource delivery.

18

What is a three-tier network architecture?

B

Correct Answer

A hierarchical LAN design with access, distribution, and core layers, each with distinct functions

Explanation

Core (high-speed backbone), Distribution (routing, filtering, aggregation), Access (connects end devices). This hierarchical design scales from small LANs to large enterprise networks.

19

What is BGP route hijacking?

B

Correct Answer

An attack where a malicious AS advertises more specific or fake routes to attract traffic, causing misdirection or interception

Explanation

BGP route hijacking (e.g., Pakistan Telecom 2008 YouTube outage) occurs when a router advertises more specific prefixes. RPKI (Resource Public Key Infrastructure) helps prevent this by cryptographically validating route origins.

20

What is a TCP window and flow control?

B

Correct Answer

The receive window size advertised by the receiver limits how much unacknowledged data the sender can have in flight, preventing receiver buffer overflow

Explanation

The receiver advertises rwnd (receive window) in ACKs. The sender limits in-flight bytes to min(cwnd, rwnd). Flow control prevents overwhelming the receiver; congestion control prevents overwhelming the network.

21

What is anycast and how is it used?

B

Correct Answer

A routing scheme where the same IP address is assigned to multiple servers, and routers direct traffic to the nearest one

Explanation

Anycast assigns the same IP to servers worldwide. BGP routing naturally sends packets to the topologically nearest server. Used by DNS root servers (13 "addresses," hundreds of servers worldwide) and CDNs.

22

What is the difference between EIGRP and OSPF?

B

Correct Answer

EIGRP (Cisco proprietary, DUAL algorithm) is faster but vendor-locked; OSPF (open standard, Dijkstra) is widely supported and scalable for multi-vendor networks

Explanation

EIGRP uses a composite metric (bandwidth, delay, reliability) and DUAL algorithm — fast convergence. OSPF is an open standard supporting VLSM, areas for scalability, and multi-vendor interoperability.

23

What is the purpose of spanning tree protocol (STP)?

B

Correct Answer

Preventing Layer 2 switching loops in redundant topologies by blocking redundant paths and electing a root bridge

Explanation

STP (IEEE 802.1D) elects a root bridge and blocks redundant paths, preventing broadcast storms. RSTP (802.1w) converges faster (~1-2 seconds vs 30-50 for STP).

24

What is DNS caching and TTL?

B

Correct Answer

Recursive resolvers cache DNS responses for the TTL (time-to-live) period, reducing repeated queries to authoritative servers

Explanation

DNS TTL is set by zone administrators (e.g., 3600 seconds). Resolvers cache answers until TTL expires, reducing load on authoritative servers. Short TTLs enable faster propagation of changes but increase query load.

25

What is network slicing in 5G?

B

Correct Answer

Creating multiple virtual networks on shared physical 5G infrastructure, each with different QoS guarantees for different use cases

Explanation

5G network slicing uses SDN/NFV to create isolated virtual networks: one slice for low-latency IoT (1ms), another for mobile broadband (high throughput), another for critical infrastructure (ultra-reliable).

26

What is the difference between circuit switching and packet switching?

B

Correct Answer

Circuit switching reserves a dedicated path for the duration; packet switching multiplexes packets from multiple connections on shared links

Explanation

PSTN uses circuit switching (dedicated bandwidth, predictable delay). The internet uses packet switching (better resource utilization, bursty traffic, variable delay). Circuit switching is wasteful for idle periods.

27

What is a socket in networking?

B

Correct Answer

A software endpoint combining IP address and port number, representing one end of a network connection

Explanation

A socket is identified by (IP, port, protocol). A connection is identified by the 5-tuple: (src IP, src port, dst IP, dst port, protocol). Applications use socket APIs (BSD sockets) to communicate over networks.

28

What is DNSSEC?

B

Correct Answer

DNS Security Extensions — cryptographic signatures on DNS records to detect forged responses and prevent DNS cache poisoning

Explanation

DNSSEC signs DNS records with private keys. Resolvers verify signatures using the public key chain from the root. It prevents Kaminsky-style DNS cache poisoning attacks by ensuring response authenticity.

29

What is load balancing and what algorithms are used?

B

Correct Answer

Distributing network traffic across multiple servers using algorithms like round-robin, least connections, or IP hash to improve availability and performance

Explanation

Load balancers (L4: transport layer, L7: application layer) distribute requests. Round-robin (simple), least connections (considers active load), IP hash (session persistence), weighted (server capacity differences).

30

How do you calculate the number of usable hosts in a subnet given a CIDR prefix?

C

Correct Answer

2^(host bits) − 2, subtracting the network address and broadcast address from the total addresses in the subnet

Explanation

A /26 subnet has 6 host bits, giving 2^6 = 64 total addresses. Subtracting the network address and broadcast address leaves 62 usable host addresses — the standard formula is 2^(host bits) − 2.

31

What problem does the count-to-infinity issue cause in distance-vector routing, and how is it mitigated?

D

Correct Answer

Routers can loop, slowly incrementing a route's hop count toward infinity after a link fails; mitigated with techniques like split horizon, route poisoning, and hold-down timers

Explanation

When a route disappears, distance-vector routers may keep advertising stale routes to each other, incrementing the metric each time. Split horizon (don't advertise a route back to where it came from) and route poisoning (advertise a failed route with infinite metric) prevent these loops.

32

What is the purpose of the TTL (Time to Live) field in an IP header?

D

Correct Answer

It limits how long a packet can remain in the network by decrementing at each hop, preventing packets from looping forever

Explanation

Each router decrements the TTL field by one; when it reaches zero, the packet is discarded and an ICMP Time Exceeded message is returned. This prevents undeliverable packets from circulating indefinitely due to routing loops.

33

How does Path MTU Discovery work and why does it matter?

C

Correct Answer

It sends packets with the Don't Fragment bit set and uses ICMP "Fragmentation Needed" replies to find the smallest MTU along a path, avoiding costly IP fragmentation

Explanation

A sender transmits with the Don't Fragment flag; if a router's outgoing link MTU is smaller, it drops the packet and returns an ICMP message reporting its MTU. The sender reduces packet size accordingly, avoiding fragmentation overhead and potential black holes.

34

What is the difference between a recursive and an iterative DNS query?

C

Correct Answer

In a recursive query, the resolver does all the work and returns a final answer to the client; in an iterative query, each server returns either the answer or a referral to another server, leaving the requester to continue querying

Explanation

Clients typically send recursive queries to a resolver, which then performs iterative queries — starting at root servers, then TLD servers, then authoritative servers — following referrals until it gets the final answer to return to the client.

35

What is the function of a Layer 3 switch, and how does it differ from a traditional router?

D

Correct Answer

It combines high-speed Layer 2 switching with Layer 3 routing capability in hardware (ASICs), enabling fast inter-VLAN routing within a campus network

Explanation

Layer 3 switches perform IP routing using application-specific integrated circuits (ASICs) at near wire-speed, making them ideal for routing between VLANs within a data center or campus, where traditional software-based routers would be a bottleneck.

36

How does Address Resolution Protocol (ARP) spoofing/poisoning work as an attack?

C

Correct Answer

The attacker sends forged ARP replies associating their own MAC address with another host's IP address (often the gateway), causing traffic to be redirected through the attacker for interception

Explanation

By broadcasting forged ARP replies, an attacker can convince other hosts that the attacker's MAC address corresponds to the default gateway's IP, enabling man-in-the-middle interception of traffic — a classic local-network attack mitigated by dynamic ARP inspection and static ARP entries.

37

What is the purpose of TCP keepalive, and what is a typical default behavior?

C

Correct Answer

It periodically sends probe segments on idle connections to detect whether the remote end is still reachable, allowing dead connections to be cleaned up

Explanation

TCP keepalive sends probe segments after a period of inactivity (commonly defaulting to around two hours) and expects an ACK in response; if no response arrives after several retries, the connection is considered dead and is closed, freeing resources.

38

How does a wireless access point handle the "hidden node problem"?

D

Correct Answer

By using RTS/CTS (Request to Send / Clear to Send) handshakes so the access point can coordinate transmissions between stations that cannot hear each other directly

Explanation

In the hidden node problem, two stations can both reach the access point but not each other, causing collisions at the AP. RTS/CTS lets a station reserve the medium via the AP before transmitting, so the other hidden station defers, avoiding collisions.

39

What is the difference between a forward proxy and a reverse proxy in terms of which side they serve?

B

Correct Answer

A forward proxy acts on behalf of clients (hiding them from servers, e.g. for filtering or anonymity); a reverse proxy acts on behalf of servers (hiding them from clients, e.g. for load balancing or SSL termination)

Explanation

Forward proxies are deployed near clients to control or anonymize their outbound requests (common in corporate networks). Reverse proxies (e.g. Nginx, HAProxy) sit in front of backend servers to distribute load, cache content, and terminate TLS, presenting a single interface to clients.

40

Why do troubleshooting guides recommend checking the subnet mask and default gateway first when a host can reach local devices but not the internet?

D

Correct Answer

Because a misconfigured subnet mask can make the host miscalculate which addresses are local versus remote, and a missing or wrong default gateway means packets destined off-subnet have nowhere to be forwarded

Explanation

A host uses its subnet mask to decide whether a destination is on its local network or must be sent via the default gateway. If the mask is wrong, the host may try to ARP for an off-subnet address directly; if the gateway is missing or incorrect, the host has no route to forward traffic destined for remote networks like the internet.

1

What is TCP's Fast Retransmit mechanism?

B

Correct Answer

After receiving 3 duplicate ACKs (indicating a gap in sequence), the sender retransmits the suspected lost segment without waiting for the timeout

Explanation

3 duplicate ACKs = receiver got something out of order. Fast retransmit sends the missing segment immediately. Combined with Fast Recovery (halve cwnd instead of resetting to 1) for efficiency.

2

What is TCP BBR (Bottleneck Bandwidth and Round-trip propagation time)?

B

Correct Answer

A Google congestion control algorithm that models network conditions (bottleneck bandwidth and RTT) rather than using loss as a signal

Explanation

BBR (2016) probes for bottleneck bandwidth and RTT, operating at Kleinrock's optimal point. It achieves 2700x higher throughput than CUBIC on lossy links and lower latency by avoiding buffer bloat.

3

What is ECMP (Equal-Cost Multi-Path) routing?

B

Correct Answer

Forwarding traffic across multiple equal-cost paths simultaneously for load balancing and redundancy, using per-flow or per-packet hashing

Explanation

ECMP installs multiple equal-cost routes. Per-flow hashing (src/dst IP+port) ensures packet ordering. Used in data center leaf-spine fabrics for full-mesh bandwidth between servers.

4

What is BGP community and how is it used for traffic engineering?

B

Correct Answer

A BGP path attribute (32-bit tag) allowing ASes to attach policies to routes, enabling selective route advertisement, preference setting, and traffic control

Explanation

BGP communities (RFC 1997) tag routes with policy metadata. Upstream ISPs honor communities to set local preference, no-export, or blackhole routes. Large communities (RFC 8092) extend the 32-bit space.

5

What is PCE (Path Computation Element) in MPLS/SR networks?

B

Correct Answer

A centralized or distributed component that computes traffic-engineered paths in MPLS-TE and Segment Routing networks using full topology knowledge

Explanation

PCE (RFC 5440, PCEP protocol) computes optimal TE paths considering bandwidth constraints, affinities, and SLAs. In SR-PCE (Segment Routing), the controller installs explicit segment lists on ingress routers.

6

What is kernel bypass networking and how does io_uring relate?

B

Correct Answer

Techniques (DPDK, AF_XDP, io_uring) that minimize kernel involvement in I/O paths, reducing context-switch and copy overhead for high-performance packet processing

Explanation

DPDK maps NIC registers to user space. AF_XDP allows kernel bypass for selected packets. io_uring uses shared ring buffers reducing syscall overhead. Together, enable millions of packets/sec from a single CPU core.

7

What is Segment Routing (SR) and how does it differ from MPLS?

B

Correct Answer

An architecture encoding the path as a stack of segments (instructions) in the packet header, eliminating per-flow state in transit nodes unlike MPLS-TE

Explanation

SR-MPLS: segments are MPLS labels. SRv6: segments are IPv6 addresses in a Routing Extension Header. Eliminates LDP/RSVP-TE for path setup. Transit nodes just pop/swap labels with no per-flow state.

8

What is P4 (Programming Protocol-independent Packet Processors)?

B

Correct Answer

A domain-specific language for programming packet forwarding behavior in hardware (ASICs, FPGAs, NPUs) and software switches

Explanation

P4 allows network engineers to define custom packet parsing, match-action processing, and forwarding pipelines. It enables rapid deployment of new protocols without waiting for ASIC redesigns.

9

What is BGP RPKI (Resource Public Key Infrastructure)?

B

Correct Answer

A cryptographic framework allowing IP address holders to authorize ASes to advertise their prefixes, preventing route hijacking via ROA validation

Explanation

RPKI issues Route Origin Authorizations (ROAs) signed by IP address holders. Routers validate BGP announcements against ROAs. Invalid routes (wrong ASN or more specific prefix) can be filtered.

10

What is Wi-Fi 6E and what does the 6 GHz band offer?

B

Correct Answer

802.11ax extended to the 6 GHz band, providing 14 additional 80 MHz channels with no legacy device interference, enabling wider channels and lower latency

Explanation

Wi-Fi 6E operates in 6 GHz (5.925-7.125 GHz in the US). Only Wi-Fi 6E-capable devices access it, eliminating legacy overhead. 14× 80MHz or 7× 160MHz channels enable multi-gigabit speeds with minimal interference.

11

What is the difference between TCP SACK and selective retransmission?

B

Correct Answer

SACK (Selective Acknowledgment) allows receivers to inform senders exactly which segments arrived, enabling selective retransmission of only lost segments rather than all following segments

Explanation

Without SACK, TCP uses go-back-N (retransmit from loss point). With SACK (RFC 2018), the receiver reports gaps in received data. The sender retransmits only the missing segments, dramatically improving throughput on lossy links.

12

What is network virtualization using VXLAN?

B

Correct Answer

An overlay protocol encapsulating Layer 2 frames in UDP/IP packets, extending Layer 2 networks across Layer 3 boundaries for data center virtualization

Explanation

VXLAN (RFC 7348) encapsulates Ethernet frames in UDP (port 4789) with a 24-bit VNI (16M virtual networks vs VLAN's 4096). Used by VMware NSX, Open vSwitch, and cloud providers for tenant isolation.

13

What is the difference between proactive and reactive routing in mobile ad hoc networks?

B

Correct Answer

Proactive (table-driven) maintains routes to all destinations continuously; reactive (on-demand) discovers routes only when needed, reducing overhead in sparse networks

Explanation

OLSR, DSDV: proactive — always ready but consumes bandwidth maintaining routes. AODV, DSR: reactive — lower overhead but route discovery delay. Hybrid protocols (ZRP) combine both.

14

What is the role of ISP peering vs transit in internet routing?

B

Correct Answer

Peering: two ISPs exchange traffic for their respective customers for free (settlement-free); Transit: a customer pays an ISP to carry traffic to/from the global internet

Explanation

Settlement-free peering at IXPs (Internet Exchange Points) allows ISPs to exchange traffic without money changing hands. Transit customers pay upstream providers for global reach. Peering policies shape the internet's commercial structure.

15

What is the TCP Nagle algorithm and when should it be disabled?

B

Correct Answer

An algorithm that coalesces small TCP segments into larger ones, delaying sends until an ACK arrives or the buffer reaches MSS — disabled for interactive apps needing low latency

Explanation

Nagle combines small writes into full MSS segments to reduce overhead. But for interactive protocols (SSH keystrokes, gaming, trading) it adds up to 200ms latency. TCP_NODELAY socket option disables it.

16

What is HTTP/3 and how does it use QUIC?

B

Correct Answer

HTTP/3 is the HTTP protocol running over QUIC instead of TCP, eliminating head-of-line blocking at the transport layer and enabling faster connection establishment

Explanation

HTTP/3 (RFC 9114) runs over QUIC (RFC 9000). Unlike HTTP/2 over TCP (where one lost packet stalls all streams), QUIC provides independent per-stream loss recovery. 0-RTT handshake reduces connection setup overhead.

17

What is network function virtualization (NFV)?

B

Correct Answer

Moving network functions (firewalls, NAT, load balancers, DPI) from dedicated hardware appliances to software running on commodity servers

Explanation

NFV (ETSI NFV framework) replaces proprietary hardware (Cisco ASA, F5 load balancers) with Virtualized Network Functions (VNFs) on commodity x86 servers, reducing cost and enabling rapid deployment.

18

What is network time protocol (NTP) and why is time synchronization critical?

B

Correct Answer

A protocol synchronizing clocks across networked systems to UTC using a hierarchy of time servers, critical for security certificates, distributed systems, and logging

Explanation

NTP (RFC 5905) achieves millisecond accuracy using hierarchical stratum levels. Distributed systems (Spanner, Kafka) require synchronized clocks for ordering. TLS certificates fail if system time is wrong. PTP achieves nanosecond accuracy.

19

How does Active Queue Management (AQM) such as CoDel address bufferbloat?

D

Correct Answer

It tracks how long packets sit in the queue and proactively drops or marks packets once that sojourn time exceeds a target, signalling senders to slow down before queues grow large enough to cause excessive latency

Explanation

Bufferbloat occurs when oversized buffers let queues grow, adding latency without triggering congestion signals. CoDel measures each packet's time spent in the queue and drops packets once that delay persists beyond a target threshold, keeping queues shallow while still allowing bursts, prompting TCP senders to reduce their rate.

20

In a leaf-spine data center fabric, why is ECMP combined with consistent hashing important for flow distribution?

D

Correct Answer

Because it spreads flows across the multiple equal-cost spine paths while keeping all packets of a given flow on the same path, preserving in-order delivery and avoiding TCP reordering penalties

Explanation

Leaf-spine fabrics rely on ECMP to use all available spine uplinks for load distribution. Hashing on the flow's 5-tuple ensures that every packet belonging to the same flow is consistently routed over the same path, so packets arrive in order and TCP does not misinterpret reordering as loss, which would otherwise trigger unnecessary retransmissions and throughput collapse.