[zebra 13448] [HOWTO] Use ASPath-tree with Zebra

Nicolas DEFFAYET zebra@zebra.org
Wed, 24 Apr 2002 23:20:46 +0200


Hello,


A lot of peoples ask me how use ASPath-tree with Zebra.
I write a howto for help this peoples.

You can see the result of this howto:
http://noc.fastnetxp.com/stats/aspath-tree/bgp.html

I wait your comments about this howto.
If you have others methods that vtysh for get full bgp table, find
errors,... don't hesitate to contact me !

Best Regards,

Nicolas DEFFAYET

----

HOWTO: Use ASPath-tree with Zebra

Write by Nicolas DEFFAYET <nicolas.deffayet@ndsoftwaregroup.com>
Version: 1.0

1/ Introduction


1.1) Copyright

Copyright© 2002 Nicolas DEFFAYET

This HOWTO is free document; you can redistribute it and/or modify it
under the terms of the GNU General Public License as  published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
A copy of the license is available at
http://www.gnu.org/copyleft/gpl.html

This HOWTO is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details


1.2) Notes

Get the last version of Zebra: http://www.zebra.org
Get the last version of ASPath-tree:
http://carmen.ipv6.tilab.com/ipv6/tools/ASpath-tree/index.html

The default installation directory of Zebra is: /usr/local/
The default installation directory of ASPath-tree is:
/usr/local/ASpath-tree/



2/ Preparation of Zebra


2.1) If you don't have vtysh (in /usr/local/bin)

Recompile Zebra with vtysh enabled:

 1. Unpack the Zebra's tarball.
 2. $ ./configure --enable-vtysh
 3. $ make
 4. Stop your Zebra's deamons.
 5. $ make install
 6. Restart your Zebra's deamons.


2.2) If you have vtysh (in /usr/local/bin)

Now test if you get the full bgp table:

/usr/local/bin/vtysh -e "show ipv6 bgp"

Note: this command work only as root !!!



3/ Installation of ASPath-tree


3.1) Unpack the ASpath-tree's tarball in /usr/local/ASpath-tree


3.2) Edit /usr/local/ASpath-tree/www/update-rtree

Modify the perl path if it's not good.

Change this line:
my $CONFIGFILE = "/etc/ASpath-tree.config";
by:
my $CONFIGFILE = "/usr/local/ASpath-tree/etc/ASpath-tree.config";


3.3) Edit /usr/local/ASpath-tree/www/lib/rsh-cisco.pl

Change the line:
	open(OUTPUT,"$RSHDIR/rsh $ROUTERADDR -l $ROUTERUSER \"show bgp
ipv6\" |");
by:
	open(OUTPUT,"$RSHDIR/vtysh -e \"show bgp ipv6\" |");


3.4) Edit /usr/local/ASpath-tree/www/etc/ASpath-tree.config

Modify this variables:

HOMEDIR = /usr/local/ASpath-tree
RSHDIR = /usr/local/bin
ROUTERADDR = localhost
ROUTERUSER = router
HTMLDIR = /usr/local/ASpath-tree/www/
CONTACTNAME = 
CONTACTMAIL = 
SITENAME = 

Read the comments of the configuration for more informations...


3.5) Create directory /usr/local/ASpath-tree/www/


3.6) Update cron:

0,5,10,15,20,25,30,35,40,45,50,55 0-23 * * *
/usr/local/ASpath-tree/update-rtree > /dev/null 2>&1

You can modify the delay beetween each updates.


3.7) For more informations, read /usr/local/ASpath-tree/readme.txt



4/ Running ASpath-tree

ASpath-tree will be start every 5 minutes by cron and create html files
in /usr/local/ASpath-tree/www/


----