From owner-freebsd-questions@FreeBSD.ORG Mon Jan 26 08:38:34 2004 Return-Path: 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 9391B16A4CE for ; Mon, 26 Jan 2004 08:38:34 -0800 (PST) Received: from smtp809.mail.sc5.yahoo.com (smtp809.mail.sc5.yahoo.com [66.163.168.188]) by mx1.FreeBSD.org (Postfix) with SMTP id E5ED443D5A for ; Mon, 26 Jan 2004 08:38:17 -0800 (PST) (envelope-from addymin@pacbell.net) Received: from unknown (HELO pacbell.net) (m?chinn@pacbell.net@63.201.230.250 with plain) by smtp809.mail.sc5.yahoo.com with SMTP; 26 Jan 2004 16:38:17 -0000 Message-ID: <401542F2.8000309@pacbell.net> Date: Mon, 26 Jan 2004 08:40:18 -0800 From: Mike User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Configuring IP address aliasing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: addymin@pacbell.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 16:38:34 -0000 Greetings, I have 2 Redhat-9 servers that I'd like to migrate to FreeBSD in the next 3 months. So I've set-up a test server (FreeBSD-4.9 STABLE) and I'm in the midst of loading 3rd party applications (via ports) to test their operation compared to the RH-9 servers. I have a question about the configuration of IP aliases, so here is some background information. Here is the real interface (192.168.1.40): # ifconfig -a ed0: flags=8843 mtu 1500 inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:80:ad:91:9a:bd lp0: flags=8810 mtu 1500 ppp0: flags=8010 mtu 1500 sl0: flags=c010 mtu 552 faith0: flags=8002 mtu 1500 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 Now I try to add the alias (192.168.1.41): # ifconfig ed0 alias 192.168.1.41 netmask 255.255.255.0 broadcast 192.168.1.255 ifconfig: ioctl (SIOCAIFADDR): File exists [using same netmask as real interface] However, THIS WORKED: # ifconfig ed0 alias 192.168.1.41 netmask 255.255.255.255 broadcast 192.168.1.255 [using a netmask of 255.255.255.255] And here is the ifconfig that shows the alias in place: # ifconfig -a ed0: flags=8843 mtu 1500 inet 192.168.1.40 netmask 0xffffff00 broadcast 192.168.1.255 inet 192.168.1.41 netmask 0xffffffff broadcast 192.168.1.255 ether 00:80:ad:91:9a:bd lp0: flags=8810 mtu 1500 ppp0: flags=8010 mtu 1500 sl0: flags=c010 mtu 552 faith0: flags=8002 mtu 1500 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 QUESTION: Why do I use a different netmask (255.255.255.255) for a IP alias on FreeBSD? Why isn't 255.255.255.0 used? When I set-up IP aliases using Linux, I use the same netmask (255.255.255.0) as the real IP. The IP aliasing of my BSD server works but WHY is it working? I found the reference to using the 255.255.255.255 netmask via Google, however, I have Michael Lucas's book "Absolute BSD" and reference on pages 103 & 104 (on IP aliasing) clearly show using the same netmask as the real interface when creating IP aliases. What am I missing? Thanks, Michael