From owner-freebsd-questions Mon Dec 28 04:38:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA27555 for freebsd-questions-outgoing; Mon, 28 Dec 1998 04:38:26 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from hecate.webcom.com (hecate.webcom.com [209.1.28.39]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA27550 for ; Mon, 28 Dec 1998 04:38:25 -0800 (PST) (envelope-from u@webcom.com) Received: from eresh.webcom.com (eresh.webcom.com [209.1.28.49]) by hecate.webcom.com (8.9.1/8.9.1) with SMTP id EAA32729; Mon, 28 Dec 1998 04:38:10 -0800 Received: from [204.143.69.39] by inanna.webcom.com (WebCom SMTP 1.2.1) with SMTP id 25111707; Mon Dec 28 04:35 PST 1998 Message-Id: <36877BE2.4E60@webcom.com> Date: Mon, 28 Dec 1998 07:38:58 -0500 From: Graeme Tait Organization: Echidna X-Mailer: Mozilla 2.02 (Win95; I) Mime-Version: 1.0 To: Matthias Meyser Cc: Peter Philipp , rayseals@midwestis.com, freebsd-questions@FreeBSD.ORG Subject: Re: ifconfig/aliases question References: <004001be3223$209173c0$0f01000a@rseals.midwestis.com> <19981228121421.A15304@xenetserver.harz.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG There is no need to add routes by hand if you follow the directions at http://www.cypher.net/~black/ipalias.html (which is listed on http://www.freebsd.org/tutorials/). Basically, the original answer immediately below is correct. Matthias Meyser wrote: > > Hi > > On Mon, Dec 28, 1998 at 03:14:03AM -0500, Peter Philipp wrote: > > try a 255.255.255.255 netmask with the alias, otherwise make sure you have > > no firewall rules enabled (they are sometimes more a nuisance than good). > > hope that helps, > > > > Peter Philipp (PP2441) > > Daemonic Networks > > "In theory, theory is the same as practice, but not in practice" - ??? > > > > On Sun, 27 Dec 1998, Ray Seals wrote: > > > > > I have a FreeBSD server with the following IP addresses: > > > > > > 10.0.1.111 > > > 10.0.1.112 > > > > > > This is accomplished with the following commands and were they are located: > > > ifconfig_fxp0="inet 10.0.1.111 netmask 255.255.255.0" <- sysconfig > > > defaultrouter="10.0.1.1" <- sysconfig > > > > > > ifconfig fxp0 inet 10.0.1.112 netmask 255.255.255.0 alias <- rc.local > > > > > > I can ping both addresses. I run apache which services both IP addresses. > > > > > > >From the server itself I can ping the 10.0.1.111 address. I cannot ping the > > > 10.0.1.112 address from the server. > > > > > > The ping returns the following info: > > > > > > PING 10.0.1.112 (10.0.1.112): 56 data bytes > > > ping: sendto: Host is down > > > ping: wrote 10.0.1.112 64 chars, ret=-1 > > > > > > Why can't I ping the aliased address from the server? > > Every lokal IP should be routet via lo0 (loopback) > > just do an "route add 127.0.0.1 10.0.1.112" on your server. > this is done automaticly for the first ip but not for any alias IP. > > here are some lines out of my rc.conf (FreeBSD 2.2.7) > > set up the primary IP Adresses > > -----------8<--------------------------------------- > network_interfaces="vx0 lo0" # List of network interfaces (lo0 is loopback). > ifconfig_vx0="inet 193.159.181.123 netmask 255.255.255.128" > ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. > -----------8<--------------------------------------- > > set up as many aliases as you need > > -----------8<--------------------------------------- > ifconfig_vx0_alias0="inet 193.159.181.108 netmask 255.255.255.128" > ifconfig_vx0_alias1="inet 193.159.181.107 netmask 255.255.255.128" > -----------8<--------------------------------------- > > later on set up routes you need > be careful not to use a "." in routenames. > > -----------8<--------------------------------------- > defaultrouter="193.159.181.126" # Set to default gateway (or NO). > static_routes="mail2_harz_de ns2_harz_de" # Set to static route list (or leave empty). > route_mail2_harz_de="193.159.181.107 127.0.0.1" > route_ns2_harz_de="193.159.181.108 127.0.0.1" > -----------8<--------------------------------------- > > Hope it helps > matthias > -- > \\ // N N EEE TTT Matthias Meyser, Meyser@harz.de > \\ // eee NN N E T Gesellschaft fuer Informations- und > \X/ e e N N N EE T Kommunikationssysteme mbH > // \\ e ee N NN E T 38678 Clausthal-Zellerfeld, Burgstaetter Strasse 6 > // \\ eeee N N EEE T Telefon: +49-5323-94018 Fax: +49-5323-94011 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message -- Graeme Tait - Echidna To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message