Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Dec 1998 07:38:58 -0500
From:      Graeme Tait <U@webcom.com>
To:        Matthias Meyser <Matthias.Meyser@harz.de>
Cc:        Peter Philipp <pjp@bsd-daemon.net>, rayseals@midwestis.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: ifconfig/aliases question
Message-ID:  <36877BE2.4E60@webcom.com>
References:  <004001be3223$209173c0$0f01000a@rseals.midwestis.com> <Pine.BSF.4.01.9812280312590.5722-100000@bsd-daemon.net> <19981228121421.A15304@xenetserver.harz.de>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36877BE2.4E60>