From owner-freebsd-questions Tue Feb 8 2:13:33 2000 Delivered-To: freebsd-questions@freebsd.org Received: from merlin.onsea.com (p40s11a01.client.global.net.uk [195.147.139.65]) by builder.freebsd.org (Postfix) with ESMTP id 111464168 for ; Tue, 8 Feb 2000 02:13:25 -0800 (PST) Received: from localhost (dozprompt@localhost) by merlin.onsea.com (8.9.3/8.9.2) with ESMTP id KAA00612; Tue, 8 Feb 2000 10:14:14 GMT (envelope-from dozprompt@onsea.com) X-Authentication-Warning: merlin.onsea.com: dozprompt owned process doing -bs Date: Tue, 8 Feb 2000 10:14:14 +0000 (GMT) From: Cliff Rowley To: Brian Free Cc: "'freebsd-questions@freebsd.org'" Subject: Re: Second IP Address on Single NIC In-Reply-To: <8FEAC4F0CAC9D111A88B006008A993C18ADDF3@slc1mail1.sonici.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi there :) You need to: (a) use netmask 0xffffffff (b) place entries in rc.conf for your aliases. rc.conf already has functionality for you to do this. For example, here is a segment of my rc.conf: # primary address ifconfig_xl0="inet 10.0.0.2 netmask 0xffffff00" # aliases ifconfig_xl0_alias0="inet 10.0.0.10 netmask 0xffffffff" ifconfig_xl0_alias1="inet 10.0.0.11 netmask 0xffffffff" ifconfig_xl0_alias2="inet 10.0.0.12 netmask 0xffffffff" Hope I helped some ;) Cliff Rowley - while (!asleep) { code(); } On Mon, 7 Feb 2000, Brian Free wrote: > I am trying to assign multiple IP addresses to a single NIC for virtual > hosting on a FreeBSD 3.3 server. > Here is the current output of ifconfig: > bash-2.03# ifconfig ep0 > ep0: flags=8843 mtu 1500 > inet 10.0.0.2 netmask 0xffffffe0 broadcast 10.0.0.1 > ether 00:a0:27:06:ef:fe > > The command I am trying to use is: > ifconfig ep0 alias 10.0.0.3 netmask 255.255.255.224 up > I have also tried entering the info into rc.conf, but after rebooting, the > only address that worked was the second one. > > The command returns: > ifconfig: ioctl (SIOCAIFADDR): File exists > Which I believe means that the interface already has an address, and not a > problem. > > After executing the command, ifconfig ep0 shows: > bash-2.03# ifconfig ep0 > ep0: flags=8843 mtu 1500 > inet 10.0.0.2 netmask 0xffffffe0 broadcast 10.0.0.1 > inet 10.0.0.3 netmask 0xffffffe0 broadcast 10.0.0.1 > ether 00:a0:27:06:ef:fe > > So I assume it has take the second address, however it will not reply to a > ping to the second address. > Any thoughts or suggestions would be appreciated. > > Brian Free > IT Manager > SONIC innovations > Email: bfree@sonici.com > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message