Wednesday, 8 January 2014

Installing Quagaa on Freebsd

We needed to send some static route from my Freebsd host to a collegue on the next desk and it turned out that he didn't know how to use BGP. So we decided that we would use this "overkill" method of sending the routes and in the process he could learn about BGP.

Below I've documented the steps I need to install and configure Quagga to send all my static routes from my Freebsd host.

1) Install Quagga

cd /usr/ports/net/quagga
make install

The install script outputs the following bits of useful information:

To enable quagga, add the following lines to rc.conf:


Also, you may wish to set the following options:"
quagga_daemons="zebra bgpd etc..."
quagga_extralibs_path="... ..."

     zebrasrv      2600/tcp          # zebra service
     zebra         2601/tcp          # zebra vty
     ripd          2602/tcp          # RIPd vty
     ripngd        2603/tcp          # RIPngd vty
     ospfd         2604/tcp          # OSPFd vty
     bgpd          2605/tcp          # BGPd vty
     ospf6d        2606/tcp          # OSPF6d vty
     ospfapi       2607/tcp          # ospfapi
     isisd         2608/tcp          # ISISd vty


2) Setup Quagga to start when then host is powered on:

vi /etc/rc.conf
quagga_daemons="zebra bgpd"

3) Do the basis configuration

vi /usr/local/etc/quagga/zebra.conf
hostname zzzRouter
password zzzpass
enable password zzzpass

vi /usr/local/etc/quagga/bgpd.conf
hostname zzzRouter
password zzzpass
enable password zzzpass

4) Start Quagga

/usr/local/etc/rc.d/quagga start


You can access the zebra daemon as follows:

telnet localhost 2601 (and use passwords set above in zebra.conf)
telnet localhost zebra

This will present you with a standard Cisco IOS interface. The zebra daemon is used to set interface info and look at routing table. To configure the routing commands you will need to access the routing daemon, in this case BGP:

telnet localhost 2605 (and use passwords set above)
telnet localhost bgpd

Then to send all the configured static routes I did the following:

router bgp 65001
 bgp router-id
 redistribute kernel
 neighbor remote-as 65001
 neighbor route-map no_inbound in
route-map no_inbound deny 10
 description Deny all inbound routes
 match peer

No comments:

Post a Comment