Cumulus Linux Quick Reference Guide
for NX-OS Users
Converting common NX-OS commands to Cumulus Linux
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Contents
Out of the Box ............................................................................................................................ 3
Auto Provisioning ........................................................................................................................ 4
Basic System Management Initial Configuration .................................................................................. 4
CLI Basics ................................................................................................................................ 9
Configure Switch Front Panel Ports .................................................................................................. 10
Configure Switch Ports in Single Layer 2 VLAN ..................................................................................... 14
Spanning Tree (STP and RSTP)....................................................................................................... 16
Link Aggregation ....................................................................................................................... 17
Configure Static Routing .............................................................................................................. 18
Configure Dynamic Routing .......................................................................................................... 20
Show Running State and Persistent Configuration ................................................................................ 23
Configuration Backup and Restore .................................................................................................. 24
Network OS Upgrade .................................................................................................................. 26
Monitoring .............................................................................................................................. 26
Generate Tech Support Files ......................................................................................................... 29
September 29, 2014
2014 Cumulus Networks. CUMULUS, the Cumulus Logo, CUMULUS NETWORKS, and the Rocket Turtle Logo (the Marks) are trademarks and service marks of Cumulus Networks, Inc. in the U.S. and other countries.
You are not permitted to use the Marks without the prior written consent of Cumulus Networks. The registered trademark Linux is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner
of the mark on a world-wide basis. All other marks are used under fair use or license from their respective owners.
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Out of the Box
Cumulus Linux
Cisco Nexus 3000 Series
Cumulus Linux network OS not installedboot up in ONIE
Cisco NX-OS network OS installed
ONIE discovery will look for and execute onie-installer
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Connect to serial console port at 115200 baud
Connect to serial console port at 9600 baud
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Default management configuration:
Default management configuration:
hostname = <manufacturer name/device SKU> (e.g. dni7448)
hostname = switch
Configure eth0 in /etc/network/interfaces (default is dchp)
eth0 preconfigured
Loopback (lo) preconfigured in /etc/network/interfaces
loopback preconfigured
Set hostname, DNS, NTP, DCHP relay agent
DNS, NTP, DCHP relay agent enabled
Syslog enabled by default
Syslog enabled and messages appear on console
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Default switch port configuration:
All data plane switch ports (all Ethernet ports except management
port) are disabled
MTU set to 1500
Flow control disabled
LLDP enabled
STP disabled
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Default switch port configuration:
All switch ports in same bridge domain
All ports configured in VLAN 1
MTU set to 1500
Flow control disabled
CDP (LLDP) enabled
STP enabled on all VLANs
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Auto Provisioning
Cumulus Linux
Cisco Nexus 3000 Series
Zero Touch Provisioning
Power On Auto Provisioning (POAP)
1. Boot up Cumulus Linux on switch
2. Zero touch provisioning invoked if eth0 on switch is connected to
management network and eth0 is set to DCHP (default)
3. If option 239 is present from DHCP server with URL, script execution
(hosted on HTTP server, must contain CUMULUS-AUTOPROVISIONING
flag)
4. Return code of script of 0 indicates provisioning complete
1. Power up and boot into POAP mode (if no configuration file found or
boot poap enable command used)
2. USB discovery
3. DHCP discovery
4. Script execution (hosted on TFTP or HTTP server)
5. Post-installation reload
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/provisioning.html
Basic System Management Initial Configuration
Cumulus Linux
Cisco Nexus 3000 Series
Default admin user: cumulus
Default admin user: admin
Default password: CumulusLinux!
Default password: (none defined)
(Use sudo to execute commands with root privileges.)
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Install Cumulus Linux license key (not tied to specific device)
Install Cisco NX-OS software feature license key (tied to specific device, if not
already on device)
cumulus@switch:~$ sudo cl-license -i license_file.txt
or
cumulus@switch:~$ sudo cl-license -i <license_file_URL>
switch# install license bootflash:license_file.lic
Installing license ..done
switch# show license
and
switch# show license usage
cumulus@switch:~$ sudo reboot
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Set hostname (e.g. to Switch1) short hostname persistent
Set hostname (e.g. to Switch1) persistent
cumulus@switch:~$ sudo vi /etc/hostname
switch# configure terminal
(syntax as follows)
switch(config)# hostname Switch1
Switch1
Switch1(config)# exit
Switch1# copy running-config startup-config
Set hostname short hostname non-persistent
cumulus@switch:~$ sudo hostname Switch1
Note: A reboot is needed to take effect. To have the hostname change take into
effect without a reboot, you can use the change_hostname.sh script at
https://gist.github.com/skamithi/8561502
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Set hostname FQDN
Set hostname FQDN and configure DNS
cumulus@switch:~$ sudo vi /etc/hosts
switch# configure terminal
(syntax as follows)
switch(config)# vrf context management
127.0.0.1
switch(config-vrf)# ip host hostname ip-address
localhost
ip-address hostname
switch(config-vrf)# ip name-server ip-address1 ip-address2
Configure DNS
switch(config)# exit
cumulus@switch:~$ sudo vi /etc/resolv.conf
switch# copy running-config startup-config
ip-address3
(syntax as follows, up to 3 nameservers at a time)
search isp
nameserver ip-address1
nameserver ip-address2
nameserver ip-address3
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Set message of the day (MOTD)
Set message of the day (MOTD) (e.g. to Welcome)
cumulus@switch:~$ sudo vi /etc/motd
switch# configure terminal
See: https://wiki.debian.org/motd
switch(config)# banner motd #Welcome#
switch(config)# exit
switch# show banner motd
switch# copy running-config startup-config
Configure time zone and verify
Configure time zone (e.g. to PST) and verify
cumulus@switch:~$ sudo tzconfg
switch# configure terminal
cumulus@switch:~$ sudo hwclock
switch(config)# clock timezone PST -8 0
See: http://www.debian.org/doc/manuals/system-administrator/ch-sysadmintime.html and http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html
switch(config)# exit
switch# show clock
switch# copy running-config startup-config
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Set NTP
Set NTP (e.g. to VDC 1)
cumulus@switch:~$ sudo vi /etc/ntp.conf
switch# clock protocol ntp vdc 1
cumulus@switch:~$ ntpd q
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html and
https://wiki.debian.org/DateTime
Set clock
Set clock
cumulus@switch:~$ sudo hwclock --set --date MM/DD/YYYY HH:MM:SS
switch# clock set HH:MM:SS DD month YYYY
See: http://man.he.net/man8/hwclock
Configure management interface
Configure management interface
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch# configure terminal
(syntax as follows)
switch(config)# interface mgmt 0
auto eth0
switch(config-if)# ip address ipv4-address subnet-mask
iface eth0
(optional: add inet static if changing from dhcp)
address ipv4-address/subnet-mask
(only if set to static)
gateway default-gateway-ip-address
(only if set to static)
switch(config-if)# no shutdown
switch(config-if)# exit
switch(config)# vrf context management
switch(config-vrf)# ip route 0.0.0.0 0.0.0.0 default-gateway-ip-address
Apply above persistent settings to eth0
switch(config-vrf)# exit
cumulus@switch:~$ sudo ifup eth0
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html and
http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/ifupdown.html
Stop and start management interface
Stop and start management interface
cumulus@switch:~$ sudo ifdown eth0
switch# configure terminal
cumulus@switch:~$ sudo ifup eth0
switch(config)# interface mgmt 0
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html
switch(config-if)# shutdown
switch(config-if)# no shutdown
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Show management interface current configuration
Show management interface configuration
cumulus@switch:~$ ifquery eth0
switch# show interface mgmt 0
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html
Add IP address to loopback lo interface. (Loopback lo is created by default)
Configure loopback interface
Add the following line to the lo configuration after iface lo inet loopback:
switch# configure terminal
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch(config)# interface loopback0
(syntax as follows)
switch(config-if)# ip address ipv4-address subnet-mask
address ip-address/subnet-mask
switch(config-if)# exit
Set speed/duplex of management interface, if necessary (e.g. 100 full duplex
no autonegotiate)
Set speed/duplex of management interface, if necessary
cumukus@switch:~$ sudo ethtool -s eth0 speed 100 duplex full autoneg off
switch(config)# interface mgmt 0
See: https://wiki.debian.org/NetworkConfiguration
switch(config-if)# speed speed
switch# configure terminal
switch(config-if)# duplex mode
Add user account
cumulus@switch:~$ sudo adduser userid
Add user account
switch# configure terminal
Show users currently logged in
switch(config)# username userid
cumulus@switch:~$ sudo users
Show all defined user accounts
Show user sessions
cumulus@switch:~$ sudo cat /etc/passwd
switch# show users
See: http://www.debian.org/doc/manuals/system-administrator/ch-sysadminusers.html and https://wiki.debian.org/ShellCommands
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Configure DHCP relay agent
Configure DCHP relay agent (enabled by default)
cumulus@switch:~$ sudo apt-get install dhcp-helper
switch# configure terminal
switch(config)# ip dhcp relay
Configure DCHP server addresses to forward packets
cumulus@switch:~$ sudo dhcp-helper s ip-address
See: http://www.linuxcertif.com/man/8/dhcp-helper/ and
http://amadys.blogspot.com/2010/09/dhcp-helper-dhcp-relay-agent-forlinux.html
Configure DCHP server addresses to forward packets via an interface (e.g.
switch slot 1 / port 1)
switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# ip dhcp relay address ip-address
CLI Basics
Cumulus Linux
Cisco Nexus 3000 Series
Show command history
Show command history
cumulus@switch:~$ history
switch# show cli history
See: https://wiki.debian.org/CommandsFileManager
Send message to all logged on users
Send message to all logged-on users
cumulus@switch:~$ echo message | sudo wall
switch# send message
Send message to specific user
Send message to specific user session
cumulus@switch:~$ sudo write user-id
switch# show users
See: http://www.computerhope.com/unix/wall.htm and
http://www.computerhope.com/unix/write.htm
switch# send session line message
Reboot switch
Reboot switch
cumulus@switch:~$ sudo reboot
switch# reload
See: http://www.queryadmin.com/151/reboot-shutdown-debian-commandline/
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Configure Switch Front Panel Ports
Cumulus Linux
Cisco Nexus 3000 Series
Define switch port interface (e.g. swp1)
Configure interface as switch port (e.g. switch slot 1 / port 1)
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch# configure terminal
(syntax as follows)
switch(config)# interface ethernet 1/1
auto swp1
switch(config-if)# switchport
iface swp1
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html and
http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/interfaces.html
Add IP address to switch port (e.g. swp1)
Add IP address to switch port (e.g. switch slot 1 / port 1)
cumulus@switch:~$ sudo vi /etc/network/interfaces
All Ethernet ports are default Layer 2; to change to Layer 3, use no switchport
(syntax as follows)
switch# configure terminal
auto swp1
switch(config)# interface ethernet 1/1
iface swp1
switch(config-if)# no switchport
address ipv4-address/subnet-mask
switch(config-if)# ip address ipv4-address/subnet-mask
address ipv6-address/subnet-mask
switch(config-if)# ipv6 address ipv6-address/subnet-mask
Apply above persistent settings to swp1
Save above settings for persistence at next startup.
cumulus@switch:~$ sudo ifup swp1
switch(config)# copy running-config startup-config
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html#ifupdown
10
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Set speed/duplex of interface, if necessary
Set speed/duplex of interface, if necessary
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch# configure terminal
Add the following in the interface definition:
switch(config)# interface ethernet slot / port
(syntax as follows)
switch(config-if)# speed speed
iface swp1
switch(config-if)# duplex mode
link-speed speed
link-duplex [full|half]
Save above settings for persistence at next startup.
link-autoneg [on|off]
switch(config)# copy running-config startup-config
Apply above persistent settings to swp1
cumulus@switch:~$ sudo ifup swp1
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ports_conf.html
Set MTU size (e.g. to 9216) on switch port (e.g. swp1)
Set MTU size (e.g. to 9216, max) for all classes for all ports
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch# configure terminal
Add the following in the interface definition:
switch(config)# policy-map type network-qos jumbo
(syntax as follows)
switch(config-pmap-nq)# class type network-qos class-default
iface swp1
switch(config-pmap-c-nq)# mtu 9216
mtu 9216
switch(config-pmap-c-nq)# exit
switch(config-pmap-nq)# exit
Apply above persistent settings to swp1
cumulus@switch:~$ sudo ifup swp1
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html
switch(config)# system qos
switch(config-sys-qos)# service-policy type network-qos jumbo
Save above settings for persistence at next startup.
switch(config)# copy running-config startup-config
11
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Show current interface state for all switch ports
Show current interface state for all switch ports
cumulus@switch:~$ ip -br link show
switch# show interface brief
Show current interface status for all switch ports
Show current interface status for all switch ports
cumulus@switch:~$ netstat i
switch# show interface status
Show current interface state for all switch ports that are up
Show current interface state for all switch ports that are up
cumulus@switch:~$ ip link show up
switch# show interface status up
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html and
http://www.linuxcommand.org/man_pages/netstat8.html
Show current IP address (IPv4/IPv6) assignment for interfaces
Show current IP address (IPv4/IPv6) assignment for interface
cumulus@switch:~$ ip br addr show
switch# show ip interface brief
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html
switch# show ipv6 interface brief
Bring switch port (e.g. swp1) up or down
Bring interface (e.g. switch slot 1 / port 1) up or down
cumulus@switch:~$ sudo ifup swp1
switch# configure terminal
cumulus@switch:~$ sudo ifdown swp1
switch(config)# interface ethernet 1/1
or
switch(config-if)# shutdown
cumulus@switch:~$ sudo ip link set dev swp1 up
switch(config-if)# no shutdown
cumulus@switch:~$ sudo ip link set dev swp1 down
(First example uses interfaces file; second is electrical at device level)
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html
12
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Show interface statistics for all switches and switch port (e.g. swp1)
Show interface statistics for all switches and interface (e.g. switch slot 1 /
port 1)
cumulus@switch:~$ ip -s link
cumulus@switch:~$ ip -s link show dev swp1
switch# show interface
switch# show interface ethernet 1/1
Show low-level interface statistics for switch port (e.g. swp1)
cumulus@switch:~$ sudo ethtool S swp1
Show Layer 3 interface statistics (e.g. for switch slot 1 / port 1)
switch# show interfaces
Show interface connector information for switch port (e.g. swp1)
cumulus@switch:~$ sudo ethtool m
swp1
Show interface connector information (e.g. for switch slot 1 / port 1)
switch# show interface ethernet 1/1 transceiver
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html and
http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html
Show interface neighbors
Show interface neighbors
cumulus@switch:~$ sudo lldpcli show neighbors [summary|detail]
switch# show lldp neigbhors
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/lldp.html
Show neighbors for Cisco devices running CDP without LLDP support
switch# show cdp neigbhors
Show ARP table
Show ARP table
cumulus@switch:~$ arp n
switch# show ip arp
See: http://www.lainoox.com/display-add-flush-arpcache-linux-arp/ and
http://cumulusnetworks.com/docs/2.2/userguide/network_diagnostics/index.html
13
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Configure Switch Ports in Single Layer 2 VLAN
Cumulus Linux
Cisco Nexus 3000 Series
Create a bridge domain (e.g. bridge-for-v10) and place all ports (swp1, swp2,
swp3,) into a single untagged VLAN (default IEEE).
Create a bridge domain (e.g. vlan-10) and place all ports (eth 1/1, eth 1/2,
eth 1/3,) into a single untagged VLAN (default IEEE).
cumulus@switch:~$ sudo vi /etc/network/interfaces
Default out of the box configuration has all switch ports in a single domain on
VLAN 1. In the following example, a new domain is created.
(syntax as follows)
auto swp1
iface swp1
Create a new domain bridge.
auto swp2
switch# configure terminal
iface swp2
switch(config)# vlan 10
auto swp3
switch(config-vlan)# exit
iface swp3
Place all switch ports into a single VLAN.
...
switch(config)# interface eth 1/1-3
Create a new domain bridge.
switch(config-if-range)# switchport
switch(config-if-range)# switchport mode access
auto bridge-for-v10
switch(config-if-range)# switchport access vlan 10
iface bridge-for-v10
bridge-ports swp1 swp2 swp3...
address ip-address/subnet-mask
(if adding IP address to bridge)
Add IP address to bridge (e.g. SVI interface)
switch(config)# feature interface vlan
Apply above persistent settings to bridge-for-v10
cumulus@switch:~$ sudo ifup bridge-for-v10
Note: all dependent interfaces need to be listed in /etc/network/interfaces
before parent interfaces. Order lo, eth, swp, and bond interfaces before subinterfaces, grouped by VLANs
switch(config)# interface vlan 10
switch(config-if)# ip address ip-address/subnet-mask
switch(config-if)# no shutdown
Save above settings for persistence at next startup.
switch(config)# copy running-config startup-config
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html
14
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Show learned MAC address table
Show learned MAC address table
cumulus@switch:~$ sudo brctl showmacs bridgeID
switch# show mac address-table
See: http://www.linuxdoc.org/HOWTO/BRIDGE-STP-HOWTO/set-up-thebridge.html
15
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Spanning Tree (STP and RSTP)
Cumulus Linux
Cisco Nexus 3000 Series
Enable RSTP/STP on bridge (e.g. bridge1)
Enable Rapid PVST+ on switch (enabled by default on VLAN 1 and all
subsequent VLANs created)
(Cumulus Linux starts off with RSTP and falls back to STP)
cumulus@switch:~$ sudo vi /etc/network/interfaces
(syntax as follows)
auto bridge1
iface bridge1
switch# configure terminal
switch(config)# spanning-tree mode rapid-pvst
Disable/enable Rapid PVST+ on VLAN (e.g. vlan 2; VLAN 1 always enabled)
bridge-ports swp1 swp2 swp3...
switch# configure terminal
bridge-stp on
switch(config)# no spanning-tree vlan 2
switch(config)# spanning-tree vlan 2
Configure STP only (no RSTP) on bridge (e.g. bridge1) and set Spanning Tree
parameters.
Configure Spanning Tree parameters
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch# configure terminal
(syntax as follows)
switch(config)# spanning-tree [vlan id] parameter value
auto bridge1
iface bridge1
mstpctl_ports swp1 swp2 swp3...
Save above settings for persistence/next startup.
switch# copy running-config startup-config
mstpclt_stp on
mstpctl-parameter value
Apply above persistent settings to bridge1
cumulus@switch:~$ sudo ifup bridge1
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/stp.html
Show RSTP/STP configuration on bridge (e.g. bridge1)
Show Rapid PVST+ Configuration
cumulus@switch:~$ sudo mstpctl showbridge bridge1
switch# show spanning-tree brief
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/stp.html
16
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Link Aggregation
Cumulus Linux
Cisco Nexus 3000 Series
Aggregate switch ports (e.g. swp1, swp2, swp3) into single Layer 3 bond (e.g.
bond1) using LACP
Configure Layer 3 port channel (e.g. port-channel 1, comprised of interfaces
1/1, 1/2, 1/3) using LACP
cumulus@switch:~$ sudo vi /etc/network/interfaces
switch# configure terminal
(syntax as follows)
switch(config)# feature lacp
auto bond1
switch(config)# interface port-channel 1
iface bond1
switch(config-if)# ip address ip-address/subnet-mask
address ip-address/subnet-mask
switch(config-if)# no shutdown
bond-slaves swp1 swp2 swp3
switch(config)# interface ethernet 1/1-3
bond-miimon 100
switch(config-if-range)# no switchport
bond-mode 802.3ad
switch(config-if-range)# channel-group 1 mode active
bond-use-carrier 1
switch(config-if-range)# lacp rate fast
bond-lacp-rate 1
switch(config-if-range)# lacp min-links 1
bond-min-links 1
switch(config-if-range)# exit
bond-xmit_hash_policy layer3+4
switch(config)# port-channel load-balance ethernet source-dest-port
switch(config)# end
Apply above persistent settings to bond1
cumulus@switch:~$ sudo ifup bond1
Save above settings for persistence/next startup.
switch# copy running-config startup-config
Note: all dependent interfaces need to be listed in /etc/network/interfaces
before parent interfaces. Order lo, eth, swp, and bond interfaces before subinterfaces, grouped by VLANs.
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/bonding.html
17
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Configure Static Routing
Cumulus Linux
Cisco Nexus 3000 Series
Configure a static route
Add a static route
via Quagga
switch# configure terminal
cumulus@switch:~$ sudo vtysh
switch(config)# ip route ip-address/subnet-mask next-hop
Hello, this is Quagga (version 0.99.21).
switch(config)# end
Copyright 1996-2005 Kunihiro Ishiguro, et al.
rut# configure terminal
Save above settings for persistence/next startup.
rut(config)# ip route ip-address/subnet-mask next-hop
switch# copy running-config startup-config
rut# write mem
Configuration saved to /etc/quagga/zebra.conf
rut# end
or through the interfaces file under a specified interface
cumulus@switch:~$ sudo vi /etc/network/interfaces
(syntax as follows)
iface swp3
post-up ip route add ip-address/subnet-mask via next-hop
pre-down ip route del ip-address/subnet-mask via next-hop
Apply above persistent settings to swp3
cumulus@switch:~$ sudo ifup swp3
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_3/static_routing.html and
http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/config.html
18
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Remove a static route
Remove a static route
cumulus@switch:~$ sudo ip route del ip-address/subnet-mask
switch# configure terminal
or via Quagga
switch(config)# no ip route ip-address/subnet-mask next-hop
cumulus@switch:~$ sudo vtysh
switch# exit
Hello, this is Quagga (version 0.99.21).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
rut# configure terminal
rut(config)# no ip route ip-address/subnet-mask next-hop
rut# end
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_3/static_routing.html
Display information on static routes
Display information on static routes
cumulus@switch:~$ ip route show
switch# show ip static-route
or via Quagga
cumulus@switch:~$ sudo vtysh
Hello, this is Quagga (version 0.99.21).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
rut# show ip route static
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_3/static_routing.html
19
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Configure Dynamic Routing
Cumulus Linux
Cisco Nexus 3000 Series
Enable OSPFv2 by adding the following line to /etc/quagga/daemons
Enable OSPFv2 by activating licensed feature:
ospfd=yes
switch# configure terminal
and restarting the Quagga daemon:
switch(config)# feature ospf
cumulus@switch:~$ sudo service quagga restart
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/config.html
Create OSPFv2 instance via Quagga:
Create OSPFv2 instance:
cumulus@switch:~$ sudo vtysh
switch# configure terminal
rut# configure terminal
switch(config)# router ospf instance-tag
rut(config)# router ospf
switch(config-router)# router-id ip-address
rut(config-router)# router-id ip-address
switch(config-router)# log-adjacency-changes detail
rut(config-router)# log-adjacency-changes detail
switch(config)# interface ethernet slot / port
Explicitly enable OSPF on a specific interface, e.g. swp1
switch(config-if)# no switchport
rut(config)# interface swp1
switch(config-if)# ip address ip-address/subnet-mask
rut(config-if)# ip ospf area area-id
switch(config-if)# ip router ospf instance-tag area area-id
Enable OSPF on all interfaces in a subnet
(Note: for IOS, use network command)
rut(config)# router ospf
switch(config)# router ospf instance-tag
rut(config-router)# network ip-address/subnet-mask area area-id
switch(config-router)# network ip-address/subnet-mask area area-id
Set optional parameters on an interface (e.g. swp1):
Set optional parameters on an interface (e.g. slot 1/port 1)
rut(config)# interface swp1
switch(config)# interface ethernet 1/1
rut(config-if)# ip ospf parameter value
switch(config-if)# ip ospf parameter value
(e.g. hello-interval 5)
(e.g. hello-interval 5)
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/ospf.html
20
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Enable OSPFv3 by adding the following line to /etc/quagga/daemons
Enable OSPFv3 by activating licensed feature:
ospf6d=yes
switch# configure terminal
and restarting the Quagga daemon:
switch(config)# feature ospfv3
cumulus@switch:~$ sudo service quagga restart
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/ospf6.html
Create OSPFv3 instance on a specific interface (e.g. swp1) via Quagga:
Create OSPFv3 instance:
cumulus@switch:~$ sudo vtysh
rut# configure terminal
switch# configure terminal
rut(config)# router ospf6
switch(config)# router ospfv3 instance-tag
rut(config-router)# router-id ip-address
switch(config-router)# router-id ip-address
rut(config-router)# log-adjacency-changes detail
switch(config-router)# log-adjacency-changes detail
rut(config-router)# interface swp1 area area-id
switch(config)# interface ethernet slot / port
Set optional parameters on interface (e.g. swp1):
switch(config-if)# ipv6 router ospfv3 instance-tag area area-id
rut(config)# interface swp1
rut(config-if)# ipv6 ospf6 parameter value
(Note: for IOS, use ipv6 ospf command on a specific interface)
(e.g. hello-interval 5)
switch(config)# interface ethernet slot / port
switch(config-if)# ipv6 ospf instance-tag area area-id
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/ospf6.html
Set optional parameters on a specific interface (e.g. slot 1/port 1)
switch(config)# interface ethernet 1/1
switch(config-if)# ospfv3 parameter value
(e.g. hello-interval 5)
21
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Enable BGP by adding the following line to /etc/quagga/daemons
Enable BGP by activating licensed feature:
bgpd=yes
switch# configure terminal
and restarting the Quagga daemon:
switch(config)# feature bgp
cumulus@switch:~$ sudo service quagga restart
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/bgp.html
Identify BGP node via Quagga:
Identify BGP node:
cumulus@switch:~$ sudo vtysh
switch# configure terminal
rut# configure terminal
switch(config)# router bgp ASN
rut(config)# router bgp ASN
switch(config-router)# router-id ip-address
rut(config-router)# bgp router-id ip-address
Specify neighbors:
Specify neighbors:
switch(config-router)# neighbor ip-address remote-as ASN
rut(config-router)# neighbor ip-address remote-as ASN
switch(config-router-neighbor)# address-family ipv4 unicast
rut(config-router)# address-family ipv4 unicast
switch(config-router-neighbor-af)# exit
rut(config-router-af)# neighbor ip-address activate
rut(config-router-af)# exit
switch(config-router-neighbor)# address-family ipv6 unicast
switch(config-router-neighbor-af)# exit
rut(config-router)# address-family ipv6 unicast
switch(config-router-neighbor)# exit
rut(config-router-af)# neighbor ip-address activate
rut(config-router-af)# exit
switch(config-router)# address-family ipv4 unicast
switch(config-router-af)# network ip-prefix
rut(config-router)# address-family ipv4 unicast
rut(config-router-af)# network ip-prefix
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/bgp.html
22
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Show Running State and Persistent Configuration
Cumulus Linux
Cisco Nexus 3000 Series
Show running state
Show CPU processes and utilization
cumulus@switch:~$ sudo cat /proc/cpuinfo
switch# show processes cpu
cumulus@switch:~$ sudo cat /proc/meminfo
switch# show processes memory
See: http://wiredrevolution.com/system-administration/view-systeminformation-with-proccpuinfo-and-procmeminfo
Show running settings from /etc/network/interfaces configuration:
cumulus@switch:~$ ifquery r -a
Show running configuration settings (items configured since last save are not
persistent)
switch# show running-config
Show running configuration settings from Quagga (items configured since last
save are not persistent):
rut# show running-config
Persistent configuration files are stored in files in /etc. Notable files are:
Show persistent settings (what takes into effect upon next boot).
/etc/network/interfaces
switch# show startup-config
/etc/quagga/daemons
/etc/quagga/zebra.conf
/etc/quagga/ospfd.conf
/etc/quagga/ospf6d.conf
/etc/quagga/bgpd.conf
/etc/hostname
/etc/hosts
/etc/resolv.conf
/etc/motd
/etc/ntp.conf
/etc/passwd
/etc/default/grub
23
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Configuration Backup and Restore
Cumulus Linux
Cisco Nexus 3000 Series
For persistence, configuration files must be modifiedcommands issued on the
Cumulus Linux CLI are non-persistent.
Copy current settings in memory (non-persistent) for persistence at next
startup.
Settings changed via Quagga are saved into persistent configuration files.
switch# copy running-config startup-config
or
Back up non-persistent settings to a remote server, e.g. 10.10.1.1 for use in
copying back to switch
switch# copy running-config tftp://10.10.1.1/sw1-run-config.bak
Back up user configuration from read-write user directories of current slot to
persistent mount.
N/A
cumulus@switch:~$ sudo mkdir p /mnt/persist/etc
and copy files from /etc to /mnt/persist/etc
Files in the persistent mount will be copied to slot upon subsequent boot and
then take into effect
cumulus@switch:~$ sudo reboot
Note: Files in persistent mount will ALWAYS be copied to active slot upon
rebootthis means configuration files in the active slot will be overwritten by
copies in the persistent mount. Remember to remove files from the persistent
mount if they are no longer to be copied to slots upon reboot.
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/img-mgmt.html
24
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Back up persistent settings (entire /etc directory) and copy to another server
(e.g. my-server)
Back up persistent settings to a remote server (e.g. 10.10.1.1).
switch# copy startup-config tftp://10.10.1.1/sw1-start-config.bak
cumulus@switch:~$ sudo tar cvf /home/cumulus/oldconfig.tar /mnt/persist/
cumulus@switch:~$ sudo scp /home/cumulus/oldconfig.tar user@myserver:/home/user/.
See: https://support.cumulusnetworks.com/hc/en-us/articles/201787486Copying-Configurations-across-Switches
Log onto a remote server containing configuration backup and apply settings to
a switch.
Apply configuration settings (running or startup) from another switch (e.g.
10.10.1.1), stored on a remote server.
root@server:~# cat backup.tar | ssh root@switch tar zxf - -C /mnt/persist
switch# write erase
Files placed into the persistent mount will be copied to slot upon subsequent
boot and then take into effect
switch# reload
cumulus@switch:~$ sudo reboot
...
See: https://support.cumulusnetworks.com/hc/en-us/articles/201787486Copying-Configurations-across-Switches
Enter the password for "admin": <password>
This command will reboot the system. (y/n)?
[n] y
Confirm the password for "admin": <password>
...
Would you like to enter the basic configuration
dialog (yes/no): n
switch#
switch# copy tftp://10.10.1.1/startup-config running-config
switch# copy running-config startup-config
25
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Network OS Upgrade
Cumulus Linux
Cisco Nexus 3000 Series
Cumulus Linux consists of a single image
NX-OS consists of two images, kickstart and system
Show Cumulus Linux OS version by image slot
Show running NX-OS version
cumulus@switch:~$ sudo cl-img-select
switch# show version
Show NX-OS version configured for boot
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/img-mgmt.html
switch# show boot
Install Cumulus Linux image (upgrade or downgrade) stored on a remote,
accessible server (e.g. 10.0.1.249)
Upgrade (or downgrade) OS
switch# install all
cumulus@switch:~$ sudo cl-img-install http://10.0.1.249/incoming/cumulusinstall-powerpc.bin
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/img-mgmt.html
Monitoring
Cumulus Linux
Cisco Nexus 3000 Series
Show CPU processes and utilization
Show CPU processes and utilization
cumulus@switch:~$ ps aux
switch# show processes
cumulus@switch:~$ top
switch# show processes cpu
See: http://docs.fedoraproject.org/enUS/Fedora/17/html/System_Administrators_Guide/chSystem_Monitoring_Tools.html#s1-sysinfo-system-processes
26
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Show memory allocation
Show memory allocation
cumulus@switch:~$ vmstat
switch# show processes memory
Show memory allocation real-time virtual memory usage
cumulus@switch:~$ vmstat 1
Show free memory
cumulus@switch:~$ free
See: http://man.cx/vmstat(1) and
http://www.computerhope.com/unix/free.htm
Show hardware information
Show hardware information
cumulus@switch:~$ dmidecode
switch# show inventory
See: http://linux.die.net/man/8/dmidecode
Show SPROM information
Show SPROM information
cumulus@switch:~$ decode-syseeprom
switch# show sprom
Show hardware states (temperature, fan, power)
Show hardware states (temperature, fan)
cumulus@switch:~$ sensors
switch# show environment
or enable smond to monitor system units and log changes in state to
/var/log/messages
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html
27
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Check relevant log files
System messages are logged to console by default
cumulus@switch:~$ cd /var/log
cumulus@switch:~$ tail f syslog
cumulus@switch:~$ tail f daemon.log
cumulus@switch:~$ tail f quagga/zebra.log
cumulus@switch:~$ tail f quagga/ospf.log
cumulus@switch:~$ tail f quagga/ospf6.log
cumulus@switch:~$ tail f quagga/bpgd.log
See: https://support.cumulusnetworks.com/hc/en-us/articles/201787896Relevant-Log-Files-in-Cumulus-Linux
Configure SNMP (Net-SNMP)
Configure SNMP
cumulus@switch:~$ sudo vi /etc/snmp/snmpd.conf
switch# configure terminal
cumulus@switch:~$ sudo vi /etc/snmp/snmptrapd.conf
switch(config)# snmp-server host ip-address traps version 2c public
See http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html and
http://www.debianhelp.co.uk/snmp.htm
28
CUMULUS LINUX QUICK REFERENCE GUIDE FOR NX-OS USERS
Cumulus Linux
Cisco Nexus 3000 Series
Verify cabling using PTMD
N/A
Create DOT file as /etc/ptm.d/topology.dot
Enable PTMD via Quagga
cumulus@switch:~$ sudo vtysh
rut# configure terminal
rut(config)# ptm-enable
Check PTM status per interface (e.g. swp1)
rut# show interface swp1
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/ptm.html
Generate Tech Support Files
Cumulus Linux
Cisco Nexus 3000 Series
Generate Cumulus Linux diagnostics file to /var/support directory
Generate switch diagnostics file
cumulus@switch:~$ sudo cl-support
switch# show tech-support > filename
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html
29