IOS On FreeBSD (Zebra or was it Quagga)

Zebra is a look a like IOS front end for routing on Linux and *BSD systems. It became popular are routed went commercial (might be slightly wrong over that).

I was looking to get dynamic routing installed on FreeBSD and initially installed zebra from the port. However after considerable effort to get it up and running which while clumsy does sort of hang together.  A utility has been provided vtysh which is used like the telnet from end of the router. The idea being that you can create a config and ‘write mem‘ when you’ve finished. However when I did this it created a new file call Zebra.conf and whilst I can see from the source code of the daemons that this file is looked at it. I couldn’t figure out how to get this file used (nothing by googling either).

Whilst hunting for information on zebra I stumbled across a port called quagga which I found some additional information on.

Installation of this port for the main part has been quite straight forward details as follows:

# cd /usr/ports/net/quagga
# make install

Once this completes a number of configuration changes are needed.

Firstly amend the /etc/rc.conf and add the following lines


The second line is optional and really only makes sense if your upstream injects a default route.

Once this is done you’ll need to generate the initial configuration files. I found the simplest way to do this was to kick off the daemons and then connect using vtysh and write the config. For the daemons to start you need to create empty config files as follows:

# cd /usr/local/etc/quagga
# touch zebra.conf
# touch ospfd.conf
# touch ripd.conf
# /usr/local/etc/rc.d/quagga start

Once done connect to the daemons using

# vtysh
Hello, this is Quagga (version 0.99.11).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
servername# write mem
Building Configuration...
Configuration saved to /usr/local/etc/quagga/zebra.conf
Configuration saved to /usr/local/etc/quagga/ospfd.conf

This will have created initial configuration. You can exist vtysh and then edit the inidividual files or you can build the config within vtysh.

Once you are happy with the configuration reboot the server and you’ll have it routing.