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:
defaultrouter="NO"
quagga_enable="YES"
Also, you may wish to set the following options:"
quagga_daemons="zebra bgpd etc..."
quagga_flags="...."
quagga_extralibs_path="... ..."
router_enable="NO"
watchquagga_enable="YES"
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
add
quagga_enable="YES"
quagga_daemons="zebra bgpd"
3) Do the basis configuration
vi /usr/local/etc/quagga/zebra.conf
add
hostname zzzRouter
password zzzpass
enable password zzzpass
vi /usr/local/etc/quagga/bgpd.conf
add
hostname zzzRouter
password zzzpass
enable password zzzpass
4) Start Quagga
/usr/local/etc/rc.d/quagga start
5)
You can access the zebra daemon as follows:
telnet localhost 2601 (and use passwords set above in zebra.conf)
or
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)
or
telnet localhost bgpd
Then to send all the configured static routes I did the following:
router bgp 65001
bgp router-id 10.202.70.220
redistribute kernel
neighbor 10.48.0.219 remote-as 65001
neighbor 10.48.0.219 route-map no_inbound in
!
route-map no_inbound deny 10
description Deny all inbound routes
match peer 10.48.0.219
!
No comments:
Post a Comment