Cisco NX-OS

Cisco NX-OS Cheatsheet #

Cisco NX-OS is the network operating system used in Cisco Nexus switches. This cheatsheet covers commonly used commands and configurations for Cisco NX-OS.

Basic Commands #

Command/OptionExampleDescription
show versionshow versionDisplay the software version and system information
show running-configshow running-configDisplay the current configuration
show startup-configshow startup-configDisplay the startup configuration
copy running-config startup-configcopy running-config startup-configSave the current configuration to startup
reloadreloadReboot the switch

Interface Configuration #

Command/OptionExampleDescription
interface vlan <id>interface vlan 1Enter VLAN configuration mode
interface <type> <id>interface ethernet 1/1Enter specific interface configuration mode
ip address <addr> <mask>ip address 192.168.1.1 255.255.255.0Set IP address on an interface
no shutdownno shutdownEnable an interface
shutdownshutdownDisable an interface

VLAN Configuration #

Command/OptionExampleDescription
vlan <id>vlan 10Enter VLAN configuration mode
name <name>name VLAN10Set VLAN name
interface vlan <id>interface vlan 10Enter VLAN interface configuration mode
ip address <addr> <mask>ip address 192.168.10.1 255.255.255.0Set IP address on VLAN interface
exitexitExit VLAN configuration mode

Spanning Tree Protocol #

Command/OptionExampleDescription
spanning-tree mode <type>spanning-tree mode rapid-pvstSet spanning tree protocol type
spanning-tree vlan <id> root primaryspanning-tree vlan 1 root primarySet VLAN root bridge for spanning tree
show spanning-treeshow spanning-treeDisplay spanning tree status

Routing Configuration #

Command/OptionExampleDescription
ip routingip routingEnable IP routing
ip route <network> <mask> <next-hop>ip route 192.168.2.0 255.255.255.0 192.168.1.1Configure static route
show ip routeshow ip routeDisplay routing table

Security #

Command/OptionExampleDescription
enable secret <password>enable secret mypasswordSet enable mode password
username <name> password <password>username admin password mypasswordCreate a user with a password
access-list <id> permit <src> <dest>access-list 100 permit ip 192.168.1.0 0.0.0.255 anyCreate an ACL rule
show access-listsshow access-listsDisplay configured access control lists

Management #

Command/OptionExampleDescription
hostname <name>hostname MySwitchSet the switch hostname
configure terminalconfigure terminalEnter global configuration mode
endendExit global configuration mode
show arpshow arpDisplay ARP table
show interface <type> <id>show interface ethernet 1/1Display interface status

This cheatsheet covers essential Cisco NX-OS commands for network management and configuration. For more detailed information, refer to the Cisco NX-OS documentation.

Cisco NX-OS

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.