Running tcpdump Inside the NX-OS Guest Shell Container

Implement automation and scripting tools
Answer Correct answer: B — The run guestshell command executes the tcpdump capture inside the already-deployed Guest Shell container on the Nexus device.

Refer to the exhibit. A network engineer is using tcpdump to capture a snapshot of OSPF-retated traffic on a specific Cisco NX-OS switch port. For security reasons, the capture must be taken using an embedded container that is already deployed on the Cisco Nexus device. Which command completes the script? - image

  1. guestshell-bash
  2. run guestshell Correct Answer
  3. run bash
  4. guestshell

Community Votes

D
78%
B
22%

78% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

run guestshell runs a command in the Guest Shell context and returns to NX-OS, whereas guestshell alone enters the interactive container prompt; both parallel run bash for the host shell.

To capture OSPF traffic on a specific NX-OS switch port using an embedded container, use the run guestshell command from the NX-OS CLI to execute tcpdump inside the Guest Shell.

Confusing guestshell (interactive entry) with run guestshell (scripted execution); the question asks which command completes a scripted capture, not which drops you into the shell.

Community Discussion (12 comments)

luisam 👍 6
Answer B: run guestshell https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/programmability/guide/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide_7x/Guest_Shell.html#concept_33803A70919D40C195E52C528695CE45
Rollizo 👍 1 Selected: D
It is D. With “run guestshell” you can only introduce a command to be executed in guestshell interface
udo2020 👍 1
„You can use the run guestshell CLI command to access the Guest Shell on the Cisco Nexus device; the run guestshell command parallels the run bash command that is used to access the host shell.“
CoAsT_x 👍 1 Selected: D
Example 16-7 Displaying Counters for Ethernet 1/47 Interface Inside Guest Shell switch# guestshell [guestshell@guestshell ~]$ ifconfig Eth1-47 Eth1-47: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 13.0.0.47 netmask 255.255.255.0 broadcast 13.0.0.255 ANNOYINGLY, i think they will be looking for D. Literally both commands (B and D) will dump you in the shell, run guestshell will drop you in, but could also use it to run a command from switch. If i get this question, i will go with D here.
GoForCCNP 👍 1 Selected: B
I agree with @luisam. Correct is B - run guestshell.
asd248402 👍 3 Selected: D
its D as run guestshell is best for oneliner
udo2020 👍 1
It's B. You can use the run guestshell CLI command to access the Guest Shell on the Cisco Nexus device; the run guestshell command parallels the run bash command that is used to access the host shell. This command allows you to access the Guest Shell and get a Bash prompt or run a command within the context of the Guest Shell. The command uses password-less SSH to an available port on the localhost in the default network namespace.
wickkkkkkkkkkkkkkkkkk 👍 1
BBBBBBBBBBBBBBBBBBBBBBBBBB
JobProcess 👍 2 Selected: D
Answer D: guestshell
Arch_Angel 👍 4
D is the answer 8kv91#guestshell [guestshell@guestshell ~]$ sudo yum update [guestshell@guestshell bootflash]$ sudo ip netns exec management ping 10.28.38.48 PING 10.28.38.48 (10.28.38.48) 56(84) bytes of data. 64 bytes from 10.28.38.48: icmp_seq=1 ttl=48 time=76.5 ms
JobProcess 👍 1 Selected: B
Answer B: run guestshell
crooks_1988 👍 1
B is correct: In Cisco NX-OS, only network-admin users can access the Guest Shell by default. It is automatically enabled in the system and can be accessed using the run guestshell command

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The capture must run inside the embedded Guest Shell container already deployed on the Nexus 9000. From the NX-OS CLI, the run guestshell <command> syntax executes a command within the Guest Shell context and returns to the NX-OS prompt, which is exactly what a scripted packet capture needs. run guestshell parallels run bash, which reaches the host shell; both invoke container tools such as tcpdump without an interactive session.

Why the Other Options Are Wrong

A. guestshell-bash is not a valid NX-OS command. D. guestshell alone enters the Guest Shell interactive prompt; it does not complete a one-line script that launches tcpdump and returns. C. run bash accesses the host Linux shell, not the Guest Shell container the question requires.

Community Comment Notes

Exam community is split (votes D 78 / B 22). The highest-liked comment (luisam, 6 likes) cites the NX-OS Programmability Guide and concludes B. The deciding detail is "completes the script": a non-interactive prefix that runs the command inside the container is run guestshell, whereas guestshell is the interactive entry point.

Official Reference

Related Analysis

← Back to 350-601 Study Guide