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/Option | Example | Description |
---|
show version | show version | Display the software version and system information |
show running-config | show running-config | Display the current configuration |
show startup-config | show startup-config | Display the startup configuration |
copy running-config startup-config | copy running-config startup-config | Save the current configuration to startup |
reload | reload | Reboot the switch |
Interface Configuration
#
Command/Option | Example | Description |
---|
interface vlan <id> | interface vlan 1 | Enter VLAN configuration mode |
interface <type> <id> | interface ethernet 1/1 | Enter specific interface configuration mode |
ip address <addr> <mask> | ip address 192.168.1.1 255.255.255.0 | Set IP address on an interface |
no shutdown | no shutdown | Enable an interface |
shutdown | shutdown | Disable an interface |
VLAN Configuration
#
Command/Option | Example | Description |
---|
vlan <id> | vlan 10 | Enter VLAN configuration mode |
name <name> | name VLAN10 | Set VLAN name |
interface vlan <id> | interface vlan 10 | Enter VLAN interface configuration mode |
ip address <addr> <mask> | ip address 192.168.10.1 255.255.255.0 | Set IP address on VLAN interface |
exit | exit | Exit VLAN configuration mode |
Spanning Tree Protocol
#
Command/Option | Example | Description |
---|
spanning-tree mode <type> | spanning-tree mode rapid-pvst | Set spanning tree protocol type |
spanning-tree vlan <id> root primary | spanning-tree vlan 1 root primary | Set VLAN root bridge for spanning tree |
show spanning-tree | show spanning-tree | Display spanning tree status |
Routing Configuration
#
Command/Option | Example | Description |
---|
ip routing | ip routing | Enable IP routing |
ip route <network> <mask> <next-hop> | ip route 192.168.2.0 255.255.255.0 192.168.1.1 | Configure static route |
show ip route | show ip route | Display routing table |
Security
#
Command/Option | Example | Description |
---|
enable secret <password> | enable secret mypassword | Set enable mode password |
username <name> password <password> | username admin password mypassword | Create a user with a password |
access-list <id> permit <src> <dest> | access-list 100 permit ip 192.168.1.0 0.0.0.255 any | Create an ACL rule |
show access-lists | show access-lists | Display configured access control lists |
Management
#
Command/Option | Example | Description |
---|
hostname <name> | hostname MySwitch | Set the switch hostname |
configure terminal | configure terminal | Enter global configuration mode |
end | end | Exit global configuration mode |
show arp | show arp | Display ARP table |
show interface <type> <id> | show interface ethernet 1/1 | Display 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.