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.
...
- 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.
...
But let's get our "hand dirty" and follow the simple manual installation.
Diagram
(101)-cookbook #001
Expand |
---|
title | Install your favorite operating system |
---|
|
In our example we will use a genuine debian stable image (buster) installed as a VirtualBox VM.
|
...
Expand |
---|
title | Launch freeRouters R1 & R2 |
---|
|
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | freeRrouter launch with blank parameters |
---|
| ╭─[12:58:45]floui@debian ~/freeRouter
╰─➤ java -jar ./lib/rtr.jar
java -jar ./lib/rtr.jar <parameters>
parameters:
router <cfg> - start router background
routerc <cfg> - start router with console
routerw <cfg> - start router with window
routercw <cfg> - start router with console and window
routers <hwcfg> <swcfg> - start router from separate configs
routera <swcfg> - start router with sw config
test <cmd> - execute test command
show <cmd> - execute show command
exec <cmd> - execute exec command |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | R1 launch with supplied r1-hw.txt and r1-sw.txt with a console prompt |
---|
| ╭─[12:59:11]floui@debian ~/freeRouter
╰─➤ java -jar lib/rtr.jar routersc etc/r1-hw.txt etc/r1-sw.txt
info cfg.cfgInit.doInit:cfgInit.java:556 booting
info cfg.cfgInit.doInit:cfgInit.java:680 initializing hardware
info cfg.cfgInit.doInit:cfgInit.java:687 applying defaults
info cfg.cfgInit.doInit:cfgInit.java:695 applying configuration
info cfg.cfgInit.doInit:cfgInit.java:721 done
welcome
line ready
r1# |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | R2 launch with supplied r2-hw.txt and r2-sw.txt with a console prompt |
---|
| ╭─[12:58:52]floui@debian ~/freeRouter
╰─➤ java -jar lib/rtr.jar routersc etc/r2-hw.txt etc/r2-sw.txt
info cfg.cfgInit.doInit:cfgInit.java:556 booting
info cfg.cfgInit.doInit:cfgInit.java:680 initializing hardware
info cfg.cfgInit.doInit:cfgInit.java:687 applying defaults
info cfg.cfgInit.doInit:cfgInit.java:695 applying configuration
info cfg.cfgInit.doInit:cfgInit.java:721 done
welcome
line ready
r2# |
|
Verification
Expand |
---|
title | Check telnet access for r1@1123 and r2@2223 |
---|
|
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | R1 telnet access from Virtualbox VM guest via port 1123 |
---|
| ╭─[1:09:28]floui@debian ~
╰─➤ telnet localhost 1123
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
welcome
line ready
r1# |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | R2 telnet access from Virtualbox VM guest via port 2223 |
---|
| ╭─[1:15:37]floui@debian ~
╰─➤ telnet localhost 2223 1 ↵
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
welcome
line ready
r2# |
|
...
Expand |
---|
title | Connectivity test between r1 and r2 |
---|
|
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Ping from R1 -> R2 |
---|
| r1#ping 1.1.1.2 /vrf v1
pinging 1.1.1.2, src=null, cnt=5, len=64, tim=1000, ttl=255, tos=0, sweep=false
!!!!!
result=100%, recv/sent/lost=5/5/0, rtt min/avg/max/total=1/2/3/13
r1# |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Ping from R2 -> R1 |
---|
| r2#ping 1.1.1.1 /vrf v1
pinging 1.1.1.1, src=null, cnt=5, len=64, tim=1000, ttl=255, tos=0, sweep=false
!!!!!
result=100%, recv/sent/lost=5/5/0, rtt min/avg/max/total=0/1/2/12
r2# |
Code Block |
---|
language | bash |
---|
theme | Midnight |
---|
title | Initiate telnet from R1 -> R2 (inside freeRouter scope) |
---|
| r1#telnet 1.1.1.2 23 /vrf v1
- connecting to 1.1.1.2 23
welcome
line ready
r2# |
|
Conclusion
In this article you:
- had a brief introduction of freeRouter networking swiiss-army knife
- learn how to deploy 2 instances of freeRouter and interconect them via 2 UNIX sockets on a VM guest running on VirtualBox
...