Running tcpdump Inside the NX-OS Guest Shell Container

350-601 By islever Editorial Last updated

Implement automation and scripting tools

Short answer

B The run guestshell command executes the tcpdump capture inside the already-deployed Guest Shell container on the Nexus device.

Question

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? - Exhibit: Running tcpdump Inside the NX-OS Guest Shell Container
  1. guestshell-bash
  2. run guestshell Correct Answer
  3. run bash
  4. guestshell

Key Takeaways

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.

Common mistake: 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.

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

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.

Discussion 12 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 12

  1. 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
  2. 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
  3. asd248402 👍 3 Answered D
    its D as run guestshell is best for oneliner
  4. CoAsT_x 👍 1 Answered 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.
  5. 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.
Show 7 more comments
  1. 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.“
  2. 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
  3. Rollizo 👍 1 Answered D
    It is D. With “run guestshell” you can only introduce a command to be executed in guestshell interface
  4. GoForCCNP 👍 1 Answered B
    I agree with @luisam. Correct is B - run guestshell.
  5. JobProcess 👍 2 Answered D
    Answer D: guestshell
  6. wickkkkkkkkkkkkkkkkkk 👍 1
    BBBBBBBBBBBBBBBBBBBBBBBBBB
  7. JobProcess 👍 1 Answered B
    Answer B: run guestshell

Reader comments & corrections

No reader corrections 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.

← Back to 350-601 Study Guide