Install and start Quagga

Quagga is a route server which supports BGP, OSPF and RIP.
First I need to enable the routing protocol daemons I need.

nano /etc/quagga/daemons

Here’s the configuration file of quagga daemon:


# This file tells the quagga package which daemons to start.
#
# Entries are in the format: =(yes|no|priority)
#   0, "no"  = disabled
#   1, "yes" = highest priority
#   2 .. 10  = lower priorities
# Read /usr/share/doc/quagga/README.Debian for details.
#
# Sample configurations for these daemons can be found in
# /usr/share/doc/quagga/examples/.
#
# ATTENTION:
#
# When activation a daemon at the first time, a config file, even if it is
# empty, has to be present *and* be owned by the user and group "quagga", else
# the daemon will not be started by /etc/init.d/quagga. The permissions should
# be u=rw,g=r,o=.
# When using "vtysh" such a config file is also needed. It should be owned by
# group "quaggavty" and set to ug=rw,o= though. Check /etc/pam.d/quagga, too.
#
zebra=yes
bgpd=yes
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no

Zebra is needed for doing static routes, bgp and ospf are dynamic protocols which I need for lab later. I was surprise quagga supports IS-IS as well…:)

Create config files for the routing protocol daemons which I wanted to turn on, I could either create an empty config file for each routing protocol daemons or copy sample config from:

cat /usr/share/doc/quagga/examples/
bgpd.conf.sample    isisd.conf.sample   ospfd.conf.sample   ripngd.conf.sample  zebra.conf.sample
bgpd.conf.sample2   ospf6d.conf.sample  ripd.conf.sample    vtysh.conf.sample

Each sample config contains some basic command line configuration for the routing protocols.

To use the sample config:

sudo cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
sudo cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf
sudo cp /usr/share/doc/quagga/examples/bgpd.conf.sample /etc/quagga/bgpd.conf

To create my empty config files for the selected routing protocol daemons:

sudo touch /etc/quagga/ospfd.conf
sudo touch /etc/quagga/bgpd.conf
sudo touch /etc/quagga/zebra.conf

Then I need to change the owner and permission of the config files, the /etc/quagga/daemons file recommended to use user mode 640.

sudo chown quagga:quaggavty /etc/quagga/*.conf
sudo chmod 640 /etc/quagga/*.conf

Start or restart the quagga daemon.

sudo /etc/init.d/quagga restart
Stopping Quagga daemons (prio:0): (waiting) .. bgpd ospfd (zebra) (ripd) (ripngd) (ospf6d) (isisd).
Removing all routes made by zebra.
Loading capability module if not yet done.
Starting Quagga daemons (prio:10): zebra bgpd ospfd.

If no config files are created for the selected routing protocol daemons, quagga will never start, here’s the sample output when no config files was created or found.

/etc/init.d/quagga start
Loading capability module if not yet done.
Starting Quagga daemons (prio:10): zebra (not started without config file) bgpd (not started without config file) ospfd (not started without config file).

The empty config files for zebra, ospf and bgp has to have vty password, insert this line password quagga or any password of your choice.

To start ospf telnet localhost ospfd.
To start bgp telnet localhost bgpd.
To start zebra telnet localhost zebra

Make sure that the owner is quagga and the group is quaggavty for /etc/quagga and /etc/quagga/*.conf, if the user is not quagga you cannot save the configuration due to permission problem.

Advertisements
This entry was posted in Route and tagged , , , , , , . Bookmark the permalink.

6 Responses to Install and start Quagga

  1. Todd says:

    Hi, I have installed quagga on a fresh CentOS installation and everywhere I read it says to use /etc/init.d/quagga to start stop or restart the daemon after configuring. But this init script doesnt exist on my install. ie there is nothing for quagga in /etc/init.d/. What am I missing.

    I was able to start both zebra and bgpd manually and get on with my config but would like to know whats happend.

    CentOS 6.3, quagga-0.99.15 installed with yum…

    Help appreciated.

    Mulvaz

  2. Vishnu says:

    In centos the quagga daemons are installed separately.
    you can see each daemons under “/etc/init.d” like /etc/init.d/bgpd etc

  3. Cheng Hsiang says:

    I have followed your instructions and to launch bgpd, but I got the following error:
    root@CarmeloDev:/usr/share/doc/quagga/examples# /etc/init.d/quagga start
    Loading capability module if not yet done.
    Starting Quagga daemons (prio:10): bgpd/usr/lib/quagga/bgpd: symbol lookup error: /usr/lib/quagga/bgpd: undefined symbol: sort_node

    Do you know what is that, and how to fix it?

  4. cchsiang2002 says:

    I have followed your instructions, and tried to launch it, but I got the following errors:
    root@CarmeloDev:/usr/share/doc/quagga/examples# /etc/init.d/quagga start
    Loading capability module if not yet done.
    Starting Quagga daemons (prio:10): bgpd/usr/lib/quagga/bgpd: symbol lookup error: /usr/lib/quagga/bgpd: undefined symbol: sort_node

    Any idea? Am I missing anything?
    thanks in advance.

  5. sandhya says:

    it is working thanks a lot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s