The Cisco Nexus 9000 Series switches run on NX-OS, a data center-class operating system designed for high availability, scalability, and automation. This blog post presents a categorized list of NX-OS-specific commands along with descriptions and example usage.
1. Interface Configuration Commands
Command | Description | Example Usage |
---|---|---|
interface ethernet <slot/port> | Enter interface configuration mode for a specific port | interface ethernet 1/1 |
switchport mode trunk | Sets the interface to trunk mode for VLAN tagging | switchport mode trunk |
switchport access vlan <vlan_id> | Assigns an interface to a VLAN in access mode | switchport access vlan 10 |
spanning-tree port type edge | Configures the port as an edge port for STP | spanning-tree port type edge |
2. VLAN and VXLAN Configuration
Command | Description | Example Usage |
vlan <vlan_id> | Creates a VLAN and enters VLAN configuration mode | vlan 100 |
name <vlan_name> | Assigns a name to a VLAN | name SALES_VLAN |
feature vn-segment-vlan-based | Enables VXLAN with VLAN mapping | feature vn-segment-vlan-based |
interface nve1 | Configures the VXLAN Network Virtualization Endpoint (NVE) | interface nve1 |
3. Routing and IP Configuration
Command | Description | Example Usage |
feature ospf | Enables OSPF routing protocol | feature ospf |
router ospf <process_id> | Enters OSPF configuration mode | router ospf 1 |
interface vlan <vlan_id> | Creates a VLAN interface for L3 routing | interface vlan 100 |
ip address <ip>/<subnet> | Assigns an IP address to an interface | ip address 192.168.1.1/24 |
4. Security and AAA Configuration
Command | Description | Example Usage |
---|---|---|
TACACS+ Configuration | ||
feature tacacs+ | Enables TACACS+ authentication | feature tacacs+ |
tacacs-server host <ip> | Configures a TACACS+ server | tacacs-server host 10.1.1.1 |
aaa authentication login default group tacacs+ local | Sets up authentication order for TACACS+ and local fallback | aaa authentication login default group tacacs+ local |
RADIUS Configuration | ||
feature radius | Enables RADIUS authentication | feature radius |
radius-server host <ip> | Configures a RADIUS server | radius-server host 10.1.1.3 |
aaa authentication login default group radius local | Sets up authentication order for RADIUS and local fallback | aaa authentication login default group radius local |
aaa authorization exec default group radius local | Sets up authorization order for exec commands using RADIUS | aaa authorization exec default group radius local |
LDAP Configuration | ||
feature ldap | Enables LDAP authentication | feature ldap |
ldap-server host <ip> | Configures an LDAP server | ldap-server host 10.1.1.2 |
aaa authentication login default group ldap local | Sets up authentication order for LDAP and local fallback | aaa authentication login default group ldap local |
ldap-server search-base <dn> | Configures the LDAP search base DN | ldap-server search-base dc=example,dc=com |
ldap-server attribute map | Maps LDAP attributes to local attributes | ldap-server attribute map uid username |
aaa authorization exec default group ldap local | Sets up authorization order for exec commands using LDAP | aaa authorization exec default group ldap local |
5. Fabric and VPC Configuration
Command | Description | Example Usage |
feature vpc | Enables VPC feature | feature vpc |
vpc domain <domain_id> | Configures a VPC domain | vpc domain 10 |
peer-keepalive destination <ip> | Configures peer-keepalive link | peer-keepalive destination 10.1.1.2 |
interface port-channel <id> | Creates a port-channel interface | interface port-channel 1 |
6. Storage and FCoE Configuration
Command | Description | Example Usage |
feature fcoe | Enables FCoE support | feature fcoe |
feature npiv | Enables NPIV on the switch | feature npiv |
interface vfc <id> | Creates a virtual Fibre Channel interface | interface vfc 10 |
bind interface ethernet <slot/port> | Binds VFC to a physical interface | bind interface ethernet 1/10 |
7. System and Management Configuration
Command | Description | Example Usage |
feature bash-shell | Enables Bash shell access | feature bash-shell |
feature telnet | Enables Telnet access | feature telnet |
show version | Displays system version details | show version |
copy running-config startup-config | Saves configuration to startup-config | copy running-config startup-config |
8. QoS (Quality of Service) Configuration
Command | Description | Example Usage |
feature qos | Enables QoS on the switch | feature qos |
policy-map <name> | Creates a QoS policy map | policy-map QOS_POLICY |
class-map <name> | Defines a traffic class for QoS | class-map CLASS1 |
service-policy <policy_name> | Applies a QoS policy to an interface | service-policy QOS_POLICY |
9. Multicast and PIM Configuration
Command | Description | Example Usage |
feature pim | Enables Protocol Independent Multicast (PIM) | feature pim |
ip pim sparse-mode | Enables sparse mode on an interface | ip pim sparse-mode |
router pim | Enters PIM configuration mode | router pim |
rp-address <ip> | Configures a rendezvous point for multicast | rp-address 10.10.10.1 |
10. Automation and Scripting
Command | Description | Example Usage |
feature bash-shell | Enables Bash shell for scripting | feature bash-shell |
cli alias name <alias> <command> | Creates a CLI alias for a command | cli alias name shint show interface |
python | Enters Python scripting mode | python |
event manager applet <name> | Creates an event-driven script | event manager applet TEST_APPLET |
This guide provides a quick reference to essential NX-OS commands specific to the Cisco Nexus 9000 Series. These commands help with switch configuration, network connectivity, security, and storage integrations.