From owner-freebsd-hackers Wed Dec 17 07:06:42 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id HAA16577 for hackers-outgoing; Wed, 17 Dec 1997 07:06:42 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from etinc.com (et-gw-fr1.etinc.com [204.141.244.98]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id HAA16561 for ; Wed, 17 Dec 1997 07:06:36 -0800 (PST) (envelope-from dennis@etinc.com) Received: from dbsys.etinc.com (dbsys.etinc.com [204.141.95.138]) by etinc.com (8.8.3/8.6.9) with SMTP id KAA13478; Wed, 17 Dec 1997 10:09:33 -0500 (EST) Message-Id: <3.0.32.19971217100825.00d45930@etinc.com> X-Sender: dennis@etinc.com X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Wed, 17 Dec 1997 10:08:26 -0500 To: Greg Lehey From: dennis Subject: Re: ifconfig reports bogus netmask Cc: hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk At 11:34 AM 12/17/97 +1030, Greg Lehey wrote: >On Tue, Dec 16, 1997 at 07:38:10PM -0500, dennis wrote: >> At 08:59 AM 12/17/97 +1030, you wrote: >>> On Tue, Dec 16, 1997 at 10:39:08AM -0500, dennis wrote: >>>> >>>> Is there any chance of this getting fixed? Its been broken forever. I'm >>>> talking about PTP interfaces, where the routes are inherently host >>>> mask routes. ifconfig reports the natural mask or whatever you give >>>> it....and its rather confusing trying to explain to the woodchucks that >>>> its wrong. >>> >>> Well, ifconfig reports the net mask that is set. And yes, it's >>> inappropriate for "real" point-to-point interfaces. But it's not the >>> reporting that's wrong, it's the setting. Just set all ones when >>> setting the interface, and you'll be OK. >>> >>> I suppose I should mention that there's a sizeable minority who think >>> this is the way the net mask *should* be. Maybe one of them will >>> explain, I keep forgetting. >> >> I disagree. The route is expicitly set by the command to be a host route, >> but the mask (and I'm talking about the case where no mask is specified >> in the ifconfig) is set to the natural mask (class, that is). > >I'm not sure what you're disagreeing with here. I said that ifconfig >is just reporting the net mask. I believe this to be true. I also >said that ifconfig will set the net mask based on the address class, >not on the type of connection. You seem to be saying the same thing. >What are you disagreeing with? A non-host mask implies that the interface is on a network with that mask, which is not the case with a PTP connection. > >> Even if you specifiy a non-host mask, a host route is set...if that is the >> case then only a host mask should be allowed, and a host mask should >> be forced. You SHOULD be able to override the host setting, that is, if a >> mask is specified explicitly then the route should be set according to the >> netmask. > >Good point. I suppose we could consider it a bug. But, as I say, >some people expect a different net mask. My ISP (Telstra, Australia's >telco, and a reasonably experienced provider) asks me to set a net >mask of 0xffffffc0 for some reason. I wonder why. I notice now that >I look at it that I'm not complying. Your ISP, unfortunately, most likely uses Ciscos, which CANNOT route to hosts. Ciscos can only route to nets, so you must set the PTP interface to a subnet mask. This is a waste of a net and arguably wrong (since there is, in fact, no network), but we live in a world of ciscoheads. With unix you only need use 2 addresses per PTP interface..with ciscos you need to use an entire subnet. Dennis