3. Route Configuration

3.1. Getting the routes

The first step in the setup process is to get the routing tables. The example requires the Internet2 BGP routing table via a route reflection setup from a backbone Internet service provider. Adaptation of this concept should be possible provided that multiple destination routes exist and can be propogated to the Linux routing system.

Working with Zebra or Quagga can be daunting if you're not familiar with router configuration. The sample configuration files included with the source code distribution are very helpful, and the interactive interface is similar to that of Cisco routers. Below are sample Zebra config files. If the tty interfaces to zebrad and bgpd are enabled, be careful that they're protected. Use a hardware firewall or local iptables.

3.2. Sample Quagga/Zebra configuration

Example 1. zebra.conf


! zebra.conf
!
hostname director
password xxxxxx
enable password xxxxxx
log syslog
!log stdout
!log file zebra.log
!
smux peer .1.3.6.1.4.1.3317.1.2.1 zebra
!

      

Example 2. bgpd.conf


! bgpd.conf
!
hostname bgpd
password xxxxxx
enable password xxxxxx
log syslog
!log stdout
!log file bgpd.log
smux peer .1.3.6.1.4.1.3317.1.2.2 zebra_bgpd
!
!bgp mulitple-instance
!
router bgp 2
  bgp router-id 192.168.1.254
  neighbor 10.0.1.1 remote-as 2
  neighbor 192.168.2.1 remote-as 2
  neighbor 192.168.2.1 route-reflector-client
  neighbor 192.168.2.2 remote-as 2
  neighbor 192.168.2.2 route-reflector-client
!
line vty
!

      

3.3. Check the routing table

Note that this configuration passes the BGP routes to other hosts. Once you have the routing table, it's easy to give it to other servers on your network.

When Zebra is running, the system routing table should contain lots of entries like this.


10.0.0.0     default-router  255.255.255.0   UG    4475   0        0 eth0

      

This indicates that the dynamic routes are visible, so we move on to the next step. Either of the following commands should display the routing table:

$ route
$ iproute show table main