Commit ba259e51 authored by Mike Hibler's avatar Mike Hibler
Browse files

Add rudimentary gated support for BSD/Linux.

Requires a special config file for each control net configuration,
we currently support only the pc600 and pc850.  This could be fixed by
dynamically generating the config file based on the interface info returned
from the DB.  Simple perl hack for someone.
parent 54a59225
# smux is a way of exporting route info via SNMP.
# You can turn it on if you have an SNMP daemon running.
smux off;
# no RIP routing
rip off;
# There be magic in here.
#
# Backbone contains the control network and is marked passive to avoid
# sending any OSPF traffic out on it.
#
# The other area is all the experimental interfaces. They have priority=1
# cuz that is what makes it work. Without that, info was not exchanged.
# I saw the priority setting in nexthop.com examples and just did it.
#
ospf on {
backbone {
interface fxp0 { passive; };
};
area 0.0.0.2 {
authtype none;
interface fxp1 { priority 1; };
interface fxp2 { priority 1; };
interface fxp3 { priority 1; };
interface fxp4 { priority 1; };
};
};
# smux is a way of exporting route info via SNMP.
# You can turn it on if you have an SNMP daemon running.
smux off;
# no RIP routing
rip off;
# There be magic in here.
#
# Backbone contains the control network and is marked passive to avoid
# sending any OSPF traffic out on it.
#
# The other area is all the experimental interfaces. They have priority=1
# cuz that is what makes it work. Without that, info was not exchanged.
# I saw the priority setting in nexthop.com examples and just did it.
#
ospf on {
backbone {
interface fxp4 { passive; };
};
area 0.0.0.2 {
authtype none;
interface fxp0 { priority 1; };
interface fxp1 { priority 1; };
interface fxp2 { priority 1; };
interface fxp3 { priority 1; };
};
};
#!/bin/sh
# We only handle gated right now
if [ "$1"x != "ROUTERTYPE=gated"x ]
then
echo "WARNING bad TMCD routing info, gated not started"
exit 0
fi
# Must know the control net
if [ -x /etc/testbed/control_interface ]
then
CIF=`/etc/testbed/control_interface`
else
echo "WARNING cannot determine control interface, gated not started"
exit 0
fi
if [ ! -x /usr/local/sbin/gated ]
then
echo "WARNING gated not installed, gated not started"
exit 0
fi
if [ ! -r /etc/testbed/gated_$CIF.conf ]
then
echo "WARNING no gated config for interface $CIF, gated not started"
exit 0
fi
sysctl -w net.inet.ip.forwarding=1
sysctl -w net.inet.ip.fastforwarding=1
/usr/local/sbin/gated -f /etc/testbed/gated_$CIF.conf
exit 0
......@@ -10,6 +10,11 @@ if [ -x /etc/testbed/rc.ifc ]; then
/etc/testbed/rc.ifc
fi
if [ -x /etc/testbed/rc.route -a -r /etc/testbed/router.conf ]; then
echo "Setting up Testbed interface routing ..."
/etc/testbed/rc.route `cat /etc/testbed/router.conf`
fi
if [ -x /etc/testbed/rc.delay ]; then
echo "Setting up Testbed delay configuration ..."
/etc/testbed/rc.delay
......
# smux is a way of exporting route info via SNMP.
# You can turn it on if you have an SNMP daemon running.
smux off;
# no RIP routing
rip off;
# There be magic in here.
#
# Backbone contains the control network and is marked passive to avoid
# sending any OSPF traffic out on it.
#
# The other area is all the experimental interfaces. They have priority=1
# cuz that is what makes it work. Without that, info was not exchanged.
# I saw the priority setting in nexthop.com examples and just did it.
#
ospf on {
backbone {
interface eth2 { passive; };
};
area 0.0.0.2 {
authtype none;
interface eth0 { priority 1; };
interface eth1 { priority 1; };
interface eth3 { priority 1; };
interface eth4 { priority 1; };
};
};
# smux is a way of exporting route info via SNMP.
# You can turn it on if you have an SNMP daemon running.
smux off;
# no RIP routing
rip off;
# There be magic in here.
#
# Backbone contains the control network and is marked passive to avoid
# sending any OSPF traffic out on it.
#
# The other area is all the experimental interfaces. They have priority=1
# cuz that is what makes it work. Without that, info was not exchanged.
# I saw the priority setting in nexthop.com examples and just did it.
#
ospf on {
backbone {
interface eth4 { passive; };
};
area 0.0.0.2 {
authtype none;
interface eth0 { priority 1; };
interface eth1 { priority 1; };
interface eth2 { priority 1; };
interface eth3 { priority 1; };
};
};
#!/bin/sh
# We only handle gated right now
if [ "$1"x != "ROUTERTYPE=gated"x ]
then
echo "WARNING bad TMCD routing info, gated not started"
exit 0
fi
# Must know the control net
if [ -x /etc/testbed/control_interface ]
then
CIF=`/etc/testbed/control_interface`
else
echo "WARNING cannot determine control interface, gated not started"
exit 0
fi
if [ ! -x /usr/sbin/gated ]
then
echo "WARNING gated not installed, gated not started"
exit 0
fi
if [ ! -r /etc/testbed/gated_$CIF.conf ]
then
echo "WARNING no gated config for interface $CIF, gated not started"
exit 0
fi
sysctl -w net.ipv4.conf.all.forwarding=1
/usr/sbin/gated -f /etc/testbed/gated_$CIF.conf
exit 0
......@@ -10,6 +10,11 @@ if [ -x /etc/rc.d/testbed/rc.ifc ]; then
/etc/rc.d/testbed/rc.ifc
fi
if [ -x /etc/testbed/rc.route -a -r /etc/testbed/router.conf ]; then
echo "Setting up Testbed interface routing ..."
/etc/testbed/rc.route `cat /etc/testbed/router.conf`
fi
if [ -x /etc/rc.d/testbed/rc.rpm ]; then
echo "Installing RPMs ..."
/etc/rc.d/testbed/rc.rpm
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment