From owner-freebsd-questions Sat Aug 31 20: 7:16 2002 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 AE89537B400 for ; Sat, 31 Aug 2002 20:07:04 -0700 (PDT) Received: from prima.connect1.ca (prima.connect1.ca [216.138.233.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE69A43E42 for ; Sat, 31 Aug 2002 20:07:03 -0700 (PDT) (envelope-from bsdquestions@connect1.ca) Received: from silver (silver.connect1.ca [192.168.1.7]) by prima.connect1.ca (Postfix) with ESMTP id 534AC64C01; Sat, 31 Aug 2002 23:09:03 -0400 (EDT) From: "BSD" To: "'Matthew Emmerton'" , "'Jorge Mario G.'" , Subject: RE: Problems with IP aliasing Date: Sat, 31 Aug 2002 22:56:32 -0400 Message-ID: <000601c25163$2d5c6fc0$0701a8c0@silver> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <001501c24fd1$be6e1600$1200a8c0@gsicomp.on.ca> Importance: Normal 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 The only time an Alias IP can have a subnet other then a 32 bit mask subnet is when it is the first IP of that new subnet. In your example, you have 192.168.0.2 and you created an alias 192.168.10.1 with a 24 bit subnet mask. That is allowed because it is different subnet then 192.168.0.1. When you try to create the second IP on the same subnet you got the error creating it until you give it the subnet mask of all 255. -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG] On Behalf Of Matthew Emmerton Sent: Thursday, August 29, 2002 11:03 PM To: Jorge Mario G.; freebsd-questions@FreeBSD.ORG Subject: Re: Problems with IP aliasing > HI > I'm trying to create IP aliases of the ip 192.168.0.2 > so i create the alias 192.168.10.1 with no problems > this way: > > ifconfig xl0 inet 192.168.10.1 netmask 255.255.255.0 > alias > [root@gator:/usr]# ifconfig > xl0: > flags=8843 mtu > 1500 > inet 192.168.0.2 netmask 0xffffff00 broadcast > 192.168.0.255 > inet 192.168.10.1 netmask 0xffffff00 broadcast > 192.168.10.255 > ether 00:10:5a:07:da:30 > media: Ethernet autoselect (100baseTX > ) > status: active > > > [root@gator:/usr/ports/mail/squirrelmail]# ping > 192.168.10.1 > PING 192.168.10.1 (192.168.10.1): 56 data bytes > 64 bytes from 192.168.10.1: icmp_seq=0 ttl=64 > time=0.080 ms > 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 > time=0.044 ms > the alias is there and working > > then i tried: > [root@gator:~]# ifconfig xl0 inet 192.168.10.2 netmask > 255.255.255.0 alias > ifconfig: ioctl (SIOCAIFADDR): File exists > [root@gator:~]# > > any ideas why??? > thank ifconfig xl0 inet 192.168.10.2 netmask 255.255.255.255 alias Aliases must be created with a 255.255.255.255 (0xffffffff) netmask. See 'man ifconfig' for details. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message