ABHYAS PREP: COMPUTER SCIENCE MCQS · COMPUTER NETWORKS

Computer Networks

Layers, TCP vs UDP, addressing, subnetting, DNS and devices.

Loading practice…

Worked examples

Example 1 · level 1

Which of the following correctly describes the primary purpose of the Domain Name System (DNS)?

  1. Encrypting HTTP traffic using SSL certificates
  2. Mapping human-readable hostnames to IP addresses
  3. Routing packets between different autonomous systems
  4. Assigning dynamic IP addresses to local devices
Show solution
  1. Define DNS: Domain Name System.
  2. Recall that computers use IPs, but humans use names (e.g., google.com).
  3. Identify the mapping process.

Answer: Mapping human-readable hostnames to IP addresses

Example 2 · level 2

A router receives a packet destined for 10.1.5.50. Its routing table has these entries: 10.1.0.0/16 via interface A, 10.1.5.0/24 via interface B, 10.0.0.0/8 via interface C. Which interface will the router forward the packet out of?

  1. Interface A
  2. Interface B
  3. Interface C
  4. Drop the packet
Show solution
  1. Compare destination with each prefix.
  2. Choose the longest prefix (largest subnet mask).
  3. /24 matches 10.1.5.0/24, so interface B.

Answer: Interface B

Example 3 · level 3

On a local Ethernet network, Host A knows the IP address of Host B but not its MAC address. Which of the following sequences occurs first to enable communication?

  1. Host A sends a unicast ARP request to Host B's IP
  2. Host A sends a broadcast ARP request asking 'Who has this IP?'
  3. Host A checks its DNS cache for Host B's MAC address
  4. Host A sends a DHCP request to the router for Host B's MAC
Show solution
  1. Identify the need: IP is known, MAC is missing.
  2. Recall ARP (Address Resolution Protocol) function.
  3. Understand that since the target MAC is unknown, a broadcast (FF:FF:FF:FF:FF:FF) is required.

Answer: Host A sends a broadcast ARP request asking 'Who has this IP?'

Search by task, format or tool name.