[Sussex] Persistent routes

Steve Dobson steve at dobbo.org
Tue May 15 10:38:08 UTC 2012


Hi Paul

On 15/05/12 11:23, Paul Howard wrote:
> Hi all,
> 
> Am running a couple of Ubuntu 11.10 servers and am having real problems
> getting some static routes working.
> 
> I can get the routes working by using:
> 
> route add -net 192.168.0.0/24 gw 192.168.64.190 dev eth1:0
> 
> 
> I added the following to my /etc/network/interfaces to make the routes
> persistent:
> 
> up route add -net 192.168.0.0/24 <http://192.168.0.0/24> gw
> 192.168.64.190 dev eth1:0
> 
> 
> On restarting the server the routes are not loaded. 
> 
> Anyone got any ideas why this isn't working?
> 
> Cheers,

I have an extra network connection on my Debian firewall.  It has three
NICs - eth0 is the home LAN (172.16.1/24), eth1 is connected to router
and eth2 is connected to my DMZ switch (I have a block of 8 from my
ISP).  eth1 & 2 are bridge on br0.

But to get to the router's private web configuration pages I need to
added a second IP address to the bridged IP interface.  Here is that
entry in the /etc/network/interfaces file:

  auto br0:1
  iface br0:1 inet static
	address 192.168.1.130
	netmask 255.255.0.0
	network 192.168.0.0
	broadcast 192.168.255.255

I don't need an extra route(8) configuration as my firewall and router
are both on the 192.168.0.0/16 network.  One only needs route(8)
configuration to hosts not an a connected network.

I'm guessing from the IP address range you're using that a similar
config will work for you too.

Hope this helps
Steve

-- 
Steve "Dobbo" Dobson



More information about the Sussex mailing list