Wednesday 14 October 2015

How to Build a Layer 3 router using Linux Zebra/quagga


Installing Zebra/Quagga and running OSPF routing protocol


Sanibonani, Molweni, Goeie More

A really great way of turning your old PC to a powerful layer 3 router capable of running BGP.OSPF,ISIS!! I had fun configuring this router and its really that simple . Bellow are a few steps in Installing Zebra/Quagga  and tunring your linux machine into a super router...

I  created 2 virtual machines on Vmware Workstation then tested connectivity using Wireshark.

First you need to setup vmware Workstation, you can find instructions on this link https://www.vmware.com/support/ws55/doc/ws_newguest_setup_simple_steps.html

After setting up your VM's you need to install the Zebra/Quagga Daemon.



1. $  sudo apt-get install quagga quagga-doc







2. You need to edit the quagga daemon script to enable the routing protocol you require, for this example I will enable OSPF protocol.
Run the command: # nano /etc/quagga/daemon    at the bottom of the script enable the routing protocol by changing the Zebra  and the protocol to yes. 















Save your settings and restart the quagga process by typing; /etc/init.d/quagga restart

3. Go to $ nano /etc/quagga/ospfd.conf  to configure enable password and other parameters. 

4. telnet localhost  ospfd to configure OSPF, if you are familier with Cisco IOS you should not have a problem configuring the protocol its exactly like CISCO!!!! how awesome is that...






























You can then setup your Network Statements, Area, Router ID and any other parameters. I am running my ospf process on ethO which is connected to another VM running OSPF



To test your ospf connection you can use Wireshark to see OSPF multicast hello packets


And they you have it folks installing and configuring OSPF using Zebra/Quagga on Ubuntu OS.
Its pretty great if you don't have money to purchase routers you can use this for your home lab test. If you want to use this in a production environment you need to be aware that you will lose a few milliseconds on latency  and you would probably want to run it on a Gigabit Ethernet adapter.

Feel free to drop a comment or a suggestion ..