[nzlug] Routers in dhcp.conf

Steve Holdoway steve at greengecko.co.nz
Tue Sep 18 18:54:08 NZST 2007


On Tue, 18 Sep 2007 17:55:51 +1200
Cliff Pratt <enkidu at cliffp.com> wrote:

> Robin Sheat wrote:
> > On Tuesday 18 September 2007 15:31:35 Raimund Eimann wrote:
> >> Currently, if I want 192.168.2.0/24 machines to be able to contact
> >> 192.168.3.0/24 machines, I need to alter the routing table on the affected
> >> machines manually. This is not very elegant.
> > I'm not aware of a way to do this, although if you find one, I'd like to know. 
> > I just do it manually with this in /etc/network/interfaces:
> > auto eth0
> > iface eth0 inet dhcp
> >         up ethtool -K eth0 tso off || true
> >         up route add -net 10.8.0.0 netmask 255.255.0.0 gw 10.10.0.10
> >         down route del -net 10.8.0.0 netmask 255.255.0.0 gw 10.10.0.10
> > 
> > to let this host know how to get traffic to 10.8.0.0. I have tried doing it at 
> > the default router and having that forward the traffic to the router that 
> > needed it, but didn't make it work, and didn't try hard. It seemed uglier 
> > than doing it manually :) (ignore the ethtool line, that makes VMware 
> > networking not get really slow)
> > 
> > Of course, if you do come up with a solution, I'd be very interested :)
> > 
> What about two servers one listening on one interface and one on the 
> other? Is that possible?
> 
> Cheers,
> 
> Cliff
> 
> _______________________________________________
> NZLUG mailing list NZLUG at linux.net.nz
> http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Yes. Just make sure that the IP address ranges don't overlap. You could also make one of the dhcp servers pass the request upstream it that's any use. 

Personally, I'd set up rules on MAC addresses such that the required routing is automagically downloaded for the machines in question.

If that makes sense...

Here's a ( debian ) example if it helps...

host asterisk {
  hardware ethernet 00:0A:FF:xx:xx:xx;
  fixed-address asterisk.my-domain;
  option ip-forwarding 1;
  option static-routes 10.1.0.1 192.168.2.1;
}



More information about the NZLUG mailing list