How to configure Cumulus Linux (initial setup)?

# For Management assign an IP address to eth0
cumulus@switch:~$ nv set interface eth0 ip address 172.16.15.232/24
cumulus@switch:~$ nv set interface eth0 ip gateway 172.16.15.1

# Set switching type for bridge domain
cumulus@switch:~$ nv set bridge domain br_default type vlan-aware

# Tagged vlan 10 and 20 to ports (swp1 and swp2)
cumulus@switch:~$ nv set interface swp1-2 bridge domain br_default
cumulus@switch:~$ nv set bridge domain br_default vlan 10,20

# Untagged vlan 1
cumulus@switch:~$ nv set bridge domain br_default untagged 1

# No shutdown
cumulus@switch:~$ nv set interface swp1 link state up
cumulus@switch:~$ nv set interface swp2 link state up

# Create a “interface vlan” L3 interface
cumulus@switch:~$ nv set interface vlan10 type svi

# Asssign IP address to VLAN SVI
cumulus@switch:~$ nv set interface vlan10 ip address 192.168.10.2/24

# no shutdown
cumulus@switch:~$ nv set interface vlan10 link state up

# Configure static route 10.10.0.0/24 to GW 192.168.10.1
cumulus@switch:~$ nv set vrf default router static 10.10.10.0/24 via 192.168.10.1

# Unset route

nv unset vrf default router static 10.10.10.101/32 via 10.0.1.0

# Bonding. Unset previous configuration first then set bonding.
cumulus@switch:~$ nv unset interface swp1-2
cumulus@switch:~$ nv set interface bond0 bond member swp1-2
cumulus@switch:~$ nv set interface bond0 bond mode lacp
cumulus@switch:~$ nv set interface bond0 bridge domain br_default
cumulus@switch:~$ nv set interface bond0 link state up

# Bonding static balance-xor mode

nv set interface bond1 bond mode static

# Setup date and time

sudo date -s “Tue Oct 11 11:51:40 2022”
Tue 11 Oct 2022 11:51:40 AM UTC

# Senkronize hw clock

sudo hwclock -w

# Add admin user

sudo adduser sudo

# STP BPDU Guard

nv set interface swp1 bridge domain br_default stp bpdu-guard on

# STP BPDU Filter

nv set interface swp6 bridge domain br_default stp bpdu-filter on

# STP Edge port

nv set interface swp1 bridge domain br_default stp admin-edge on

# Enable STP

nv set interface swp49 bridge domain br_default stp network on

# Set STP priority

nv set bridge domain br_default stp priority 8192

# VRRP

nv set interface swp1 ip address 10.0.0.2/24
nv set interface swp1 ip vrrp virtual-router 44 address 10.0.0.1/24
nv set interface swp1 ip vrrp virtual-router 44 priority 254
nv set interface swp1 ip vrrp virtual-router 44 advertisement-interval 5000
nv show vrrp 44

# Apply to run commands
nv config apply

# Delete made config before apply
nv config detach

# Make config persistent
nv config save

By:

Posted in:


Leave a comment