NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: default gateway on different subnet



On Fri, Nov 14, 2008 at 01:59:20AM +0100, Rhialto wrote:
> On Thu 13 Nov 2008 at 23:08:45 +0100, Petar Bogdanovic wrote:
> > what is the proper NetBSD equivalent for the following two linux
> > route-commands in a situation where one host has not just one network
> > interface but also the problem that the default gateway is not on his
> > subnet:
> > 
> > 
> >    ifconfig eth0 200.2.116.140 netmask 255.255.255.0
> > 
> >    route add -net 200.2.117.0 netmask 255.255.255.240 dev eth0
> >    route add default gw 200.2.117.1
> 
> Looking at the exact numbers again, it seems it is simpler than I
> thought: the true netmask is just different from what you've been told.
> If you set it to 255.255.254.0, both 200.2.116.140 and 200.2.117.1 will
> be in the same network, and things should be correct.

That did the trick, thanks a lot!


> Now if they have set up things such that you can't reach, say,
> 200.2.117.0.128 (which is outside the given netmask 255.255.255.240),
> then they have truely messed up.

I just checked and I can reach everything from .116.1 to .117.254.


Thanks again, this definitely saved my day.

Petar


Home | Main Index | Thread Index | Old Index