Quagga is a network routing software available in most GNU/Linux, Solaris, FreeBSD, and NetBSD. It provides the implementation of OSPF (Open Shortest Path First), RIP (Routing Information Protocol), BGP (Border Gateway Protocol) and IS-IS. It is distributed under GNU GPL license.
This tutorial shows you how to install and then configure Quagga in Ubuntu Linux. I am using the latest version of Ubuntu 13.10 however it should be applicable for the version prior to 13.10.
1. Install quagga using apt-get
$ sudo apt-get install quagga
The Quagga files and configurations will be stored in /etc/quagga. You can enable or disable daemons routing in the /etc/quagga/daemons file. The sample config files can be found in /usr/share/doc/quagga/examples/.
Please note that, when activate a daemon for the first time, a config file, even if it is empty, must be present and be owned by the user and group ‘quagga’. Otherwise the daemon will not be started. The permission should be u(user)=rw, g(group)=r, and o(other)=nothing.
2. Create an empty config file (zebra.conf for example) and set the permissions
$ sudo touch /etc/quagga/zebra.conf $ sudo chown quagga.quagga /etc/quagga/zebra.conf $ sudo chmod 640 /etc/quagga/zebra.conf
If you are configuring via telnet, at least the password must be set, else you will get error messages telling you that the Vty password is not set as below:
$ telnet localhost zebra Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Vty password is not set. Connection closed by foreign host.
So lets set the password first.
$ sudo echo "password typeyourpasswordhere" >> /etc/quagga/zebra.conf
3. Activate the daemon in /etc/quagga/daemons file by changing the value to ‘yes’. Before activating the daemon, make sure that you have created the config files for each daemon, else the daemon will not be started.
4. Start the quagga.
Simply run the following command to start the Quagga
$ sudo /etc/init.d/quagga start Loading capability module if not yet done. Starting Quagga daemons (prio:10): zebra. Starting Quagga monitor daemon: watchquagga.
5. Now try to telnet the localhost with zebra port
You should be able to telnet to localhost to the running daemon name / port. Type the password to login, then type ‘enable’ to get the full privileges.
$ telnet localhost zebra Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Hello, this is Quagga (version 0.99.22.1). Copyright 1996-2005 Kunihiro Ishiguro, et al. User Access Verification Password: ubuntu> enable ubuntu#
You are ready to set the IP address via zebra. Repeat the step-by-step above on configuring BGP (bgpd.conf), OSPF (ospfd.conf) and more.
Note that quagga is Cisco-like command so you should have familiarity with the Cisco command.