From owner-freebsd-net Mon Feb 26 22:16:28 2001 Delivered-To: freebsd-net@freebsd.org Received: from hera.drwilco.net (10dyn61.dh.casema.net [212.64.31.61]) by hub.freebsd.org (Postfix) with ESMTP id 22D9437B444 for ; Mon, 26 Feb 2001 22:16:24 -0800 (PST) (envelope-from drwilco@drwilco.nl) Received: from ceres.drwilco.nl (ceres.drwilco.net [10.1.1.19]) by hera.drwilco.net (8.11.2/8.11.1) with ESMTP id f1R6doo17525; Tue, 27 Feb 2001 07:39:52 +0100 (CET) (envelope-from drwilco@drwilco.nl) Message-Id: <4.3.2.7.0.20010227070424.00d25c10@mail.bsdchicks.com> X-Sender: lists@mail.bsdchicks.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 27 Feb 2001 07:16:14 +0100 To: "Matthew Emmerton" , "Jonathan Graehl" , From: "Rogier R. Mulhuijzen" Subject: Re: Quick question about IP aliasing In-Reply-To: <001501c0a070$3a14d900$1200a8c0@gsicomp.on.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At 22:49 26-2-01 -0500, Matthew Emmerton wrote: > > > do 'netmask 255.255.255.255' instead or 'netmask 0xffffffff' since this >is > > > an alias... for some reason otherwise services may not bind to the ip > > > correctly > > > > Why would this be? The two are numerically equivalent. He's saying 'instead or' not 'instead of', I nearly fell for this too. >Yes, but you're missing the point. > >The point is that you need to use a netmask of 255.255.255.255 for aliased >IPs on FreeBSD, regardless of the alias of the primary (non-alias) IP. Everybody is saying use 255.255.255.255 for an alias. Noone is giving reasons why. Aliassing is the only way to bind more than one IP to an interface (well only simple way..) and aliasses are no different from the primary IP. If you couldn't use the right subnetmask for an alias outside the main IP's subnet, the FreeBSD machine wouldn't be able to fully participate in that subnet's traffic. (It couldn't receive subnet broadcasts for one) The only reason to use 255.255.255.255 is when the IPs are in the same subnet, or you'll get routing and broadcast problems. If you use 10.1.1.1:255.255.255.0 and the 2nd IP is 10.1.1.2 you need to use 255.255.255.255 for the 2nd IP If you use 10.1.1.1:255.255.255.0 and the 2nd IP is 10.2.2.2 you can use 255.255.255.0 for the 2nd IP (if that is the subnetmask for that network) If you use 10.1.1.1:255.0.0.0 and the 2nd IP is 10.2.2.2 you need to use 255.255.255.255 again (same subnet) If you use 10.1.1.1:255.255.255.0 and 10.2.2.2:255.255.255.0, and the 3rd IP is 10.2.2.4 you use 255.255.255.255 only for the 3rd IP. DocWilco P.S.: If this is not the case with FreeBSD, we've got major problems. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message