Courseiva
Network Services and SecuritymediumMultiple ChoiceObjective-mapped

CCNA Network Services and Security Practice Question

A user reports that websites can be opened by IP address but not by hostname. Which service is the strongest suspect?

⚠ Common exam trap

A common exam trap is selecting PAT or port security as the cause of hostname resolution failure. PAT manages IP address translation for outbound connections but does not resolve hostnames, so it cannot cause DNS failures. Similarly, port security restricts switch port access based on MAC addresses and does not affect DNS or name resolution. Another tempting but incorrect choice is STP, which operates at Layer 2 to prevent loops and has no role in IP name resolution. Candidates must avoid confusing these distinct network services and focus on DNS when hostname resolution fails but IP connectivity works.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

DNS

DNS is the strongest suspect because the network path clearly works at the IP layer. In practical terms, if the user can reach the site by numeric address, then routing and basic connectivity are functioning. The missing piece is name resolution, and that is exactly what DNS provides. This is one of the clearest troubleshooting patterns in networking. If names fail but IP works, start with DNS.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • DNS

    Why this is correct

    DNS (Domain Name System) is the service responsible for translating human-friendly hostnames into IP addresses. When a website opens by IP but not by hostname, it indicates the client cannot resolve the name to an IP, so DNS resolution is failing. This can be due to a misconfigured DNS server, incorrect resolver settings on the host, or a missing DNS record for the site. Since direct IP access bypasses DNS, the rest of Layer 3 connectivity is intact.

  • STP

    Why it's wrong here

    Spanning Tree Protocol (STP) operates at Layer 2 to maintain a loop-free topology in bridged networks by blocking redundant paths. It has no role in hostname resolution or in the IP-to-name mapping process. An STP failure would produce forwarding loops and broadcast storms, affecting all traffic, not just domain name lookups. Since IP-based access still works, the issue is not related to STP.

    When this WOULD be correct

    If the question were about a network topology where a loop is causing broadcast storms and preventing devices from communicating properly, a question could ask which protocol is responsible for maintaining a loop-free environment. In that case, STP would be the correct answer.

  • PAT

    Why it's wrong here

    Port Address Translation (PAT) is a form of NAT that maps multiple private IP addresses to a single public IP by using unique source ports. While PAT issues can break outbound Internet connectivity or disrupt application sessions, they would not selectively prevent hostname resolution while leaving IP-based web access functional. In fact, if PAT were failing, traffic to destination IPs would also fail, because translation affects all IP packets. Thus, a hostname-specific failure points away from PAT.

    When this WOULD be correct

    If the question were to ask about a scenario where users can access services using IP addresses but not through specific port numbers due to address translation issues, PAT would be the correct answer. For example, if a user can connect to a web server using its IP but cannot access it via a specific service port due to misconfigured PAT rules.

  • Port security

    Why it's wrong here

    Port security is a switchport-level feature that limits which MAC addresses are allowed to communicate through that port. It does not interact with DNS or hostname resolution; its operation is below the IP layer. If port security were violated, the port would shut down or drop frames from unauthorized MACs, causing total loss of connectivity for the attached device, not a selective inability to resolve hostnames. Since IP connectivity is intact, port security is not the cause.

    When this WOULD be correct

    If the question were about a network where users were unable to connect to devices on the network due to unauthorized MAC addresses being blocked by port security, then port security would be the correct answer. In this scenario, the inability to access devices would be due to port security settings.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The 200-301 exam frequently reuses these exact scenarios with slightly different constraints.

DNSCorrect answer

Why this is correct

DNS (Domain Name System) is the service responsible for translating human-friendly hostnames into IP addresses. When a website opens by IP but not by hostname, it indicates the client cannot resolve the name to an IP, so DNS resolution is failing. This can be due to a misconfigured DNS server, incorrect resolver settings on the host, or a missing DNS record for the site. Since direct IP access bypasses DNS, the rest of Layer 3 connectivity is intact.

STPWrong answer — click to see why

Why this is wrong here

STP (Spanning Tree Protocol) is a network protocol used to prevent loops in Ethernet networks. It does not resolve hostnames to IP addresses, making it irrelevant to the issue of accessing websites by hostname.

★ When this WOULD be the correct answer

If the question were about a network topology where a loop is causing broadcast storms and preventing devices from communicating properly, a question could ask which protocol is responsible for maintaining a loop-free environment. In that case, STP would be the correct answer.

Why candidates choose this

Candidates may confuse STP with other network services and protocols, leading them to mistakenly believe it could be related to hostname resolution issues due to its role in network stability.

PATWrong answer — click to see why

Why this is wrong here

PAT (Port Address Translation) is used for translating private IP addresses to a public IP address, but it does not affect hostname resolution. The issue described in the question is related to DNS, which resolves hostnames to IP addresses.

★ When this WOULD be the correct answer

If the question were to ask about a scenario where users can access services using IP addresses but not through specific port numbers due to address translation issues, PAT would be the correct answer. For example, if a user can connect to a web server using its IP but cannot access it via a specific service port due to misconfigured PAT rules.

Why candidates choose this

Candidates may confuse PAT with DNS issues, thinking that if IP addresses work, there might be a translation issue affecting port access, leading them to choose this option mistakenly.

Port securityWrong answer — click to see why

Why this is wrong here

Port security is a feature used to restrict access to a switch port based on MAC addresses, and it does not directly affect the resolution of hostnames to IP addresses. Therefore, it cannot be the cause of the issue where websites are accessible by IP but not by hostname.

★ When this WOULD be the correct answer

If the question were about a network where users were unable to connect to devices on the network due to unauthorized MAC addresses being blocked by port security, then port security would be the correct answer. In this scenario, the inability to access devices would be due to port security settings.

Why candidates choose this

Candidates may choose this option if they associate network access issues with security measures, mistakenly believing that port security could impact hostname resolution due to its role in controlling device access on the network.

Analysis generated from the official 200-301blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

About these practice questions

Courseiva writes every 200-301 question from scratch — 1,389 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-301 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-301 exam.