CompTIA Networking Practice Test — Questions and Answers
Question 1: Which OSI model layer is responsible for logical addressing and routing packets between networks?
- Layer 3 — Network (Correct answer)
- Layer 2 — Data Link
- Layer 4 — Transport
- Layer 1 — Physical
Correct answer: Layer 3 — Network
Layer 3 (Network Layer) handles logical addressing (IP addresses) and routing, determining the best path for packets to travel between different networks. Routers operate at this layer. Layer 2 handles physical addressing (MAC), Layer 4 handles transport (TCP/UDP), and Layer 1 handles physical transmission.
Question 2: A computer has the IP address 192.168.1.45 with a subnet mask of 255.255.255.0. What is the network address?
- 192.168.1.0 (Correct answer)
- 192.168.0.0
- 192.168.1.255
- 192.168.1.45
Correct answer: 192.168.1.0
The network address is found by performing a bitwise AND between the IP address and subnet mask. 192.168.1.45 AND 255.255.255.0 = 192.168.1.0. The /24 subnet (255.255.255.0) means the first 24 bits identify the network, leaving the last octet (0-255) for host addresses.
Question 3: What protocol is used to automatically assign IP addresses to devices on a network?
- DHCP (Correct answer)
- DNS
- ARP
- ICMP
Correct answer: DHCP
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses, subnet masks, default gateways, and DNS server addresses to network devices. Without DHCP, each device would need to be manually configured with a static IP address. DHCP uses UDP ports 67 (server) and 68 (client).
Question 4: What is the difference between TCP and UDP?
- TCP is reliable and connection-oriented; UDP is faster but connectionless with no delivery guarantee (Correct answer)
- TCP is faster; UDP is slower but more reliable
- TCP is used for video streaming; UDP is used for file transfers
- TCP and UDP are identical protocols with different port numbers
Correct answer: TCP is reliable and connection-oriented; UDP is faster but connectionless with no delivery guarantee
TCP (Transmission Control Protocol) is connection-oriented and provides reliable, ordered, error-checked delivery through acknowledgments and retransmission. UDP (User Datagram Protocol) is connectionless and provides faster but unreliable delivery with no acknowledgments. TCP is used for HTTP/HTTPS, email, FTP. UDP is used for DNS, video streaming, VoIP.
Question 5: What is the primary function of a DNS server?
- Translate domain names to IP addresses (Correct answer)
- Assign IP addresses dynamically to hosts
- Filter network traffic based on security rules
- Connect multiple networks together
Correct answer: Translate domain names to IP addresses
DNS (Domain Name System) translates human-readable domain names (like www.google.com) into IP addresses (like 142.250.80.46) that computers use to communicate. Without DNS, users would need to memorize IP addresses to visit websites. DNS uses UDP/TCP port 53.
Question 6: Which wireless security protocol provides the strongest encryption for a modern Wi-Fi network?
- WPA3 (Correct answer)
- WEP
- WPA
- WPA2-TKIP
Correct answer: WPA3
WPA3 (Wi-Fi Protected Access 3) is the strongest current wireless security protocol, introduced in 2018. It uses SAE (Simultaneous Authentication of Equals) for stronger handshake security. WPA2 with AES is still widely used and acceptable, but WPA3 provides better protection against offline dictionary attacks.
Which OSI model layer is responsible for logical addressing and routing packets between networks?