While in article #001 of the 101 series we learnt how to spawn 2 router instances on the same VM, this use case is only useful for learning/pedagogic purposes. freeRouter can be considered as networking Swiss Army Knife in real networks. We will demonstrate further freeRouter capability to take control a a full VM and then be able to directly communicate with the external real world via the VM network device interface. i.e Out of the VM scope.
Requirement
Basic Linux/Unix knowledge
Basic networking knowledge
Overview
Working with freeRouter inside VM is interesting but working and interact with the outside world is way more exciting.
Article objective
In this article we'll explain how to integrate freeRouter in an existing local area network (my home network) and how to inherit from IPv4 DHCP and IPv6 SLAAC. Though this simple example is consumer/end user oriented, if you transpose it to a Internet Service provider environment you can easily imagine how to build a highly BGP route Reflector client, sophisticated rouse server, ROA/RPKI validator or even a BGP BMP server ... (and the list of features set is huge) For example, in one one my project I'm using freeRouter as a BGP route reflector inside a k8s cluster running calico network plugin.
Diagram
[ #002 ] - Cookbook
In our example we will use a genuine debian stable image (buster) installed as a VirtualBox VM.
and we add a bridge network interface to or laptop RJ45 conection.
IPv6 neighbor discovery check ( 192.168.1.1 is the gateway, 192.168.1.143 is the VM host)
freerouter#show ipv6 neighbors eth1
mac address time static router
34ce.0067.18c2 fd7d:a59c:650b::1 00:01:44 false false
9ceb.e8d5.2c51 fd7d:a59c:650b::8926:98c9:bbde:8ed7 00:01:44 false false
freerouter#
Initiate IPv4 ssh from freerouter -> LAN router gateway
freerouter#ssh 192.168.1.1 /vrf v1 /user root
- connecting to 192.168.1.1 22
password: ***************
- securing connection
BusyBox v1.28.4 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 18.06.2, r7676-cddd7b4c77
-----------------------------------------------------
root@OpenWrt:~#
Initiate IPv6 ssh from freerouter -> LAN router gateway
freerouter#ssh fd7d:a59c:650b::1 /vrf v1 /user root
- connecting to fd7d:a59c:650b::1 22
password: ***************
- securing connection
BusyBox v1.28.4 () built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 18.06.2, r7676-cddd7b4c77
-----------------------------------------------------
root@OpenWrt:~
Conclusion
In this article you:
had a demonstration of how to integrate freeRouter to a local area network
learn how to configure an interface in order to act as an IPv4 DCHP client
learn how to configure an interface using IPv6 SLAAC
[ #002 ] RARE/FreeRouter-101 - key take-away
FreeRouter is using UNIX socket in order to forward packet.
After compilation you can use pcapInt binary that will bind freeRouter socket (locathost:26011) to a physical network interface (localhost:26021@enp0s9)
It support a huge list of feature with IPv4/IPv6 parity. In this example we demonstrated how an interface can inherit IPv4/IPv6 addresses from IPv4 DHCP server or IPv6 SLAAC
freeRouter can interact with the real network (in various flavors. We will develop this in further articles)
It can be used as a BGP route reflector in Internet Service Provider environment, as ROA/RPKI validator, BMP server, BGP looking glass, route server etc.