zebra - configure for multiple persistent routes

Hi,

I've got zebra installed... i want to configure it with multiple persitant routes so clients can use this box as their main router.  I'm trying to acheive load balancing/line bonding but need to create or make a conf file.

No idea what i'm doing!

Many thanks

Jon
jondangerAsked:
Who is Participating?
 
jrssystemsnetCommented:
Are you sure you need to be running zebra?  Zebra is for setting up automated route discovery exchanges between large networks - and I mean LARGE networks, with your ISP itself counting as a "network".

It sounds like all you really want is a simple gateway box with a few static routes assigned.  For that, you don't want zebra or routed, you just want to set gateway_enable = "YES" in your /etc/rc.conf (or issue the command /sbin/sysctl -w net.inet.ip.forwarding=1 in a shell script or at the command line) and set up some route commands in a shell script in /usr/local/etc/rc.d.

Here's an example /usr/local/etc/rc.d/ startup script to set up a few simple routes:

#!/bin/sh

# this is /usr/local/etc/rc.d/setroutes.sh
# it will execute automatically at system boot time
# or may be manually invoked as follows:
#
# /usr/local/etc/rc.d/setroutes.sh start

case "$1" in
start)
   # enable packet forwarding through this system
   /sbin/sysctl -w net.inet.ip.forwarding=1

   #  syntax: route add destination_network gateway_address subnet_mask
   route add 192.168.1.0 192.168.1.1 255.255.255.0
   route add 192.168.2.0 192.168.2.1 255.255.255.0
   route add 192.168.3.0 192.168.3.1 255.255.255.0
   ;;

stop)
   # no action needs to be taken
   ;;

*)
   echo "Usage: `basename $0` {start|stop}" >&2
   ;;

esac
exit 0
# end /usr/local/etc/rc.d/setroutes.sh
0
 
gheistCommented:
You have to arange AS number with your LIR and read documentation while you accomplish that
0
 
paras1Commented:
You can ask your provider for a private AS, also read zebra documentation which includes ospf, bgp, rip configurations.
0
 
gheistCommented:
Depends on location .... usually it takes only time.
0
 
gheistCommented:
Sysctl goes to /etc/sysctl.conf

For static rotes you can add this to /etc/rc.conf
static_routes="1 2 3"
route_1="-net 192.168.1.0/24 192.168.1.1"
route_2=

and so on
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.