From owner-freebsd-java@FreeBSD.ORG Wed Mar 3 08:36:05 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97F7B16A4CE for ; Wed, 3 Mar 2004 08:36:05 -0800 (PST) Received: from alogis.com (firewall.solit-ag.de [212.184.102.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E8BA43D39 for ; Wed, 3 Mar 2004 08:36:04 -0800 (PST) (envelope-from Holger.Kipp@alogis.com) Received: from intserv.int1.b.intern (localhost [127.0.0.1]) by alogis.com (8.11.1/8.9.3) with SMTP id i23GZub30704; Wed, 3 Mar 2004 17:35:56 +0100 (CET) (envelope-from hk@alogis.com) Message-Id: <200403031635.i23GZub30704@alogis.com> Date: Wed, 03 Mar 2004 16:35:51 +0000 From: Holger Kipp To: p500.2004@openstandards.net X-Mailer: phpGroupWare (http://www.phpgroupware.org) MIME-version: 1.0 Content-type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-description: Mail message body cc: freebsd-net@freedbsd.org cc: freebsd-java@freebsd.org Subject: Re: Multiple static IPs X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Holger.Kipp@alogis.com List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 16:36:05 -0000 Erik Sliman (p500.2004@openstandards.net) wrote: >How do you give a computer multiple static IPs? > >I've tried many things, including the ifaliases setting in rc.conf: > >ifconfig_vr0="inet 192.168.1.3 netmask 255.255.255.0" >ifaliases_vr0="192.168.1.36 255.255.255.0" > >but none seem to work. a) See /etc/defaults/rc.conf b) Try "man ifconfig" -> alias c) Use netmask of 255.255.255.255 For your example, try something like ifconfig_vr0="inet 192.168.1.3 netmask 255.255.255.0" ifconfig_vr0_alias0="inet 192.168.1.36 255.255.255.255" d) To understand how this works, look at rc.network. The corresponding entry is eval ifconfig_args=\$ifconfig_${ifn}_alias${alias} if [ -n "${ifconfig_args}" ]; then ifconfig ${ifn} ${ifconfig_args} alias eval showstat_$ifn=1 alias=$((${alias} + 1)) else break; fi And I think this is a faq anyway ;-) Regards, Holger