Cisco Nexus 9000 Series NX-OS Configuration Commands

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

CommandDescriptionExample Usage
interface ethernet <slot/port>Enter interface configuration mode for a specific portinterface ethernet 1/1
switchport mode trunkSets the interface to trunk mode for VLAN taggingswitchport mode trunk
switchport access vlan <vlan_id>Assigns an interface to a VLAN in access modeswitchport access vlan 10
spanning-tree port type edgeConfigures the port as an edge port for STPspanning-tree port type edge

2. VLAN and VXLAN Configuration

CommandDescriptionExample Usage
vlan <vlan_id>Creates a VLAN and enters VLAN configuration modevlan 100
name <vlan_name>Assigns a name to a VLANname SALES_VLAN
feature vn-segment-vlan-basedEnables VXLAN with VLAN mappingfeature vn-segment-vlan-based
interface nve1Configures the VXLAN Network Virtualization Endpoint (NVE)interface nve1

3. Routing and IP Configuration

CommandDescriptionExample Usage
feature ospfEnables OSPF routing protocolfeature ospf
router ospf <process_id>Enters OSPF configuration moderouter ospf 1
interface vlan <vlan_id>Creates a VLAN interface for L3 routinginterface vlan 100
ip address <ip>/<subnet>Assigns an IP address to an interfaceip address 192.168.1.1/24

4. Security and AAA Configuration

CommandDescriptionExample Usage
TACACS+ Configuration  
feature tacacs+Enables TACACS+ authenticationfeature tacacs+
tacacs-server host <ip>Configures a TACACS+ servertacacs-server host 10.1.1.1
aaa authentication login default group tacacs+ localSets up authentication order for TACACS+ and local fallbackaaa authentication login default group tacacs+ local
RADIUS Configuration  
feature radiusEnables RADIUS authenticationfeature radius
radius-server host <ip>Configures a RADIUS serverradius-server host 10.1.1.3
aaa authentication login default group radius localSets up authentication order for RADIUS and local fallbackaaa authentication login default group radius local
aaa authorization exec default group radius localSets up authorization order for exec commands using RADIUSaaa authorization exec default group radius local
LDAP Configuration  
feature ldapEnables LDAP authenticationfeature ldap
ldap-server host <ip>Configures an LDAP serverldap-server host 10.1.1.2
aaa authentication login default group ldap localSets up authentication order for LDAP and local fallbackaaa authentication login default group ldap local
ldap-server search-base <dn>Configures the LDAP search base DNldap-server search-base dc=example,dc=com
ldap-server attribute mapMaps LDAP attributes to local attributesldap-server attribute map uid username
aaa authorization exec default group ldap localSets up authorization order for exec commands using LDAPaaa authorization exec default group ldap local

 

5. Fabric and VPC Configuration

CommandDescriptionExample Usage
feature vpcEnables VPC featurefeature vpc
vpc domain <domain_id>Configures a VPC domainvpc domain 10
peer-keepalive destination <ip>Configures peer-keepalive linkpeer-keepalive destination 10.1.1.2
interface port-channel <id>Creates a port-channel interfaceinterface port-channel 1

6. Storage and FCoE Configuration

CommandDescriptionExample Usage
feature fcoeEnables FCoE supportfeature fcoe
feature npivEnables NPIV on the switchfeature npiv
interface vfc <id>Creates a virtual Fibre Channel interfaceinterface vfc 10
bind interface ethernet <slot/port>Binds VFC to a physical interfacebind interface ethernet 1/10

7. System and Management Configuration

CommandDescriptionExample Usage
feature bash-shellEnables Bash shell accessfeature bash-shell
feature telnetEnables Telnet accessfeature telnet
show versionDisplays system version detailsshow version
copy running-config startup-configSaves configuration to startup-configcopy running-config startup-config

8. QoS (Quality of Service) Configuration

CommandDescriptionExample Usage
feature qosEnables QoS on the switchfeature qos
policy-map <name>Creates a QoS policy mappolicy-map QOS_POLICY
class-map <name>Defines a traffic class for QoSclass-map CLASS1
service-policy <policy_name>Applies a QoS policy to an interfaceservice-policy QOS_POLICY

9. Multicast and PIM Configuration

CommandDescriptionExample Usage
feature pimEnables Protocol Independent Multicast (PIM)feature pim
ip pim sparse-modeEnables sparse mode on an interfaceip pim sparse-mode
router pimEnters PIM configuration moderouter pim
rp-address <ip>Configures a rendezvous point for multicastrp-address 10.10.10.1

10. Automation and Scripting

CommandDescriptionExample Usage
feature bash-shellEnables Bash shell for scriptingfeature bash-shell
cli alias name <alias> <command>Creates a CLI alias for a commandcli alias name shint show interface
pythonEnters Python scripting modepython
event manager applet <name>Creates an event-driven scriptevent 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.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top