Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Oct 2002 22:35:51 -0700
From:      "Firsto Lasto" <firstolasto@hotmail.com>
To:        bsd@perimeter.co.za, freebsd-questions@freebsd.org
Subject:   Re: route settings in rc.conf - question, with details.
Message-ID:  <F129arcR4ZDgC81Tbdk000000a9@hotmail.com>

next in thread | raw e-mail | index | archive | help

Thank you very much for that help - unfortunately Igot the wrong information 
and stated the problem slightly incorrect.

In reality, the rc.conf in question is:

defaultrouter="10.10.10.1"

ifconfig_fxp0="inet 10.10.10.2 netmask 255.255.255.0"
ifconfig_fxp0_alias0="inet 20.20.20.2 netmask 255.255.255.0"

----

so, the router in question that has address 10.10.10.1 also has address 
20.20.20.1 - however, either one will work as the default gateway for BOTH 
subnets, which is why the rc.conf above works (using one default gateway for 
both addresses on fxp0) however, I still get:

/kernel: arplookup 10.10.10.1 failed: host is not on local network

because 20.20.20.2 arplookups 10.10.10.1 and it isn't local.  BUT it still 
works - all packets from the 20.20.20.2 alias work just fine using 
10.10.10.1 as a gateway.

So how do I alter things (that are actually working ok) to get rid of those 
error messages ?  I think I could do it two ways - one, add a second gateway 
for the 20.20.20.0/24 subnet for those aliases, OR ... well actually I guess 
that is the only way to do it.

So what is the rc.conf syntax to do that ?

> >
> > Hi,
> >
> > I have a system with IPs assigned from 192.168.0.0/24 and 192.168.1.0/24
> >
> > Right now I have this in my rc.conf:
> >
> > defaultrouter="10.10.10.10"
> > ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.255.0"
> > ifconfig_fxp0_alias0="inet 192.168.0.2 netmask 255.255.255.255"
> > ifconfig_fxp0_alias1="inet 192.168.1.1 netmask 255.255.255.255"
> >
> > So, as you can see I have one default route, and both /24s use that
>single
> > 10.10.10.10 as the default router.  But, because I have simply added the
> > 192.168.1.1 IP as one more plain old alias, I now get this in my logs:
> >
> > /kernel: arplookup 10.10.10.10 failed: host is not on local network
> >
> > So, how do I add 192.168.1.1 as an alias, without adding another
> > defaultrouter, since my current defaultrouter setting is already correct
>?
> >
>
>The problem is not with the aliases - it is (as the message says) because
>the default router is not on a local network.  If the router is attached
>via fxp0, then try adding an alias like this:
>ifconfig_fxp0_alias2="inet 10.10.10.1 netmask 255.255.255.0"
>
>Then your system will know which interface to use to talk to 10.10.10.10.
>
>---
>Regards,
>Patrick O'Reilly.
>     ___        _            __
>    / _ )__ __ (_)_ __ ___ _/ /____ __
>   / __/ -_) _) /  ~  ) -_), ,-/ -_) _)
>  /_/  \__/_//_/_/~/_/\__/ \__/\__/_/
>     http://www.perimeter.co.za


_________________________________________________________________
Get a speedy connection with MSN Broadband.  Join now! 
http://resourcecenter.msn.com/access/plans/freeactivation.asp


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F129arcR4ZDgC81Tbdk000000a9>