On Fri, Jun 14, 2013 at 02:38:48PM +0100, Stuart Henderson wrote: > On 2013/06/14 21:49, John Tate wrote: > > On Fri, Jun 14, 2013 at 9:16 PM, Stuart Henderson <s...@spacehopper.org> > > wrote: > > > On 2013-06-14, John Tate <j...@johntate.org> wrote: > > >> It doesn't complain about it but I've never done much with routing > > >> before. If I wanted to do it on the machine I'd do > > >> # route add -net 192.168.0.0/24 192.168.1.1 > > > > > > Why would you need to do this at all, it seems you are already using > > > 192.168.1.1 as your default route? > > I thought I needed it so 192.168.0/24 can access 192.168.1/24 > > Try e.g. "route -n get 192.168.1.5" with and without a route to the subnet. > In one case there will be a default route pointing at 192.168.0.1 and in the > other case there will be a 192.168.1.0/24 route pointing at 192.168.0.1. > > > > > > > >> I can't seem to find how to do this in dhcp-options(5) > > >> > > >> Named won't even start with this... > > >> option static-routes 192.168.1/24 192.168.0.1; > > >> Or this... > > >> option static-routes 192.168.1.0/24 192.168.0.1; > > > > > > "option static-routes" is for classful (class A/B/C) addresses, you may > > > not specify a subnet mask there. > > > > > >>>> I have the following dhcpd.conf... > > >>>> shared-network kab { > > > > > > Why do you have shared-network? > > > > > Can't remember why I did that so I just got rid of it. I added "option > > routers 192.168.0.1, 192.168.1.1;" before the subnets at the top of > > the file and now I am getting the right default gateway. > > Routers should be set in the "subnet" block, you shouldn't hand > 192.168.1.1 as a possible router to hosts which are in 192.168.0.x. > > > I got rid of the static routes, they were not working anyway. I must > > need to add something to pf to route between subnets 192.168.0/24 and > > 192.168.1.1/24 and visa-versa. > > This is usually easy enough to work out. Add 'log' in relevant places > in pf.conf and watch tcpdump -neipflog0 >
Also, support for static-routes was just added in the last week or so and you've not mentioned what versions of OpenBSD/dhcpd/dhclient you are running. .... Ken