On Sat, Jun 15, 2013 at 12:23 AM, Kenneth R Westerback
<kwesterb...@rogers.com> wrote:
> 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.
It seems you are right about this, it seems to be working in one
direction already, I noticed working on your advise below that packets
are going from 192.168.1.0/24 to 192.168.0.0/24 but not the other way,
so all that is left to work on is pf.
>>
>>
>> > >
>> > >> 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.
The subnet blocks each have the appropriate routers, before I was
putting them both before and outside the subnet block systems were
getting the router from the other subnet. The default route is working
on both systems, without it the subnet 192.168.1.1/24 was getting the
default route 192.168.0.1 which didn't work.
>>
>> > 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
It seems it was working in the first place just I was pinging a
Windoze 8 machine that is blocking icmp packets. I then pinged my
phone which is on the wifi subnet as well and worked out it was
working both ways. Thanks again Microsoft. Windows ate my time.
>>
>
> 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.
It looks like I don't even need it. I just assumed it would.

>
> .... Ken



--
www.johntate.org

Reply via email to