Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2001 21:47:06 -0400
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        <chad@DCFinc.com>, "Bob Bishop" <rb@gid.co.uk>
Cc:        <webmaster@healthnet.es>, <freebsd-stable@FreeBSD.ORG>
Subject:   Re: arplookup xxx.xxx.xxx.xxx failed: host is not on local network
Message-ID:  <001901c0c872$a86bfc10$1200a8c0@gsicomp.on.ca>
References:  <200104190133.SAA05138@freeway.dcfinc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> As I recall, Bob Bishop wrote:
> > At 16:25 +0200 18/4/01, Webmaster wrote:
> >> Since I built world with -stable (RC) sources of april 9, and still
> >> after remaking world with sources of april 17, one of my servers
> >> (call it host "A") is producing these logs:
> >> ...
> >> Apr 18 13:18:26 A /kernel: arplookup <IP of B host> failed: host is
> >> not on local network
> >> Any suggestion?
> >
> > This kind of thing used to happen if you define an alias with a netmask
> > other than 255.255.255.255.
>
> I fear to re-open a frequently hashed discussion, but I still don't
> completely understand the use of the netmask on an alias.  Basically
> the advice here has been "use 0xffffffff".
>
> But what, exactly, is the reason?  How is the netmask employed in
> conjunction with an alias?
>
> For example, the following is what I set up on my first machine that
> used aliases.  It was a FreeBSD 2.1 web server that served two domains.
>
> Excerpt from /etc/sysconfig
> +---------------
> | network_interfaces="lo0 ix0"
> | ifconfig_lo0="inet localhost"
> | ifconfig_ix0="inet freebie.dcfinc.com netmask 255.255.255.0"
> | ifconfig_ix0_alias0="inet www.larsons.org netmask 255.255.255.0"
> +---------------
>
> That's what seemed intuitive at the time, and it seem{ed,s} to work.
>
> So, what's wrong with this picture, or did life change sometime
> after 2.1.7 came out?

I'm not sure when things changed, but the current state of netmasks and
aliases is this:

If the aliased IP is on the same subnet, use the all-one's netmask.
If the aliased IP is not on the same subnet, use the appropriate netmask for
the IP.

I've been toying around with the idea of "correcting" this do use the
"proper" netmask based on the IP and the subnet, since this is what most
other UNIX-like OSes do.  Someone else may beat me to it though.

--
Matt Emmerton


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001901c0c872$a86bfc10$1200a8c0>