Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 1998 17:59:25 -0400
From:      =?iso-8859-1?Q?=22Luis_E=2E_Mu=F1oz=22?= <lem@cantv.net>
To:        Karl Pielorz <kpielorz@tdx.co.uk>
Cc:        isp@freebsd.org
Subject:   Re: Ifconfig & 2nd IP address - weird...
Message-ID:  <3.0.5.32.19980105175925.0085e9a0@pop.cantv.net>
In-Reply-To: <34B13CDA.AF845AFD@tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
At 08:04 PM 05/01/1998 +0000, Karl Pielorz wrote:
>Hi All,
>
>If I do the following on my BSD box (to serve as a secondary IP for a virtual
>web-server):-
>
>ifconfig de0 192.168.100.2 alias
>
>"ifconfig -a" then shows:-
>
>de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>        inet 192.168.100.1 netmask 0xffffffe0 broadcast 192.168.100.31
>        inet 192.168.100.2 netmask 0xffffffe0 broadcast 192.168.100.31
>        ether 00:00:c0:eb:a3:0b
>lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>        inet 127.0.0.1 netmask 0xff000000
>etc...
>
>(netmask should be 255.255.255.224 - which the above seems to be - this puts
>me on a net of 30 hosts...)
>
>I can ping the .2 address fine from other machines, but I can't ping that
>address from the machine itself...

You need to add a route to the new 'virtual' address via the loopback
address. Something like

	$ route add 192.168.100.2 127.0.0.1

will probably work.

-lem






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.19980105175925.0085e9a0>