Cisco NX-OS Command Reference
78 NX-OS commands covering vPC, VxLAN, BGP, and Nexus data center switching. Essential for CCNP Data Center (DCCORE 350-601) exam preparation.
vPC (Virtual Port Channel)
8 commandsfeature vpc
Enables the Virtual Port Channel (vPC) feature on the Nexus switch, allowing the creation of vPC domains for multi-chassis link aggregation.
Global Config
peer-keepalive destination [ip]
Configures the destination IP address for the Virtual Port Channel (vPC) peer-keepalive link, which monitors the health of the vPC peer device.
VPC Domain Config
show vpc
Displays the status and configuration of Virtual Port Channel (vPC) on Cisco NX-OS switches.
EXEC
show vpc brief
Displays a summary of the vPC status, including domain ID, peer link status, and consistency parameters.
EXEC
show vpc consistency-parameters
Displays the consistency parameters for vPC links, ensuring that both peer switches have identical configurations to prevent traffic disruption.
EXEC
vpc [id]
Assigns a Virtual Port Channel (vPC) domain ID to an interface, enabling it to participate in a vPC with a peer switch.
Interface Config
vpc domain [id]
Enters VPC domain configuration mode and creates or modifies a Virtual Port Channel domain with a specified ID.
Global Config
vpc peer-link
Configures an interface as a Virtual Port Channel (vPC) peer-link, which is used to synchronize state and forward traffic between vPC peer switches.
Interface Config
VxLAN
7 commandsfeature nv overlay
Enables the NX-OS overlay feature, which is required for VXLAN and other overlay networking technologies.
Global Config
feature vn-segment-vlan-based
Enables VLAN-based VXLAN network segmentation on the switch, allowing VLANs to be mapped to VXLAN segments.
Global Config
interface nve1
Enters NVE (Network Virtualization Edge) interface configuration mode to configure VXLAN tunnel endpoints.
Global Config
member vni [id] ingress-replication protocol bgp
Configures a VNI member under an NVE interface to use ingress replication with BGP as the control plane for VXLAN.
NVE Config
show nve peers
Displays information about NVE peers, including their IP addresses, interface state, uptime, and control-plane or data-plane learning details.
EXEC
show nve vni
Displays the operational state and configuration of Network Virtualization Edge (NVE) VNI members, including local and remote endpoints, multicast groups, and VNI state.
EXEC
vn-segment [vni-id]
Maps a VLAN to a VXLAN Network Identifier (VNI) to enable VXLAN bridging and routing on Cisco Nexus switches.
VLAN Config
BGP
4 commandsfeature bgp
Enables the BGP routing protocol on the Cisco NX-OS device.
Global Config
neighbor [ip] remote-as [asn]
Establishes a BGP peering session with a neighbor by specifying its IP address and autonomous system number.
BGP Config
router bgp [asn]
Enters BGP router configuration mode for the specified autonomous system number.
Global Config
show bgp ipv4 unicast summary
Displays a summary of BGP IPv4 unicast neighbor status, including prefixes received and state information.
EXEC
OSPF
5 commandsfeature ospf
Enable the OSPF routing protocol process on the switch.
Global Config
ip router ospf [pid] area [area-id]
Enables OSPF routing on an interface and assigns it to a specific OSPF process and area.
Interface Config
router ospf [process-id]
Enters OSPF router configuration mode for a specified process ID to configure OSPF routing protocol parameters.
Global Config
show ip ospf database
Displays the OSPF link-state database (LSDB) for a specified OSPF process, showing all LSAs known to the router.
EXEC
show ip ospf neighbors
Displays OSPF neighbor information on Cisco NX-OS devices.
EXEC
VLAN
9 commandsname [vlan-name]
Assigns a descriptive name to a VLAN for easier identification in configurations and show commands.
VLAN Config
show vlan
Displays VLAN information including VLAN IDs, names, status, and ports assigned to each VLAN.
EXEC
show vlan brief
Displays a summary of all VLANs configured on the switch, including VLAN ID, name, status, and ports.
EXEC
state active
Sets the administrative state of a VLAN to active, enabling it for Layer 2 switching.
VLAN Config
switchport access vlan [id]
Assigns a specific VLAN to an access port, placing the interface in that VLAN for untagged traffic.
Interface Config
switchport mode access
Configures an interface as a Layer 2 access port, placing it in a single VLAN and removing any trunking behavior.
Interface Config
switchport mode trunk
Configures a switch interface as a trunk port, allowing multiple VLANs to traverse the link.
Interface Config
switchport trunk allowed vlan [list]
Configures the list of VLANs allowed on a trunk interface on Cisco NX-OS (Nexus) switches.
Interface Config
vlan [id]
Creates or enters VLAN configuration mode for a specific VLAN ID on Cisco NX-OS.
Global Config
Spanning Tree
5 commandsshow spanning-tree
Displays the Spanning Tree Protocol (STP) status and configuration for all VLANs or a specific VLAN on Cisco NX-OS switches.
EXEC
show spanning-tree brief
Displays a brief summary of the Spanning Tree Protocol (STP) state for all VLANs or a specified VLAN on Cisco NX-OS switches.
EXEC
spanning-tree mode [rapid-pvst|mst]
Configures the Spanning Tree Protocol (STP) mode to either Rapid PVST+ or MST on a Cisco Nexus switch.
Global Config
spanning-tree port type edge
Configures a port as an edge port (PortFast) to immediately transition to forwarding state, bypassing STP listening and learning phases.
Interface Config
spanning-tree vlan [id] priority [value]
Sets the bridge priority for a specific VLAN to influence root bridge election in Spanning Tree Protocol.
Global Config
Port Channel
5 commandschannel-group [id] mode [active|passive|on]
Assigns an interface to a port-channel and sets the LACP negotiation mode.
Interface Config
feature lacp
Enables Link Aggregation Control Protocol (LACP) on the switch to allow dynamic formation of port channels.
Global Config
interface port-channel [id]
Creates or enters interface configuration mode for a port-channel (EtherChannel) interface on Cisco NX-OS.
Global Config
show lacp neighbor
Displays detailed LACP neighbor information for all port-channels or a specified interface, including partner system ID, port, and LACP state.
EXEC
show port-channel summary
Displays a summary of all configured port channels, including their status, protocol, and member interfaces.
EXEC
Interfaces
4 commandsfeature interface-vlan
Enables the creation and configuration of VLAN interfaces (SVI) on the switch.
Global Config
show interface
Displays the status and configuration of all interfaces or a specified interface on a Cisco Nexus switch.
EXEC
show interface brief
Displays a summary of all interfaces on the switch, including their status, protocol, and basic configuration.
EXEC
show ip interface brief
Displays a summary of all IP interfaces, including their status, protocol state, and IP address.
EXEC
Routing
3 commandsip route [prefix] [mask] [next-hop]
Configures a static route in the routing table on Cisco NX-OS devices.
Global Config
show ip route
Displays the current IP routing table, including directly connected, static, and dynamic routes learned via routing protocols.
EXEC
show ip route summary
Displays a summary of the IP routing table, including route counts by protocol and network prefixes.
EXEC
ACL
5 commandsdeny ip [source] [dest] log
Creates an ACL entry that denies IP traffic from source to destination and logs matches.
ACL Config
ip access-group [name] [in|out]
Applies an IPv4 ACL to an interface for inbound or outbound traffic filtering.
Interface Config
ip access-list [name]
Creates or modifies an IP access list to filter traffic based on source and destination addresses, protocols, and ports.
Global Config
permit ip [source] [dest]
Configures a permit rule in an IPv4 ACL to allow traffic matching specified source and destination addresses.
ACL Config
show ip access-lists
Displays the contents of all IPv4 and IPv6 access control lists (ACLs) configured on the device, including statistics for each entry.
EXEC
Redundancy (HSRP / VRRP)
6 commandsfeature hsrp
Enables the Hot Standby Router Protocol (HSRP) feature on the switch, allowing configuration of HSRP groups for first-hop redundancy.
Global Config
hsrp [group]
Configures HSRP (Hot Standby Router Protocol) parameters on an interface for gateway redundancy.
Interface Config
ip [virtual-ip]
Configures a virtual IP address for an HSRP group on a Cisco Nexus interface.
HSRP Config
priority [value] forwarding-threshold lower [l] upper [u]
Configures HSRP priority and sets forwarding thresholds to control active router election and preemption behavior.
HSRP Config
show hsrp
Displays Hot Standby Router Protocol (HSRP) status and configuration information for all groups or a specified interface/group on Cisco NX-OS (Nexus) switches.
EXEC
show hsrp brief
Displays a summary of all HSRP groups configured on the switch, including group state, virtual IP, and active/standby routers.
EXEC
System Management
10 commandscheckpoint [name]
Creates a named checkpoint of the current running configuration that can be used to roll back to a known state.
EXEC
copy running-config startup-config
Saves the active running configuration to the startup configuration file so that it persists after a reload.
EXEC
rollback running-config checkpoint [name]
Rolls back the running configuration to a previously saved checkpoint.
EXEC
show environment
Displays the environmental status of the chassis, including temperature, voltage, power supply, and fan information.
EXEC
show feature
Displays the status of all licensed and unlicensed features on the Cisco Nexus switch, including whether each feature is enabled or disabled.
EXEC
show module
Displays the status, hardware model, serial number, and software version of all modules installed in the chassis.
EXEC
show processes cpu
Displays CPU utilization statistics for processes running on the Cisco Nexus switch.
EXEC
show processes memory
Displays memory usage statistics for all processes running on the Cisco Nexus switch.
EXEC
show running-config
Displays the current running configuration of the Cisco NX-OS device.
EXEC
show version
Displays system hardware and software information including version, uptime, and hardware details.
EXEC
Diagnostics
5 commandsping [ip]
Tests basic network connectivity to a remote host by sending ICMP echo requests and waiting for replies.
EXEC
show hardware
Displays hardware inventory, status, and environmental information for Cisco Nexus switches.
EXEC
show logging
Displays system logging messages and configuration for Cisco NX-OS devices.
EXEC
show tech-support
Collects a comprehensive set of system information for troubleshooting and technical support.
EXEC
traceroute [ip]
Traces the route packets take from the Nexus switch to a destination IP address, showing each hop along the path.
EXEC
CDP / LLDP
2 commandsshow cdp neighbors detail
Displays detailed information about neighboring devices discovered via the Cisco Discovery Protocol (CDP), including device ID, platform, capabilities, and IP addresses.
EXEC
show lldp neighbors detail
Displays detailed information about LLDP neighbors discovered on the switch.
EXEC
Prepare for CCNP Data Center
NX-OS commands mastered. Now test yourself with real CCNP Data Center exam-style questions.