From owner-freebsd-hackers Tue Jan 14 23: 1:48 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 030E837B401 for ; Tue, 14 Jan 2003 23:01:45 -0800 (PST) Received: from smtpout.mac.com (A17-250-248-85.apple.com [17.250.248.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 857AA43F5F for ; Tue, 14 Jan 2003 23:01:44 -0800 (PST) (envelope-from justin@mac.com) Received: from asmtp01.mac.com (asmtp01-qfe3 [10.13.10.65]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h0F71ibD019578 for ; Tue, 14 Jan 2003 23:01:44 -0800 (PST) Received: from mac.com ([12.234.224.67]) by asmtp01.mac.com (Netscape Messaging Server 4.15) with ESMTP id H8QU6V00.71K for ; Tue, 14 Jan 2003 23:01:43 -0800 Date: Tue, 14 Jan 2003 23:01:42 -0800 Subject: Re: adding some new IPs from a different subnet - errors Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) From: Justin Walker To: freebsd-hackers@FreeBSD.ORG Content-Transfer-Encoding: 7bit In-Reply-To: <20030114224329.Y39623-100000@mail.econolodgetulsa.com> Message-Id: <33B56C40-2857-11D7-B494-00306544D642@mac.com> X-Mailer: Apple Mail (2.551) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG All of this depends on how 'ifconfig' and the kernel cooperate in interpreting address/mask pairs. Normally, I would expect that you do the following when adding 'aliases': if the alias IP address is on the same subnet as an existing address for this interface, use the netmask 255.255.255.255; in your case, 10.10.10.1 exists, and you are adding .2 and .3 if the alias address is for a *new* subnet, you need to use a "real" netmask (you will have to figure out exactly what that should be; maybe 255.255.255.0); in your case, you are adding 192.168.0.2, which is new, so you *don't* use 255.255.255.255 as a netmask The netmask 255.255.255.255 is kind of funky, but in essence it is taken as a "point-to-point" mask; for addresses which lie on an existing subnet, this mask tells the kernel that "packets going to 10.10.10.2 go right to wherever 10.10.10.1 goes" [I'm finessing a few details]. When you use this netmask on a non-point-to-point link, like an ethernet, and there's nothing pre-existing to point to, the kernel gets confused (there is no existing subnet that matches "192.168.0.1/255.255.255.255", hence the error message). The fix is to add that "alias" address with a "proper" netmask. Since you are using it, I assume there's a related subnet running on the "cable" the device is connected to, so that should tell you what to use. Hope that helps. Regards, Justin On Tuesday, Jan 14, 2003, at 22:45 US/Pacific, Josh Brooks wrote: > > Hi, > > I have a rc.conf that looks like: > > defaultrouter="10.10.10.1" > ifconfig_fxp0="inet 10.10.10.2 netmask 255.255.255.0" > ifconfig_fxp0_alias0="inet 10.10.10.3 netmask 255.255.255.255" > > Ok, easy enough - one interface, one default router, and two IPs on > that > subnet. > > BUT - as it happens, 10.10.10.1 is _also_ the default router for > 192.168.0.0/24 ... it has the IP 192.168.0.1, but it also has the IP of > 10.10.10.1 - it is the same default router, but with a few different > subnets on it. > > So, I went and added one of the 192 addresses to my system: > > defaultrouter="10.10.10.1" > ifconfig_fxp0="inet 10.10.10.2 netmask 255.255.255.0" > ifconfig_fxp0_alias0="inet 10.10.10.3 netmask 255.255.255.255" > ifconfig_fxp0_alias1="inet 192.168.0.2 netmask 255.255.255.255" > > And this works great - it works because 10.10.10.1 is also the default > router for 192.168.0.0/24. BUT, even though the network works great > and > that IP and everything else is fine, I am getting my log files full of: > > /kernel: arplookup 192.168.0.1 failed: host is not on local network > > Note that the error is about the gateway - 192.168.0.1 is the IP on the > gateway that this system uses. So, at the end of the day, everything > works great, but the system doesn't like the config and is complaining > in > the logs. > > --------- > > What is the best way to make these log errors stop occurring ? I hate > to > be a pain, but not only do I need to know what to put in rc.conf, but I > cannot reboot the system so I need to know what commands will > implement it > on the fly as well. > > BTW: I have indeed tried setting: > > sysctl -w net.link.ether.inet.log_arp_wrong_iface=0 > > and the errors still kept coming ... which makes me wonder what that > sysctl actually does ... > > many thanks! > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > > -- Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | If you're not confused, | You're not paying attention *--------------------------------------*-------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message