EX200 Manage containers Practice Question
A container is running but cannot be accessed from the network. Which TWO commands could help diagnose the issue? (Select exactly two.)
⚠ Common exam trap
Red Hat often tests the distinction between commands that inspect container metadata (`podman inspect`) versus commands that interact with running processes (`podman exec`, `podman top`), leading candidates to choose the latter for network issues.
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
✓
podman port
`podman port` lists the port mappings for a container, showing which host ports are mapped to container ports. If a container is running but unreachable from the network, this command reveals whether the expected port mapping exists and is correctly configured. Without a proper mapping, external traffic cannot reach the container's service.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
podman logs
Why it's wrong here
The podman logs command displays the container's stdout/stderr history, which can show application-level errors but it does not inspect the container's network configuration or published ports. A network-access failure is most commonly caused by absent or incorrect port publishing on the host, and logs are silent about those host-side mappings. Therefore, while useful for debugging service crashes, it cannot verify why the container is unreachable.
- ✓
podman port
Why this is correct
The podman port command prints the host port bindings for a running container, e.g., 8080/tcp -> 0.0.0.0:32768, by reading the port-mapping rules that podman created. If the container was started without -p or -P, this command produces no output, which is an immediate indicator that no host port was published and external access is impossible. It is the direct, minimal diagnostic for checking whether a container's ports are exposed to the network.
- ✓
podman inspect
Why this is correct
podman inspect returns a detailed JSON structure containing the container's entire configuration, including NetworkSettings.Ports and NetworkSettings.IPAddress. This can confirm which container ports are published on which host addresses, and it also reveals network mode such as 'bridge', 'host', or 'none'. It is accurate but slower to parse than podman port, so it is no less correct but is less targeted for a quick connectivity check.
- ✗
podman exec
Why it's wrong here
podman exec runs a process inside the container's namespaces, allowing you to run commands like curl or netstat from within the container's own network context. That only verifies that the container's service is listening on its internal interface; it cannot show the host-level port mapping or firewall rules that actually determine external access. Thus it is helpful for troubleshooting inside the container, not for diagnosing whether the host is forwarding traffic to the container.
- ✗
podman top
Why it's wrong here
podman top displays the container's running processes, equivalent to ps inside the container's PID namespace. Process information tells you whether the application is alive, but it does not include socket bindings, listening ports, or published port mappings. Therefore it cannot indicate whether the container's network configuration is correct, making it unsuitable for diagnosing external connectivity failures.
Go deeper
Related to this question
About these practice questions
This EX200 question is part of Courseiva's 427-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.