Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Jan 1998 17:14:29 -0600
From:      Edwin Culp <eculp@ver1.telmex.net.mx>
To:        Karl Pielorz <kpielorz@tdx.co.uk>
Cc:        isp@FreeBSD.ORG
Subject:   Re: Ifconfig & 2nd IP address - weird...
Message-ID:  <34B16955.64BF3B38@ver1.telmex.net.mx>
References:  <34B13CDA.AF845AFD@tdx.co.uk>

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

TRY ifconfig de0 192.168.100.2 netmask 255.255.255.255 alias

provecho

ed

> 
> "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...
> 
> I've checked the arp table - which shows the ARP for 192.168.100.2 as being
> 'incomplete', but even if I manually edit the arp table and put the right
> ethernet address in there - the machine can't ping itself on the 2ndry IP
> address...
> 
> I'm running ipfw but with 'add allow all from any to any' as the only rule,
> and I'm also running 'gateway_enable="YES"' in my rc.conf...
> 
> netstat -r shows:-
> 
> 192.168.100.1      0:0:c0:eb:a3:b     UHLW        1     1008       lo0
> 192.168.100.2      link#2             UHLW        0        2
> 
> If I'm really unlucky (i.e. after a while) I get:
> 
> (root) caladan>ping 192.168.100.2
> PING 192.168.100.2 (192.168.100.2): 56 data bytes
> ping: sendto: Host is down
> ping: wrote 192.168.100.2 64 chars, ret=-1
> ping: sendto: Host is down
> ping: wrote 192.168.100.2 64 chars, ret=-1
> ping: sendto: Host is down
> ping: wrote 192.168.100.2 64 chars, ret=-1
> 
> Though other external machines continue to ping it fine... :-( (Traceroute
> displays the same info - host is down).
> 
> The system's running 2.2.2-RELEASE... - and also has 1 other interface, "fxp0"
> - which works fine - and only has 1 IP address bound to it...
> 
> Any suggestions? (I'm sure this is something simple & silly ;-)
> 
> Regards,
> 
> Karl Pielorz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34B16955.64BF3B38>