Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityIntermediate

Cisco NX-OS basics for Nexus switches: features, interfaces, checkpoints and vPC

In short: NX-OS looks like IOS at first but works differently in important ways. Protocols are switched on with feature commands, the management port lives in its own VRF, routing is enabled on interfaces, and checkpoints make rollback easy. Virtual port channels let two Nexus switches share a port channel so servers use both links.

First things to notice

  • Features are off until enabled. feature ospf, feature bgp, feature interface-vlan, feature lacp, feature hsrp, feature vpc. If a command is "not recognised", the feature is probably missing. show feature lists them.
  • Interface names are Ethernet1/1 regardless of speed, and breakout ports become Ethernet1/49/1.
  • Management is separate. mgmt0 sits in the management VRF, so tests need the VRF: ping 10.0.0.1 vrf management, copy scp: bootflash: vrf management.
  • Prefix notation uses slashes: ip address 10.1.1.1/24.

Routing on NX-OS

feature ospf
feature interface-vlan
router ospf UNDERLAY
  router-id 10.255.0.11
interface loopback0
  ip address 10.255.0.11/32
  ip router ospf UNDERLAY area 0.0.0.0
interface Ethernet1/49
  no switchport
  mtu 9216
  ip address 10.1.1.1/31
  ip ospf network point-to-point
  ip router ospf UNDERLAY area 0.0.0.0
  no shutdown

OSPF is enabled per interface rather than with network statements, and process names can be words. Jumbo MTU of 9216 is common in data centres, especially with VXLAN.

Checkpoints and rollback

checkpoint BEFORE-CHANGE
! ... make changes ...
show diff rollback-patch checkpoint BEFORE-CHANGE running-config
rollback running-config checkpoint BEFORE-CHANGE

NX-OS also creates automatic checkpoints in some situations. Rollback applies only the differences and can run in atomic mode, so either everything is restored or nothing changes.

A Nexus vPC pairServer or switchone port channel, two linksvPC member portsone on each NexusvPC peer linksyncs MACs and statePeer keepaliveseparate path, heartbeat
Figure 1. vPC lets two Nexus switches act as one for port channels, so both links forward and spanning tree blocks nothing.

Virtual port channel (vPC)

vPC lets a server or downstream switch build one port channel with one link to each of two Nexus switches. Both links forward, spanning tree sees a single logical link, and either Nexus can fail without the server losing its connection. The pieces are:

  • vPC domain with the same ID on both switches.
  • Peer keepalive: a heartbeat over a separate path, often mgmt0, to tell "peer is dead" apart from "peer link is down".
  • Peer link: a port channel between the two switches that carries control information and some traffic.
  • vPC member ports: the port channels to servers, with the same vpc number on both switches.
feature vpc
feature lacp
vpc domain 10
  peer-keepalive destination 10.0.0.12 source 10.0.0.11 vrf management
  peer-switch
  peer-gateway
interface port-channel1
  switchport mode trunk
  vpc peer-link
interface port-channel20
  switchport mode trunk
  vpc 20

show vpc and show vpc consistency-parameters are the first checks. Settings such as VLANs, MTU and STP mode must match on both sides or vPC ports will be suspended.

Real-world example: the ping that "failed"

A new engineer could not ping the TFTP server from a Nexus switch to back up its configuration, although the server was reachable from everywhere else. The server was only reachable through the management network, and the ping used the default VRF. Adding vrf management to the ping and the copy command fixed it immediately.

Practice

What must you do on NX-OS before configuring OSPF or SVIs?
Enable the features with feature ospf and feature interface-vlan.
Why does ping to a management server sometimes fail on NX-OS?
mgmt0 is in the management VRF, so you must add vrf management to the command.
What is the purpose of the vPC peer keepalive?
It is a separate heartbeat that lets each switch tell whether its peer is still alive when the peer link fails.

Key takeaways

  • NX-OS needs features enabled before most protocols work.
  • mgmt0 lives in the management VRF; add vrf management to commands.
  • Checkpoints and rollback make changes easy to undo.
  • vPC lets two Nexus switches share a port channel so both links forward.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: