23 lines
743 B
Bash
Executable file
23 lines
743 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# Written by andrew@egressive.com 2008-01-09 to add the required routes on all machines on Waylon
|
|
#
|
|
# All the virtual machines on Waylon should use:
|
|
# eth0: private IP range for management
|
|
# eth1: public IP range for normal access
|
|
|
|
[ "$IFACE" = "eth1" ] || exit 0
|
|
|
|
# The route for the current (old) smithers
|
|
/sbin/route add -net 202.6.116.0 netmask 255.255.255.248 dev eth1
|
|
|
|
# The route for the 202.6.116.128/28 range
|
|
if ! /sbin/route -n | grep 202.6.116.128 > /dev/null ; then
|
|
/sbin/route add -net 202.6.116.128 netmask 255.255.255.240 dev eth1
|
|
fi
|
|
|
|
# The route for the 202.6.117.160/27 range
|
|
if ! /sbin/route -n | grep 202.6.117.160 > /dev/null ; then
|
|
/sbin/route add -net 202.6.117.160 netmask 255.255.255.224 dev eth1
|
|
fi
|
|
|