The main objective of [RARE / FreeRouter 101] series is to help you getting started with FreeRouter from scratch without any prior knowledge.
Requirement
- Basic Linux/Unix knowledge
- Basic networking knowledge
Overview
freeRouter is a free, open source router control plane software. For nostalgic and old networkers (like me), freeRouter is able to handle HDLC, X25, frame-relay, ATM encapsulation.
Since it handles packets itself at the socket layer, it is independent of underlying Operation System capabilities.
We will see in the next articles how freeRouter subtlety leverage this inherently independence to connect different data-plane such as OpenFlow, P4 and other possible data-plane that would appear in the near future.
The command line tries to mimic the industry standards with one exception:
- no global routing table: every routed interface must be in a virtual routing table
- positive side effect: there are no vrf-awareness questions
Article objective
This article is meant to simply deploy 2 instances of freeRouter on the same fresh linux installed linux box.
We are voluntary using freeRouter (freerouter.nop.hu) "raw" official repository in order to get familiar with the deployment manual process.
Even if the deployment process is straightforward, it is not self explanatory for people non familiar with java/linux.
In order to simplify the deployment we have deployed a daily built:
But let's get our "hand dirty" and follow the simple manual installation.
Diagram
Cookbook #001
Install your favorite operating system
In our example we will use a genuine debian stable image (buster) installed as a VirtualBox VM.
Get your system up to date
- Start & connect your VM as root
- Update your VM
apt-get update
apt-get upgrade
- Install operating system default java package
apt-get install default-jre-headless
Install operating system java package
In this example, we won't recompile freeRouter so installing headless java runtime is enough. This set up is recommended for production environment in order to ensure minimal software footprint
apt-get install default-jre-headless --no-install-recommends
Create freeRouter environment
Let's create the following structure, even if some folder are empty for now:
mkdir -p ~/freeRouter/bin ~/freeRouter/lib ~/freeRouter/etc ~/freeRouter/log
cd ~/freeRouter/lib
wget http://freerouter.nop.hu/rtr.jar
so you have have the following environment:
╭─[11:11:54]floui@debian ~
╰─➤ tree freeRouter
freeRouter
├── bin # binary files
├── etc # configuration files
├── lib # library files
└── log # log files
Create freeRouter configuration files for router: R1
FreeRouter uses 2 configuration files in order to run, let's write these configuration files for R1 in ~/freeRouter/etc
int eth1 eth 0000.1111.0001 127.0.0.1 26011 127.0.0.1 26021
tcp2vrf 1123 v1 23
hostname r1
!
vrf definition v1
exit
!
int eth1
desc r1@e1 -> r2@e1
vrf forwarding v1
ipv4 address 1.1.1.1 255.255.255.252
ipv6 address 1234::1 ffff:ffff:ffff:ffff::
exit
!
server telnet tel
security protocol telnet
no exec authorization
no login authentication
vrf v1
exit
!
Create freeRouter configuration files for router: R2
Repeat the same configuration for R2 in ~/freeRouter/etc
int eth1 eth 0000.2222.0001 127.0.0.1 26021 127.0.0.1 26011
tcp2vrf 2223 v1 23
hostname r2
!
vrf definition v1
exit
!
int eth1
desc r2@e1 -> r1@e1
vrf forwarding v1
ipv4 address 1.1.1.2 255.255.255.252
ipv6 address 1234::2 ffff:ffff:ffff:ffff::
exit
!
server telnet tel
security protocol telnet
no exec authorization
no login authentication
vrf v1
exit
!