Cumulus Linux Quick Reference Guide For NX-OS Users
Cumulus Linux Quick Reference Guide For NX-OS Users
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
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Connect to serial console port at 115200 baud
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Default management configuration:
hostname = switch
eth0 preconfigured
loopback preconfigured
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
LLDP enabled
STP disabled
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Auto Provisioning
Cumulus Linux
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
Cumulus Linux
Install Cisco NX-OS software feature license key (tied to specific device, if not
already on device)
or
cumulus@switch:~$ sudo cl-license -i <license_file_URL>
and
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Set hostname (e.g. to Switch1) short hostname persistent
(syntax as follows)
Switch1
Switch1(config)# exit
Switch1# copy running-config startup-config
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
(syntax as follows)
127.0.0.1
localhost
ip-address hostname
Configure DNS
switch(config)# exit
ip-address3
See: http://cumulusnetworks.com/docs/2.2/quick-start/quick-start.html
Set message of the day (MOTD)
See: https://wiki.debian.org/motd
switch(config)# exit
switch# show clock
switch# copy running-config startup-config
Cumulus Linux
Set NTP
cumulus@switch:~$ ntpd q
Set clock
See: http://man.he.net/man8/hwclock
Configure management interface
(syntax as follows)
auto eth0
iface eth0
address ipv4-address/subnet-mask
gateway default-gateway-ip-address
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
switch(config-vrf)# exit
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html
switch(config-if)# shutdown
switch(config-if)# no shutdown
Cumulus Linux
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)
Add the following line to the lo configuration after iface lo inet loopback:
(syntax as follows)
address ip-address/subnet-mask
switch(config-if)# exit
cumukus@switch:~$ sudo ethtool -s eth0 speed 100 duplex full autoneg off
See: https://wiki.debian.org/NetworkConfiguration
Cumulus Linux
CLI Basics
Cumulus Linux
cumulus@switch:~$ history
See: https://wiki.debian.org/CommandsFileManager
Send message to all logged on users
Reboot switch
Reboot switch
switch# reload
See: http://www.queryadmin.com/151/reboot-shutdown-debian-commandline/
(syntax as follows)
auto swp1
switch(config-if)# switchport
iface swp1
All Ethernet ports are default Layer 2; to change to Layer 3, use no switchport
(syntax as follows)
auto swp1
iface swp1
switch(config-if)# no switchport
address ipv4-address/subnet-mask
address ipv6-address/subnet-mask
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html#ifupdown
10
Cumulus Linux
(syntax as follows)
iface swp1
link-speed speed
link-duplex [full|half]
link-autoneg [on|off]
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
(syntax as follows)
iface swp1
mtu 9216
switch(config-pmap-c-nq)# exit
switch(config-pmap-nq)# exit
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html
11
Cumulus Linux
cumulus@switch:~$ netstat i
Show current interface state for all switch ports that are up
Show current interface state for all switch ports that are up
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/interfaces.html
or
switch(config-if)# shutdown
switch(config-if)# no shutdown
12
Cumulus Linux
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
swp1
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
cumulus@switch:~$ arp n
13
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).
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
auto swp2
iface swp2
switch(config)# vlan 10
auto swp3
switch(config-vlan)# exit
iface swp3
...
switch(config-if-range)# switchport
switch(config-if-range)# switchport mode access
auto bridge-for-v10
iface bridge-for-v10
bridge-ports swp1 swp2 swp3...
address ip-address/subnet-mask
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_1_2/ifupdown.html
14
Cumulus Linux
See: http://www.linuxdoc.org/HOWTO/BRIDGE-STP-HOWTO/set-up-thebridge.html
15
(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
bridge-stp on
Configure STP only (no RSTP) on bridge (e.g. bridge1) and set Spanning Tree
parameters.
(syntax as follows)
auto bridge1
iface bridge1
mstpctl_ports swp1 swp2 swp3...
mstpclt_stp on
mstpctl-parameter value
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/stp.html
Show RSTP/STP configuration on bridge (e.g. bridge1)
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/stp.html
16
Link Aggregation
Cumulus Linux
Aggregate switch ports (e.g. swp1, swp2, swp3) into single Layer 3 bond (e.g.
bond1) using LACP
(syntax as follows)
auto bond1
iface bond1
address ip-address/subnet-mask
switch(config-if)# no shutdown
bond-miimon 100
switch(config-if-range)# no switchport
bond-mode 802.3ad
bond-use-carrier 1
bond-lacp-rate 1
bond-min-links 1
switch(config-if-range)# exit
bond-xmit_hash_policy layer3+4
17
via Quagga
switch(config)# end
(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
18
Cumulus Linux
or via Quagga
switch# exit
See: http://cumulusnetworks.com/docs/2.2/userguide/layer_3/static_routing.html
Display information on static routes
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
ospfd=yes
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/config.html
Create OSPFv2 instance via Quagga:
switch(config-if)# no switchport
(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
ospf6d=yes
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:
(e.g. hello-interval 5)
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
bgpd=yes
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/bgp.html
Identify BGP node via Quagga:
Specify neighbors:
switch(config-router-neighbor-af)# exit
switch(config-router-neighbor)# exit
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_3/bgp.html
22
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
/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
Settings changed via Quagga are saved into persistent configuration files.
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
N/A
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
Back up persistent settings (entire /etc directory) and copy to another server
(e.g. my-server)
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.
Files placed into the persistent mount will be copied to slot upon subsequent
boot and then take into effect
switch# reload
...
See: https://support.cumulusnetworks.com/hc/en-us/articles/201787486Copying-Configurations-across-Switches
[n] y
25
Network OS Upgrade
Cumulus Linux
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/img-mgmt.html
Monitoring
Cumulus Linux
cumulus@switch:~$ ps aux
cumulus@switch:~$ top
See: http://docs.fedoraproject.org/enUS/Fedora/17/html/System_Administrators_Guide/chSystem_Monitoring_Tools.html#s1-sysinfo-system-processes
26
Cumulus Linux
cumulus@switch:~$ vmstat
cumulus@switch:~$ dmidecode
See: http://linux.die.net/man/8/dmidecode
Show SPROM information
cumulus@switch:~$ decode-syseeprom
cumulus@switch:~$ sensors
27
Cumulus Linux
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
28
Cumulus Linux
N/A
See: http://cumulusnetworks.com/docs/2.2/user-guide/layer_1_2/ptm.html
See: http://cumulusnetworks.com/docs/2.2/userguide/system_management_diagnostics/monitoring.html
29