From owner-freebsd-questions Fri Feb 21 14: 5: 0 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CED4337B401 for ; Fri, 21 Feb 2003 14:04:57 -0800 (PST) Received: from asarian-host.net (mail.asarian-host.net [194.109.160.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65E2643FA3 for ; Fri, 21 Feb 2003 14:04:56 -0800 (PST) (envelope-from admin@asarian-host.net) Comments: To protect the identity of the sender, certain header fields are either not shown, or masked. Anonymous email addresses for asarians can be requested by filling in the appropriate form at: https://asarian-host.net/cgi-bin/signup.cgi Received: (from root@localhost) by mail.asarian-host.net (8.12.6/8.12.6) id h1LM4sv2011255 for freebsd-questions@freebsd.org; Fri, 21 Feb 2003 23:04:54 +0100 (CET) (envelope-from admin@asarian-host.net) From: Mark Message-Id: <200302212204.H1LM4SWZ011245@asarian-host.net> Date: Fri, 21 Feb 2003 22:04:54 GMT X-Authenticated-Sender: admin@asarian-host.net Subject: Re: Netmasks for aliases (was Re: Bizarre Networking Problem) X-Trace: 23/OT1mKWYyzxIPgCJTijXyfBfXnuQVzU2uZB4CLSDt+zPgDTQz18SvLquyyOpIx+C+LTyEk6giLGItfHfCh4g== X-Complaints-To: abuse@asarian-host.net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we are unable to process your complaint Organization: Asarian-host To: "Willie Viljoen" Cc: References: <27.39e39215.2b869c70@aol.com> <20030221105259.Y87091@pcjfn.msc.com> <200302211717.H1LHHH4X003458@asarian-host.net> <200302212023.19708.will@unfoldings.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Auth: Asarian-host PGP signature iQEVAwUAPlaihjFqW1BleBN9AQFgkQf8CnwsJJoddYbeuN4jgyaDDX8DQ62R6+wl O9S1/Tlw9rnP8ESJfZ3L4iEe5OUFYgwRrU/LgGW1Ve1M0bRpLulo46kKlE8tfLmK TbeQHTRvEH4Xul2yyVwE0YW2kiBgqojR/2i3TA3a/a9Ix5DwETBC1PNCq/rX/qtW R8ThDjLsWIOVR8swvTxvyFn3rHjkBUU1oi7KxcL7jE87rgQ7R4K879Xpz9lRekWH lZq8XvJu0TYhyARa+8G6UdR6brkPQwS5jfLdo1j/5mViM68MDiCCZycj2kK/JbnH E7o70R5BbQP7mz/HpiSZ/c8EIhIoYjp97SNoB6yGtJ7B343k0Py4ag== =1yMO Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----- Original Message ----- From: "Willie Viljoen" To: "Mark" Cc: Sent: Friday, February 21, 2003 7:24 PM Subject: Netmasks for aliases (was Re: Bizarre Networking Problem) > On Friday 21 February 2003 19:17, Mark wrote: > > > > /sbin/ifconfig xl0 192.246.38.10 netmask 255.255.255.0 > > > /sbin/ifconfig xl0 alias 208.23.240.10 netmask 255.255.255.0 > > > > Hmm, I thought aliases always needed to have netmask of 255.255.255.255. > > Has something changed? > > > > - Mark > > Mark, > > Aliases on the same subnet should always be 255.255.255.255, this does not > apply where they are on different subnets, however. Here is a good > example, from the ifconfig output of a mail server I set up at an ISP in a > nearby town. They used to use a private range, but have since added a > public class C which has been broken up into smaller ranges for routing. > > The mail server, for legacy reasons, still has to serve people on the old > IPs because those are still being used by machines in their office, and > reconfiguring every office machine with new server IP addresses (they > didn't have internal DNS then) would be wasting time. We didn't want to > waste public IPs on beancounters, so we just left their machines as is. > > The host is also serving on the new IP, and acting as a POP server for > several virtual domains, which have aliases. The 10.0.1.0/24 range (their > office), and the 196.38.113.0/27 range (used for their server farm + > virtual domains) are still the same physical network though. The output > from ifconfig follows: > > %ifconfig > dc0: flags=8843 mtu 1500 > inet 196.38.113.2 netmask 0xffffffe0 broadcast 196.38.113.31 > inet6 fe80::a00:8ff:fe00:800%dc0 prefixlen 64 scopeid 0x1 > inet 196.38.113.3 netmask 0xffffffff broadcast 196.38.113.3 > inet 196.38.113.5 netmask 0xffffffff broadcast 196.38.113.5 > inet 196.38.113.6 netmask 0xffffffff broadcast 196.38.113.6 > inet 196.38.113.7 netmask 0xffffffff broadcast 196.38.113.7 > inet 196.38.113.8 netmask 0xffffffff broadcast 196.38.113.8 > inet 196.38.113.9 netmask 0xffffffff broadcast 196.38.113.9 > inet 196.38.113.10 netmask 0xffffffff broadcast 196.38.113.10 > inet 196.38.113.11 netmask 0xffffffff broadcast 196.38.113.11 > inet 10.0.1.4 netmask 0xffffff00 broadcast 10.0.1.255 > inet 10.0.1.5 netmask 0xffffffff broadcast 10.0.1.5 > ether 08:00:08:00:08:00 > media: Ethernet autoselect (100baseTX ) > status: active > lo0: flags=8049 mtu 16384 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 > inet 127.0.0.1 netmask 0xff000000 > > Note how 196.38.113.2 (the machine's real address) has a netmask of > 0xffffffe0, or 255.255.255.224, and the other addresses in this range (all > of them aliases) have 0xffffffff, 255.255.255.255. Then look at 10.0.1.4, > which is an alias too. It has a netmask of 0xffffff00, or 255.255.255.0. > Now look at 10.0.1.5, an alias used for serving intranet web content to > legacy machines. Again, a netmask of 0xffffffff. > > The reason for this is that 10.0.1.4, even though being an alias, is the > first address the machine handles on that subnet. Just as 196.38.113.2 is > the first address the machine has on the public subnet. > > Rule of thumb: First address on a subnet, alias or not, has the proper > subnet netmask. Every other address on the subnet following that, has > 0xffffffff, or 255.255.255.255. > > Will Thanks for clarifying this, Will. :) That was a very lucid and helpful explanation. - Mark To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message