Install Quagga As Linux Router

Because the curious how to make Router in Linux, I was browsing to search for how to install Linux on the router using the quagga. After finding several blogs and the web of quagga load …. finally I make a summary and conclusions of how to install the router quagga. This posting only as a reminder, because my type of forgetful.

In this post I use the Ubuntu Linux distribution, because it is more practical and effective. Let’s see at the following description…. enjoy

1. Install source
#apt-get install quagga quagga-doc

2. Edit file daemons
#mcedit /etc/quagga/daemons

3. Change status no / yes on suitable routing protocol
zebra=yes //Compulsory “yes”

bgp=no //Border gateway protocol
ospf=no //OSPF with IPV4
ospf6d=no //OSPF with IPv6
ripd=yes //RIP versi 2
ripngd=no //RIP with IPV6

4. Make file configuration zebra.conf and ripd.conf, by copy from sample file configuration
#cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
#cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf

5. Set password [optional]
#echo “password password” > /etc/quagga/zebra.conf

6. Change ownership user and group from files configuration in /etc/quagga, and change access permission
#chown quagga.quaggavty /etc/quagga/*.conf
#chmod 640 /etc/quagga/*.conf

7. Start daemons

8. Connect quagga
#telnet localhost zebra

9. Connect routing protocol
#telnet localhost [ ospf | bgp | rip | eigrp]


By default quagga can only remoted from localhost [], if we want to quagga can be accessed from other places, then:

1. Create file /etc/quagga/debian.conf
#mcedit /etc/quagga/debian.conf

- Examples of the contents of the file, according to the needs of -

# If this option is set the /etc/init.d/quagga script automatically loads
# the config via “vtysh -b” when the servers are started.
# Check /etc/pam.d/quagga if you intend to use “vtysh”!
vtysh_enable=yes //router di setting via VTYSH
zebra_options=” –daemon -A ” // “–daemon -A” , berarti dapat di access dari berbagai IP
bgpd_options=” –daemon -A “
ospfd_options=” –daemon -A″ //dapat di access dari localhost dan
ospf6d_options=”–daemon -A “
ripd_options=” –daemon -A “
ripngd_options=”–daemon -A “
isisd_options=” –daemon -A “

============Setting VTYSH===========
1. Create file configuration vtysh
#touch /etc/quagga/vtysh.conf

- Examples of the contents of the file, according to the needs of -

! Sample
! service integrated-vtysh-config
! Jika di disable maka file penyimpanan konfigurasi akan terpisah (misal ; zebra.conf dan ospfd.conf), jika di enable akan jadi satu pada Quagga.conf

hostname quagga-router
username root nopassword

Note :

As we see in the configuration file, the options service integrated-vtysh-config is disable, so that the files will be separate storage configuration (eg; zebra.conf and ospfd.conf), if so will enable the one on Quagga.conf

2.That does not happen in the blink when the remote with vtysh, do not forget to do the following

#echo VTYSH_PAGER=more > /etc/environnement

28 responses to “Install Quagga As Linux Router

  1. 7. Start daemons

    Needs a parameter, start or restart should work.

    #/etc/init.d/quagga restart

  2. Rahul

    Sorry i meant linux fedora,delete my prev comment

  3. pr

    really nice explanation

  4. How to configure bgp in quagga ..?

  5. Dado

    hi? when i configuring quagga 0.99.21 it’s saying integer expected expression line 180. How to solve?

  6. How to configure point 9 ??
    #telnet localhost [ ospf | bgp | rip | eigrp]
    what is that mean ??

  7. Vinay


    I have already installed quagga and its running great! I have another question. I want to make some additions to quagga and test it out on my PC. I have done a “apt-get source quagga” and have the code on my machine. What should I exactly do in order to change the code and run those files instead of the existing quagga running on my machine? I tried doing ./configure, make, and make install, and restarting the quagga process. It does not reflect the changes in the code. It would be great if you could guide me in the right direction.


  8. Gautham

    I have installed quagga and followed instruction upto 9. which is
    telnet localhost zebra
    this step is giving me an error
    telnet: Unable to connect to remote host: Connection refused

    I looked into the daemon processes to see if zebra was running but found out it was not even though i had given ‘yes’ in the /etc/quagga/daemon file

    • hi,
      What’s your operating system ?
      It seems the zebra service doesn’t running yet. Try ps -aux | grep zebra, it should be appear when the service is up.

      • Gautham

        hi ,
        my os is ubuntu 12.04
        i tried the command u mentioned and i got the below output on the screen

      • Gautham

        hi ,
        my os is ubuntu 12.04
        i tried the command u mentioned and i got the below output on the
        training 17640 0.0 0.0 4384 844 pts/2 S+ 15:15 0:00 grep –color=auto zebra

  9. Vinay Pau

    Hey Gautam,

    As mentioned before please run the command

    #/etc/init.d/quagga restart

    and do another ps-ef|grep quagga. There needs to be another process along side the one that you have shown.

  10. Gautham

    Hi Vinay,

    Will work on that now.


  11. Javi

    Hello, my OS is UBUNTU 12.04 and when I try to do this “/etc/init.d/quagga restart” I get this “Starting Quagga daemons (prio:10): zebraCommand node 34 doesn’t exist, please check it”.
    DO you know what is happening?
    Thank for your attention

  12. anup

    how can i detect isis packets in wireshark?

  13. how to configuration eigrp in quagga ?
    because in quagga no eigrp choice or eigrp included in RIPv2

    I’m really confused
    thank you

  14. Gagan

    how can I configure ospf in quagga?

Leave a Reply

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

You are commenting using your 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