quagga

Quagga is a routing software package which supports following protocols: RIP, OSPF, BGP, IPv4, IPv6, etc.

NetBSD provides network configuration through ifconfig, route, netstat, etc.

In the alternative Quagga also can setup interface's, addresses, flags, routes and so on. Quagga provides and handles the alternative networking options. Quagga can be in use for single xDSL connection, small network configuration and to set-up backbone routers for really large network.

Very often Quagga in use together with NetBSD networking. NetBSD serves interfaces and Quagga serves routing.

Traditionally ISP's uses Quagga for RIP, OSPF and BGP routing.

Contents

  1. quagga
  2. Installation
  3. Interfaces
  4. How to set up Quagga BGP router.
  5. Example: osfpd.conf
  6. vtysh

Installation

To install Quagga Routing Suite do:

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

Configuration files located at /usr/pkg/etc/zebra.

To run quagga during machine start you can add into rc.local file following:

mkdir /var/run/zebra
chown quagga /var/run/zebra
chgrp quagga /var/run/zebra
/usr/pkg/sbin/zebra -d
/usr/pkg/sbin/bgpd -d

Put in /usr/pkg/etc/zebra/zebra.conf following:

hostname yourhostname
password yourpassword
enable password yourpassword

Log files located at: /var/log/quagga/.

Interfaces

If you need to define lo put the following in /usr/pkg/etc/zebra/zebra.conf, for an example:

interface lo
ip address 127.0.0.1/8 
ip address A.B.C.D/32 (this is your host real IP address)

To enable network interfaces put for an example:

interface rtk0
ip address 192.168.170.201/24
multicast

Note. This is alternative way to setup network interfaces instead of /etc/ifconfig.xxx configuration files.

How to set up Quagga BGP router.

Example of content for /usr/pkg/etc/zebra/bgpd.conf file:


!
hostname bgpd.qw
password xxxx
enable password xxxx
log file /var/log/zebra/bgpd.log
!
router bgp 12121
bgp router-id 192.168.170.1
network 192.168.170.0/24
!
!
!
neighbor 192.168.171.1 remote-as 12121
neighbor 192.168.171.1 description GW-TER-UA
neighbor 192.168.171.1 version 4
neighbor 192.168.171.1 soft-reconfiguration inbound
neighbor 192.168.171.1 router-map UA-IN in
neighbor 192.168.171.1 prefix-list UA-OUT out
!
!
!
neighbor 192.168.172.1 remote-as 12121
neighbor 192.168.172.1 description GW-TER-WORLD
neighbor 192.168.172.1 version 4
neighbor 192.168.172.1 soft-reconfiguration inbound
neighbor 192.168.172.1 router-map WOLRD-IN in
neighbor 192.168.172.1 prefix-list WORLD-OUT out
!
!
!
router-map WORLD-IN permit 10
 set local-preference 200
!
ip prefix-list WORLD-OUT permit 192.168.170.0/24
!
!
!
router-map UA-IN permit 10
set local-preference 100
!
ip prefix-list UA-OUT permit 192.168.170.0/24
!
!
!
access-list CONF permit 192.168.170.0/24
access-list CONF deny any
!
!
!
line vty
 access-class CONF
 exec-timeout 120 0

Example: osfpd.conf

Here is an example of /usr/pk/etc/zebra/ospfd.conf file:


hostname yourhostname
password yourpassword
enable password yourpassword

interface rtk0
 no ip ospf authentication-key
 ip ospf hello-interval 2
 ip ospf dead-interval 5

interface rtk1
 no ip ospf authentication-key
 ip ospf hello-interval 2
 ip ospf dead-interval 5

router ospf
  ospf router-id A.B.C.D
  network 192.168.170.0/24 area 0
  network 192.168.171.0/24 area 0

vtysh

To manage quagga router do:

# vtysh

See also Quagga Routing Suite

Add a comment