Skip to content
Implementation of IAs and pass-throughs in Quagga
C Shell TeX C++ M4 Roff Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



MASTER (this branch): Currently implements the Wiser protocol.

rajas/simple_lookup_test: adds a sentinal value (5) as D-BGP control
info associated with each advertisement.  Whenever a advertisement is
received, the code checks to see if this sentinel value is set. NOTE:
The sentinel value is not set or checked on the route server code

Merged to Master: davids/quagga_configuration): adds a protobuf configuration
format that bgpd can read. Contains configuration information for the router and
the specific protocols. See 'bgpd/quaga_config.proto' for details.

If it complains about missing aclocale or something, run 'autoreconf'.

Branch dependencies:
       0. Requires a c++11 compatible g++ compiler
          - Also, there is an ld flag in '-lstdc++'. This was needed
            in order to get this to compile with the wrapper between c and c++.
            Don't know if this is c++11 dependent.
      test. Follow top rated answers instructions from
       Program expects to be in /usr/lib
       2. google protobuf greater than 2.6.0. and expected in /usr/lib

* texinfo
* libreadline6-dev
* redis (version used: 2.2.12)
* hiRedis (version used (0.13.3)
* C++11 compatible G++ compiler
    * Needed by unittests in bgpd.  Remove this need by
      commenting out '-std=c++11' from CXXFLAGS in bgpd/  
* stdc++
* Google protocol buffers:, nad (in /usr/lib).  
* (all in /usr/lib).

Instructions for installing dependencies
1) Install packages texinfo and libreadline6-dev using apt-get

2) Install redis (version used: 2.2.12 from apt-get) system wide 

2) Install hiredis (version used: 0.13.3 ) system wide

3) Add the following to .bashrc or .profile and re-source it.

export CPATH=/usr/local/include:/usr/local/include/hiredis
export LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH=/usr/local/lib

4) Install Google Test packages
   * wget
   * cd googletest-release-1.7.0
   * make
   * sudo cp -a include/gtest /usr/include
   * sudo cp -a /usr/lib

5) Install libprotobuf (version > 2.6.0)

Basic Quagga Installation instructions

To get Quagga to work as if it were
installed by Ubuntu 12.04 LTE's apt-get mechanism:

To add debugging, add 'g -O0' $AM_CFLAGS in bgpd/ 

1)In quagga- subdirectory, type: 
  ./configure --sysconfdir=/etc/quagga --enable-vtysh --localstatedir=/var/run/quagga
  If you want to run a modified version of quagga with MiniNext, then add a
  --prefix=$some_dir to configure and change the D_PATH in a custom initd script
  to be the sbin subfolder that is created by make install

2)Type: make; sudo make install

3)Create group 'quaggavty' and add 'quagga' user to it.
    sudo useradd -m quagga
    sudo groupadd quaggavty
    sudo usermod -a -G quaggavty quagga

4)Give user quagga permissions to modify /var/run.  
   mkdir -p /var/run/quagga
   chown quagga:quagga /var/run/quagga
   chmod 755 /var/run/quagga

5)Run ldconfig so that install picks up on new libraries.
   sudo ldconfig
   sudo ldconfig -p | grep libzebra

6)Chown ownership of /etc/quagga and all files to quagga:quaggavty.

7)Copy config/samples/quagga to /etc/init.d.  Make sure it is owned by root and executable.
    sudo cp config/samples/quagga /etc/init.d. 
    sudo chown root /etc/init.d/quagga
    sudo chmod u+rwx /etc/init.d/quagga

8)Enable IP forwarding: 
   sysctl -w net.ipv4.ip_forward=1

9)Copy config/samples/{*.conf, daemons} to /etc/quagga and make sure all files are owned by quagga:quaggavty

10)To see if things work: 
    bpgd &
    telnet localhost bgpd

Note, must be user 'quagga' to use vtysh.

Instructions for using topology config

It expects a file called 'protobuf_config' in the configuration directory ( it
will look in the same one that bgpd.conf is located in). This file contains a
text formatted protobuf.

On startup of bgpd_main, general_config_, wiser_config_ will be created (it will
be null on failure). To use this, create an extern to this variable in the file
it will be used in and interact with it with the functions in
'wiser_config_interface.h'. See for an
example of the abstraction being used.

configuration format:

A 'Configuration' message contains the different configurations for protocols
and global information (such as the running protocol of a router)

A 'WiserProtocolConfig' only has a 'Topology' message associated with it.

A 'Topology' has a list of node_links. Basically an adjacency list.

A 'NodeLink' has a 'NodeProperty' for the primary node and a list of 'Links'

A 'NodeProperty' has the name of the node and the interface associated with it.

A 'Link' has a 'NodeProperty' of the adjacent node and a symetric cost
associated with that link.

This is defined as a Text formatted proto. Example:
topology {
  node_links {
    primary_node {
      node_name: "a1"
      interface_ip: ""
    links {
      adjacent_node {
        node_name: "b1"
        interface_ip: ""
      link_cost: 10
  node_links {
    primary_node {
      node_name: "b1"
      interface_ip: ""
    links {
      adjacent_node {
        node_name: "a1"
        interface_ip: ""
      link_cost: 10
You can’t perform that action at this time.