RARE/freeRtr#
RARE stands for Router for Academia, Research & Education. It is an open source routing platform, used to create a network operating system (NOS) on commodity hardware (a white box switch). RARE uses FreeRtr as a control plane software and is thus often referred to as RARE/freeRtr.
RARE nodes are identified by the rare
kind in the topology file.
what is RARE?
RARE/freeRtr has the particularity to run interchangeably different dataplanes such P4 INTEL TOFINO, P4 BMv2, DPDK, XDP, libpcap or UNIX UDP raw sockets. This inherent property allows RARE/freeRtr to run multiple use cases requiring different bandwidth capability.
It can be used as:
- a full featured versatile DPDK SOHO router able to handle nx1GE, nx10GE and a couple of 100GE.
- a service provider Metropolitan Arean Network IPv4/IPv6 MPLS router
- a full featured BGP Route Reflector
Getting RARE image#
RARE/freeRtr container image is freely available on GitHub Container Registry.
The container image is nightly build of a RARE/freeRtr control plane off the master
branch.
Managing RARE/freeRtr nodes#
RARE/freeRtr node launched with containerlab can be managed via the following interfaces:
Info
Default user credentials: rare:rare
Interfaces mapping#
RARE/freeRtr container uses the following mapping for its linux interfaces:
eth0
- management interface connected to the containerlab management networketh1
- first data interfaceeth2
- second data interfaceeth<n>
- nth data interface
When containerlab launches RARE/freeRtr node:
- It will assign IPv4/6 address to the
eth0
interface. - Data interface
eth1
,eth2
,eth<n>
need to be configured with IP addressing manually.
Features and options#
Node configuration#
RARE/freeRtr nodes have a dedicated /run
1 directory that is used to persist the configuration of the node which consists of 2 files:
rtr-hw.txt
also called freeRtr hardware filertr-sw.txt
also called freeRtr software file
User defined config#
It is possible to make RARE/freeRtr nodes to boot up with a user-defined config instead of a default one. In this case you'd have to create rtr-hw.txt
and rtr-sw.txt
files and bind mount them to the /rtr/run/conf
dir:
nodes:
rtr1:
kind: rare
image: ghcr.io/rare-freertr/freertr-containerlab:latest
binds:
- rtr-hw.txt:/rtr/run/conf/rtr-hw.txt
- rtr-sw.txt:/rtr/run/conf/rtr-sw.txt
Saving configuration#
Configuration is saved using write
command using RARE/freeRtr CLI. The router configuration will be saved at <lab_dir>/<node_name>/run/
License#
As an open source software, RARE/freeRtr does not require any license file.
Build RARE/freeRtr Container#
RARE/freeRTr container can be built:
git clone https://github.com/rare-freertr/freeRtr-containerlab.git
cd freeRtr-containerlab
docker build --no-cache -t freertr-containerlab:latest .
File mounts#
During lab initialisation, each node will have their run
folder created.
In the lab example above:
cd freeRtr-containerlab
$ ls clab-rtr000/rtr1/run/
conf logs mrt ntfw pcap
$ ls clab-rtr000/rtr2/run/
conf logs mrt ntfw pcap
root@debian:~/development/testclab/freeRtr-containerlab# tree clab-rtr000/
clab-rtr000/
├── ansible-inventory.yml
├── authorized_keys
├── rtr1
│ └── run
│ ├── conf
│ │ ├── hwdet-all.sh
│ │ ├── hwdet.eth
│ │ ├── hwdet.mac
│ │ ├── hwdet-main.sh
│ │ ├── hwdet.ser
│ │ ├── pcapInt.bin -> /rtr/pcapInt.bin
│ │ ├── rtr-hw.txt
│ │ └── rtr-sw.txt
│ ├── logs
│ │ └── freertr.log
│ ├── mrt
│ ├── ntfw
│ └── pcap
├── rtr2
│ └── run
│ ├── conf
│ │ ├── hwdet-all.sh
│ │ ├── hwdet.eth
│ │ ├── hwdet.mac
│ │ ├── hwdet-main.sh
│ │ ├── hwdet.ser
│ │ ├── pcapInt.bin -> /rtr/pcapInt.bin
│ │ ├── rtr-hw.txt
│ │ └── rtr-sw.txt
│ ├── logs
│ │ └── freertr.log
│ ├── mrt
│ ├── ntfw
│ └── pcap
└── topology-data.json
conf
folder is where RARE/freeRtr configuration files are locatedlogs
folder is where RARE/freeRtr logs files are located (output ofshow logging
)pcap
folder is wherepcap
files are located (packet capture eth1
)ntfw
folder is where netflow files are stored (future use - not configured currently in default config)mrt
folder is wherebmp
output files are stored (future use - not configured currently in default config)
Lab example#
The following labs feature RARE/freeRtr node:
-
/run
directory is created in the Lab directory for each RARE/freeRtr node. ↩