I came across RouterOS by MikroTik© which provides advances routing protocol support. What is more amazing is they provide a RouterOS in a virtual form-factor called Cloud Hosted Router (CHR) that can be installed on hypervisors like KVM/VirtualBox/VMware.
Please look at licensing model at http://wiki.mikrotik.com/wiki/Manual:CHR#CHR_Licensing
This is perfect for learning purposes and experimenting at home. So I decided to test OSPF routing with Router OS.
The Setup
The following diagram describes my network setup. All for these are installed as VMs on my home desktop.
The footprint of the router VMs are quite small. MikroTik© recommends 128 MB RAM and 128 MB of HDD as minimal hardware requirements. I used virt-manager to setup the test network. Here is a typical VM configuration.
The actual setup however needs some hosts on the network to test the connectivity after implementing OSPF. To keep things lite weight I used NameSpaces to simulate hosts connected to the routers. Linux bridges were used to connect the routers and the hosts. The following figures show the final setup.
OSPF Configuration
For testing purpose I restricted my setup to area 0 to which both routers are connected. Following configuration is used on the routers.
Router1
/routing ospf instance set [ find default=yes ] router-id=10.0.1.1 /ip address add address=192.168.122.101/24 interface=ether1 network=192.168.122.0 add address=10.0.12.1/24 interface=ether2 network=10.0.12.0 add address=10.0.1.1 interface=loopback network=10.0.1.1 add address=10.10.0.1/24 interface=ether4 network=10.10.0.0 /routing ospf network add area=backbone network=10.0.12.0/24 add area=backbone network=10.10.0.0/24 /system identity set name=router1 [admin@router1] >
Router2
/routing ospf instance set [ find default=yes ] router-id=10.0.2.1 /ip address add address=192.168.122.102/24 interface=ether1 network=192.168.122.0 add address=10.0.12.2/24 interface=ether3 network=10.0.12.0 add address=10.20.0.1/24 interface=ether4 network=10.20.0.0 add address=10.0.2.1 interface=loopback network=10.0.2.1 /routing ospf network add area=backbone network=10.0.12.0/24 add area=backbone network=10.20.0.0/24 /system identity set name=router2 [admin@router2] >
Results
I was able to get OSPF running with RouterOS in no time. Here are the test results.
- Routing tables on the routers
- Routing tables on the hosts
- Ping tests
- OSPF Traces
Interesting!