Cumulus Linux vs Cisco NX-OS: Initial Configuration

Follow

This article compares the initial setup and installation of a Cumulus Linux switch against a Cisco Nexus 3000 switch.

Contents

Usernames and Password

Cumulus Linux Cisco Nexus 3000 Series

Default admin user: cumulus
Default password: CumulusLinux!
(Use sudo to execute commands with root privileges.)

Default admin user: admin
Default password: (none defined)

Add user account

cumulus@switch:~$ sudo adduser userid

Show users currently logged in

cumulus@switch:~$ sudo users
Show all defined user accounts
cumulus@switch:~$ sudo cat /etc/passwd

See: Debian System Administration and Debian Shell Commands

Add user account

switch# configure terminal 
switch(config)# username userid

Show user sessions

switch# show users

Licensing

Cumulus Linux Cisco Nexus 3000 Series
Install Cumulus Linux license key (not tied to specific device)
cumulus@switch:~$ sudo cl-license -i license_file.txt
cumulus@switch:~$ sudo reboot
or use a URL:
cumulus@switch:~$ sudo cl-license -i <license_file_URL>
cumulus@switch:~$ sudo reboot
or paste the license in directly:
cumulus@switch:~$ sudo cl-license -i XXXXXXXX
cumulus@switch:~$ sudo reboot
Install Cisco NX-OS software feature license key (tied to specific device, if not already on device)
switch# install license bootflash:license_file.lic
Installing license ..done
switch# show license
switch# show license usage

Hostname

Cumulus Linux Cisco Nexus 3000 Series

Set hostname (to "Switch1") – short hostname – persistent

cumulus@switch:~$ sudo vi /etc/hostname
(syntax as follows)
Switch1


Set hostname – short hostname – non-persistent

cumulus@switch:~$ sudo hostname Switch1 

Note: A reboot is required to take effect.
To have the hostname change take effect without rebooting, you can run the change_hostname.sh script.

Set hostname (to "Switch1") – persistent

switch# configure terminal
switch(config)# hostname Switch1 
Switch1(config)# exit
Switch1# copy running-config startup-config

DNS

Cumulus Linux Cisco Nexus 3000 Series

Set hostname – FQDN

cumulus@switch:~$ sudo vi /etc/hosts 
(syntax as follows) 127.0.0.1 localhost ip-address hostname

Configure DNS

cumulus@switch:~$ sudo vi /etc/resolv.conf
 nameserver ip-address1
 nameserver ip-address2
 nameserver ip-address3

Set hostname – FQDN

switch# configure terminal
switch(config)# vrf context management
switch(config-vrf)# ip host hostname ip-address

Configure DNS

switch(config-vrf)# ip name-server ip-address1 ip-address2 ip-address3 
switch(config)# exit
switch# copy running-config startup-config

Message of the Day

Cumulus Linux Cisco Nexus 3000 Series

Set message of the day (MOTD)

cumulus@switch:~$ sudo vi /etc/motd
See: Debian MOTD

Set message of the day (MOTD)

switch# configure terminal
switch(config)# banner motd #Welcome# 
switch(config)# exit
switch# copy running-config startup-config

Set the login banner

cumulus@switch:~$ sudo vi /etc/issues.net
See: Linux issues.net

Set the login banner

switch# configure terminal
switch(config)# banner login #Welcome# 
switch(config)# exit
switch# copy running-config startup-config

Time Zone, NTP and Clock

Cumulus Linux Cisco Nexus 3000 Series

Configure time zone

cumulus@switch:~$ sudo dpkg-reconfigure tzdata 
cumulus@switch:~$ sudo hwclock

See: Debian Time Configuration

Configure time zone

switch# configure terminal
switch(config)# clock timezone PST -8 0 switch(config)# exit
switch# copy running-config startup-config

Set NTP

cumulus@switch:~$ sudo vi /etc/ntp.conf
cumulus@switch:~$ ntpd -q
See Cumulus Linux Monitoring and Troubleshooting

Set NTP (e.g. to VDC 1)

switch# clock protocol ntp vdc 1

Set clock

cumulus@switch:~$ sudo hwclock --set --date “MM/DD/YYYY HH:MM:SS”
See: Clock Man Page

Set clock

switch# clock set HH:MM:SS DD month YYYY

Management Interface

Cumulus Linux Cisco Nexus 3000 Series

Configure management interface

cumulus@switch:~$ sudo vi /etc/network/interfaces
auto eth0
iface eth0
address ipv4-address/subnet-mask
gateway default-gateway-ip-address

Apply above persistent settings to eth0

cumulus@switch:~$ sudo ifup eth0

See: Cumulus Linux 2.5 Quick Start and Cumulus Linux 2.5 Network Interface Management
 

Configure management interface

switch# configure terminal
switch(config)# interface mgmt 0
switch(config-if)# ip address ipv4-address subnet-mask 
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
 

Stop and start management interface

cumulus@switch:~$ sudo ifdown eth0 
cumulus@switch:~$ sudo ifup eth0

See: Cumulus Linux 2.5 Network Interface Management

 

Stop and start management interface

switch# configure terminal 
switch(config)# interface mgmt 0 
switch(config-if)# shutdown 
switch(config-if)# no shutdown

Show management interface current configuration

cumulus@switch:~$ ifquery eth0

Show management interface configuration

switch# show interface mgmt 0

Set speed/duplex of management interface

Add the following to /etc/network/interfaces

auto eth0
iface eth0
  link-speed 100
  link-duplex full
  link-autoneg off

Turn up the port to set the configuration

See: Cumulus Network Interface Configuration

Set speed/duplex of management interface

switch# configure terminal 
switch(config)# interface mgmt 0 
switch(config-if)# speed speed 
switch(config-if)# duplex mode

Set inactive session timeout (30 minutes) for console and SSH

Add the following to /etc/profile

export TMOUT=1800

Set inactive session timeout (30 minutes) for console and SSH

switch# configure terminal 
switch(config)# line console
switch(config-console)# exec-timeout 30
switch(config-console)# exit 
switch(config)# line vty
switch(config-line)# exec-timeout 30

Loopback Interface

Cumulus Linux Cisco Nexus 3000 Series

Add IP address to loopback lo interface (Loopback is created by default)
Add the following line to the lo configuration in /etc/network/interfaces after “iface lo inet loopback”

address ip-address/subnet-mask

Configure loopback interface

switch# configure terminal
switch(config)# interface loopback0
switch(config-if)# ip address ipv4-address subnet-mask 
switch(config-if)# exit

DHCP Relay Agent

Cumulus Linux Cisco Nexus 3000 Series

Configure DHCP relay agent

Edit the /etc/default/isc-dhcp-relay file

SERVERS="192.168.1.1"

Set all ports which may receive a DHCP response from the server as well as any ports that may receive a DHCP request from a host

INTERFACES="br0 swp1 swp3"

Restart isc-dhcp-relay

cumulus@switch:~$ sudo /etc/init.d/isc-dhcp-relay restart

See: Configuring DHCP Relays

Configure DCHP relay agent (enabled by default)

switch# configure terminal 
switch(config)# ip dhcp relay

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

Write Erase

Cumulus Linux Cisco Nexus 3000 Series

Reset Quagga configuration to default

Confirm service integrated-vtysh-config is enabled:

cumulus@switch$ sudo cl-rctl running-config |grep integrated
service integrated-vtysh-config

Remove /etc/quagga/Quagga.conf:

cumulus@switch$ sudo rm /etc/quagga/Quagga.conf:

Restart quagga (no need to reload the whole switch):

cumulus@switch$ sudo systemctl restart quagga.service

See: Configuring Quagga - Restoring the Default Configuration

Reset full Cisco config to default

switch# write erase

Reload the Cisco switch (do not write again before reloading or else the running-config will replace the startup-config)

switch# reload
Have more questions? Submit a request

Comments

Powered by Zendesk