I just had to set up Cumulus Linux on some EdgeCore AS7726-32X boxes and were a little underwhelmed by the available documentation. So this is my take at an initial setup guide.
Access to the switch
Assuming Cumulus is preinstalled on the box you have two ways to access the switch
by serial console
Fire up your minicom/screen/putty/whatever at 115200 and you will be greeted with a login prompt
by ssh via the mgmt interface
By default Cumulus Linux does dhcp on the mgmt interface(s), so you can ssh into the box by the IP given by DHCP.
The default credentials are
user: cumulus pass: CumulusLinux!
Root access can be gained via sudo -i using the password from above.
Changing the password
cumulus@sw-01:~$ passwd Changing password for cumulus. (current) UNIX password: Enter new UNIX password: Retype new UNIX password:
Changing the hostname
As Cumulus Linux basically is a Debian Linux changing the hostname is easy and done in two steps:
# hostnamectl set-hostname <new-hostname>
Edit /etc/hosts and change the following line
127.0.1.1 cumulus
to
127.0.1.1 <fqdn> <hostname>
Setting up management in VRF
Edit /etc/network/interfaces with you favorite editor (vi and nano are present) and change the stanza for eth0 like the following
# The primary network interface auto eth0 iface eth0 address 192.0.2.11/24 gateway 192.0.2.1 # vrf vrf_mgmt auto vrf_mgmt iface vrf_mgmt # vrf-table auto
This will move interface eth0 into VRF vrf_mgmt which seperates routing from the main routing table. vrf-table auto let’s ifupdown2 decide on which Linux routing table it will use for the VRF. If you want to have a fixed table id you can specify that instead of auto. Note ifupdown2 by default requires VRF table ids to be over 1000.
ifup eth0 will bring up the new config on eth0 as well as the VRF. Another way to reload the interface configuration would be ifreload -a which would reload the configuration of all interfaces.
Setting up routed interfaces
Setting up IPs on interfaces happens in /etc/network/interfaces, too. The ports are numbered swp<num> with no leading zeros. Setting IPs on switchport 1 would look like this:
auto swp1 iface swp1 address 198.51.100.0/31 address 2001:db8:2342:F000::1/126
One thought on “Initial setup for Cumulus Linux for networkers”