Networking - MCQ Practice Questions
Computer networks MCQs — OSI, TCP/IP, routing & protocols.
168 questions | 100% Free
Which well-known port number does DNS use for standard query and response communication?
Understanding:
We need to identify the standard port used by the DNS protocol for name resolution queries and responses.
Step 1: Recall DNS port assignment
DNS (Domain Name System) is assigned port 53 by IANA. It uses both UDP port 53 for standard queries (responses under 512 bytes) and TCP port 53 for zone transfers or large responses.
Step 2: Eliminate other options
Port 67 is used by DHCP (server side). Port 110 is used by POP3 for email retrieval. Port 443 is used by HTTPS for secure web traffic.
Answer:
DNS uses port 53 for both UDP and TCP communications.
Quick Tip:
Remember the pair — DHCP uses ports 67 (server) and 68 (client), while DNS uses port 53. These are frequently confused in exams.
In the DNS hierarchy, which type of server is responsible for maintaining authoritative records for a specific domain such as 'example.com'?
Understanding:
We need to identify which DNS server holds and serves the definitive records for a given domain.
Step 1: Understand the DNS resolution hierarchy
The DNS resolution process involves multiple server types:
Step 2: Identify the correct server
The Authoritative Name Server is the final source of truth for a domain's DNS records. It provides definitive answers without needing to query further.
Answer:
The Authoritative Name Server maintains and serves the definitive DNS records for a specific domain.
Quick Tip:
A response with the 'AA' (Authoritative Answer) flag set in the DNS response header indicates the reply came directly from an Authoritative Name Server.
Which DNS record type is used to map an IPv6 address to a hostname?
Understanding:
We need to identify the DNS record type responsible for mapping a domain name to an IPv6 address.
Step 1: Review common DNS record types
Step 2: Match to IPv6
IPv6 addresses are 128-bit and require the AAAA record type for forward DNS resolution (hostname to IPv6 address).
Answer:
The AAAA record is used to map a hostname to an IPv6 address.
Quick Tip:
For reverse lookup of IPv6 addresses, DNS uses the ip6.arpa domain with PTR records, similar to in-addr.arpa used for IPv4 reverse lookups.
A DHCP client sends an initial broadcast message to discover available DHCP servers on the network. What is the destination IP address of this message?
Understanding:
We need to identify the destination IP address used by a DHCP client during the initial DHCP Discover phase.
Step 1: Recall the DHCP DORA process
DHCP address assignment follows four steps: Discover, Offer, Request, and Acknowledge (DORA).
Step 2: Analyse the DHCP Discover message
At the Discover stage, the client has no IP address yet. It uses:
The broadcast address 255.255.255.255 ensures all devices on the local network, including any DHCP server, receive the message.
Step 3: Eliminate other options
Answer:
The DHCP Discover message is sent to the limited broadcast address.
Quick Tip:
The source IP in a DHCP Discover is 0.0.0.0 while the destination is 255.255.255.255 — both are commonly tested as tricky paired facts.
Which DHCP message is sent by the client after receiving multiple DHCP Offer messages to formally request an IP address from a chosen server?
Understanding:
We need to identify the specific DHCP message type that a client uses to formally select and request an offered IP address.
Step 1: Review the DORA process
The four messages in standard DHCP IP address assignment are:
Step 2: Identify the correct message
After receiving one or more Offer messages, the client sends a DHCP Request broadcast. This message does two things: it informs the chosen server that its offer is accepted, and it notifies other servers that their offers are declined.
Step 3: Eliminate other options
Answer:
The client sends a DHCP Request message to formally accept a server's offer.
Quick Tip:
The DHCP Request is still a broadcast even though the client has chosen a specific server — this is intentional so other servers know to retract their offers.
What is the purpose of a DNS PTR record?
Understanding:
We need to identify the function of a DNS PTR (Pointer) record in the Domain Name System.
Step 1: Define PTR records
A PTR (Pointer) record is used for reverse DNS lookups. While an A record resolves a domain name to an IP address (forward lookup), a PTR record does the opposite — it resolves an IP address back to a domain name.
Step 2: Understand the reverse lookup zone
PTR records are stored in special reverse lookup zones:
Step 3: Eliminate other options
Answer:
A PTR record maps an IP address to a domain name, enabling reverse DNS lookups.
Quick Tip:
PTR records are commonly used in email anti-spam checks. Mail servers verify that the sending IP resolves back to a legitimate domain using a PTR lookup.
A DHCP server is configured with a lease time of 8 hours. At what point in the lease period will the client first attempt to renew its IP address by sending a unicast DHCP Request to the server?
Understanding:
We need to determine when a DHCP client first attempts lease renewal, given a total lease time of 8 hours.
Formula:
DHCP defines two timers for lease renewal:
Step 1: Calculate T1 (first renewal attempt)
The client sends a unicast DHCP Request to the original server at T1:
Step 2: Calculate T2 (rebinding attempt)
If T1 renewal fails, the client broadcasts a DHCP Request at T2 to any available server:
Step 3: Identify the first renewal attempt
The first renewal attempt occurs at T1 = 4 hours (50% of the lease), using a unicast message directly to the leasing DHCP server.
Answer:
The client first attempts to renew its lease after 4 hours, which is 50% of the 8-hour lease time.
Quick Tip:
Remember T1 = 50% and T2 = 87.5% of lease time. T1 uses unicast to the original server; T2 uses broadcast to any server. Both are commonly tested in CCNA-level exams.
Which DNS record type is used to define the authoritative name servers for a domain zone?
Understanding:
We need to identify the DNS record type that specifies which name servers are authoritative for a particular domain zone.
Step 1: Define the NS record
An NS (Name Server) record delegates a DNS zone to a set of authoritative name servers. It specifies the hostnames of the DNS servers responsible for a domain. For example, the NS records for 'example.com' would list ns1.example.com and ns2.example.com.
Step 2: Distinguish from related record types
Step 3: Confirm the answer
While SOA references the primary name server, NS records explicitly list all authoritative name servers for the zone and are used by other DNS servers to delegate queries.
Answer:
The NS record identifies the authoritative name servers responsible for a DNS zone.
Quick Tip:
Every zone must have at least one NS record. The SOA record and NS records are always the first records present in any properly configured DNS zone file.
A network administrator needs to configure a DHCP relay agent. Which DHCP message field is modified by the relay agent to inform the DHCP server about the originating subnet of the client?
Understanding:
We need to identify which field in the DHCP packet a relay agent modifies to communicate the client's originating subnet to the DHCP server.
Step 1: Understand DHCP relay operation
When a DHCP client on one subnet needs to reach a DHCP server on a different subnet, a DHCP relay agent (typically a router) forwards the broadcast DHCP message as a unicast packet to the DHCP server.
Step 2: Identify the relevant DHCP packet fields
The DHCP message contains several address fields:
Step 3: Confirm the answer
The relay agent inserts its own IP address into the giaddr field. The DHCP server reads this field to identify the client's subnet and select an appropriate address pool for the lease offer.
Answer:
The relay agent sets the giaddr (Gateway IP Address) field to indicate the client's originating subnet to the DHCP server.
Quick Tip:
If giaddr is non-zero in a DHCP packet received by a server, the server knows the request was relayed and uses giaddr to pick the correct address pool — this is critical for multi-subnet DHCP deployments.
Which DNS record type is used to configure email routing by specifying the mail server responsible for accepting email messages for a domain?
Understanding:
We need to identify the DNS record type that directs email traffic to the correct mail server for a domain.
Step 1: Define MX records
An MX (Mail Exchanger) record specifies the hostname of the mail server responsible for accepting email on behalf of a domain. MX records include a priority value — lower values indicate higher preference.
Step 2: Understand MX priority
When multiple MX records exist, the sending mail server attempts delivery to the host with the lowest priority number first. For example:
Step 3: Eliminate other options
Answer:
The MX (Mail Exchanger) record specifies the mail server responsible for receiving email for a domain.
Quick Tip:
MX records must point to a hostname (A or AAAA record), never directly to an IP address. Pointing an MX record directly to an IP is invalid per RFC 2181 and is a common misconfiguration trap in exams.