Hyper Open Edge Cloud

HowTo Configure Edgecore Switch (Router, Re6st, SlapOS)

HowTo install a SlapOS node in a switch which have AOS installed and make it behave as a router
  • Last Update:2021-02-24
  • Version:003
  • Language:en

Configure a switch under AOS

This tutorial will guide you through the process of configuring a Edgecore switch under AOS (follow rapidspace-HowTo.Install.AOS.On.Edgecore.Switch if you want to install AOS on a Edgecore Switch. We will see how to upgrade the switch in order to install packets that we will need to configure the switch. We will also see how to install re6st and SlapOS, allow SSH connexion with ipv6 and finally, make the switch behave as a router

Table Of Content

  • Prerequisites
  • Create and configure VLAN
  • Configure Internet access on the switch
  • Update and upgrade the switch
  • Install re6st and SlapOS
  • Allow SSH connexion with ipv6
  • Make the switch a router


Create and configure VLAN

First of all, we create a VLAN on the switch with the all the SFP+ interface and the AOS.

you need to enter some CLI command, to tell the switch on which port you plug your test device and create a Vlan in which you will put your port.

Console(config)#vlan database
Console(config-vlan)#vlan 100

The code above will create one VLAN with id "100".

Console# configure
Console(config)# interface vlan 100
Console(config-if)# ip address
Console(config-if)# exit
Console(config)# interface ethernet 1/1-54
Console(config-if)# switchport allowed vlan add 100 untagged
Console(config-if)# switchport native vlan 100
Console(config-if)# ex
Console(config)# ex

The "1/1-54" will put all 54 ports of the switch to same VLAN, which is expected configuration.

Once you did the VLAN configuration, you need to save it in flash so that it is persistent after next reboot. Type "copy running-config startup-config" in the console.

Console#copy running-config startup-config
Startup configuration file name [startup1.cfg]: 
Write to FLASH Programming.
Write to FLASH finish.

Configure internet access on the switch

In order to install everything needed, your switch needs to access internet. In order to configure internet access on the switch, log inside the linux shell through minicom:

Username: admin

      CLI session with the AOS5810-54X is opened.
      To end the CLI session, enter [Exit].

Console#linux shell
# bash

Here you are inside a regular Debian 10 OS. You should make sure you can access internet (ping google.com should work).

Remember that VLAN100 interface is the VLAN with all your SFP+ ports. You will need to setup this interface to correctly access your Internet.

Please make sure you can ping google.fr after this step:

root@test:~# ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=119 time=11.9 ms
64 bytes from icmp_seq=2 ttl=119 time=13.5 ms
--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 11.895/12.684/13.473/0.789 ms


Please, make the configuration persistent by writing correctly /etc/network/interfaces. Also, even if you specify "gateway" in /etc/network/interfaces, the route by default is not correctly set by AOS. You will need to add a cron like this in root:

root@test:~# crontab -e
* * * * * ip -4 r add default dev VLAN100 via YOUR_GATEWAY_IP # add this line in your crontab


Upgrade the switch

The following steps will guide you through the upgrade of the switch and which packets we will need to continue the configuration. First you need to remove the proxy in order to upgrade the switch.

Log in as root on the switch and change the proxy.conf file and comment every lines:

root@test:/# vi /etc/apt/apt.conf.d/proxy.conf 

#Acquire::http { Proxy "http://localhost:8111"; };
#Acquire::https::Proxy "DIRECT";

#Acquire::http { Proxy "http://localhost:3142"; };
#Acquire::https::Proxy "http://localhost:3142";

Then we need to give the good sources to the switch in order to install packets. You will need to modify the /etc/apt/sources.list file.

deb http://deb.debian.org/debian/ buster main
deb http://security.debian.org/debian-security buster/updates main 

You can now, update and upgrade the switch and install the wget packet . Don't forget to reboot after that.

apt update
apt upgrade
apt install wget

Install re6st and SlapOS

The following steps will guide you through the installation of re6st and SlapOS.

By default, the switch has only 2GB of disk in / which is too few for SlapOS. We thus need to create a new lvm entry in which we will put the /tmp, /opt and /srv of the switch. We will also increase the space for / up to the maximum to have enough space for logs:

apt install lvm2
lvcreate -n SLAPOS -L 20G ACCTON
mkfs.ext4 /dev/ACCTON/SLAPOS
lvextend -l +100%FREE /dev/ACCTON/sysroot1
resize2fs /dev/ACCTON/sysroot1

Then you need to find the uuid of your new mount and change fstab file in order to make your changes persistent after rebooting the switch.

vi /etc/fstab
	UUID='uuid'       /mnt/SLAPOS    ext4    defaults        0       0
	/mnt/SLAPOS/opt	/opt	none	bind
	/mnt/SLAPOS/srv	/srv	none	bind
	/mnt/SLAPOS/tmp	/tmp	none	bind

Next,we need to create a mount point and mount the logical volume.

mkdir -vp /mnt/SLAPOS
mount /dev/ACCTON/SLAPOS /mnt/SLAPOS

Now our new mount is ready to get /tmp, /opt and /srv.

cd /mnt/SLAPOS
cp -R /tmp tmp
cp -R /opt opt
cp -R /srv srv
chmod 1777 /mnt/SLAPOS/tmp
chmod 755 /mnt/SLAPOS/opt
chmod 755 /mnt/SLAPOS/srv
mount /opt
mount /srv

We can now install re6st and Slapos. You can find these tutorials at Install re6st and SlapOS. Once you have done the part about the installtion of re6st and of a slapos node, you need to modify the config file in order to make re6st work. You will put this line in the config file:


Note that by default re6st attach the IPv6 address to "lo" interface. You can now restart the service by doing:

systemctl restart re6stnet


Try SSH connection with ipv6

You should now be able to do SSH on the IPv6 of re6st. In order to know your IPv6 of re6st, you should run "ip -6 a" and look at the IPv6 configured on your "lo" interface.

In order to be able to log in as root on AOS, you should setup a authorized_keys file:

root@test:/# mkdir -p /root/.ssh
root@test:/# vi /root/.ssh/authorized_keys # insert here your public SSH key.

Then from a location where you have IPv6, you can try:

ssh root@<IPv6 of the switch>



Thank You

Image Nexedi Office
  • Nexedi GmbH
  • 147 Rue du Ballon
  • 59110 La Madeleine
  • France