Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleInstall FreeRouter as per #001 article: "Create freeRouter environment"


Code Block
languagebash
themeMidnight
mkdir -p ~/freeRouter/bin ~/freeRouter/lib ~/freeRouter/etc ~/freeRouter/log
cd ~/freeRouter/lib
wget http://freerouter.nop.hu/rtr.jar


Code Block
languagebash
themeMidnight
titleUpdate & Upgrade system
╭─[11:11:54]floui@debian ~ 
╰─➤ tree freeRouter
freeRouter
├── bin   # binary files      
├── etc   # configuration files      
├── lib   # library files      
└── log   # log files      



expandCompile binary
Expand
titlePrepare VM guest build environmentInstall freeRouter net-tools


Code Block
Update & Upgrade system
languagebash
themeMidnight
titleget freeRouter net-tools tarball
wget dl.nop.hu/rtr.tarapt-get update
apt-get upgrade


Code Block
languagebash
themeMidnight
titleInstall build tools
apt-gettar install build-essential linux-headers-amd64 libpcap-dev
xvf rtr.tar -C ~/freeRouter/bin/


Info
title
freeRouter
net-tools
Code Block
languagebash
themeMidnight
titleCreate build environment
mkdir ~/freeRouter-build
cd ~/freeRouter-build
git clone https://github.com/mc36/freeRouter
cd freeRouter/misc/native
mkdir ../../binTmp/

For those you would like to rebuild these binaries you can find the compilation shell script in freeRouter cloned git repository in: ~/freeRouter/src/native/c.sh

Code Block
languagebash
themeMidnight
titlecompile binary tools
./c.sh cd ../../binTmp/ mv *.bin ~/freeRouter/bin



Expand
titleCreate configuration files for router: freerouter

FreeRouter uses 2 configuration files in order to run, let's write these configuration files for R1 in ~/freeRouter/etc

Code Block
languagebash
themeMidnight
titlefreeRouter hardware file: freerouter-hw.txt
int eth1 eth 0000.1111.0001 127.0.0.1 26011 127.0.0.1 26021
tcp2vrf 2323 v1 23


Code Block
languagebash
themeMidnight
titlefreeRouter software configuration file: r1-sw.txt
freerouter#sh run                                                              
hostname freerouter
buggy
!
!
prefix-list p4
 sequence 10 permit 0.0.0.0/0 ge 0 le 0
 exit
!
prefix-list p6
 sequence 10 permit ::/0 ge 0 le 0
 exit
!
vrf definition v1
 exit
!
interface ethernet1
 description freerouter@enp0s9
 vrf forwarding v1
 ipv4 address dynamic 255.255.255.0
 ipv4 gateway-prefix p4
 ipv4 dhcp-client enable
 ipv4 dhcp-client early
 ipv6 address dynamic ffff:ffff:ffff:ffff::
 ipv6 gateway-prefix p6
 ipv6 slaac
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
server telnet tel
 security protocol telnet
 no exec authorization
 no login authentication
 vrf v1
 exit
!
!
end

freerouter# 


...