[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Two IP addresses but one listed by ifconfig



Sanity check question:


I have a machine that is responding to Arp requests and accepting
connections on an interface that's been brought down.  Should that
happen?

I've got a laptop sitting here connected to the wired LAN and assigned
192.168.1.4 by dhpcd on boot (auto eth0).

But, I also have a wireless card that is assigned 192.168.1.3 by dhcpd
(fixed IP address by MAC address).

When the pcmcia_cs scripts run they bring down eth0 and bring up the
wireless interface.  In my /etc/pcmcia/network.opts script I have:

    start_fn () {
        log /sbin/ifdown eth0
        log /sbin/ifup $1
    }

Normally, if I look at my arp table on another machine right after
plugging in the wireless card I can see both MAC addresses (assuming
I've connected to each of those IP addresses).

Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.4              ether   00:10:A4:91:92:FF   C                     eth0
192.168.1.3              ether   00:E0:29:9E:80:5E   C                     eth0

:FF is the eth0 interface MAC, and :5E is the wireless MAC.

The odd thing is if I have the wireless card in on boot I get:

Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.4              ether   00:E0:29:9E:80:5E   C                     eth0
192.168.1.3              ether   00:E0:29:9E:80:5E   C                     eth0

and thus I can ssh into that machine on either IP addresses, but ifconfig
only shows that eth1 (192.168.1.3 is up).

So, the laptop is responding to a ARP "Who has 192.168.1.4" with the MAC for
the wireless card which was brought up at eth1 with dhcp and assigned
192.168.1.3, and is also accepting connections to 192.168.1.4 even
though it's not configured.  That doesn't seem right, does it?


moseley@bumby:~$ ssh 192.168.1.4
Password: 
Linux laptop 2.6.5-1-686 #1 Wed Apr 7 00:24:54 EST 2004 i686 GNU/Linux

Last login: Sun Apr 18 23:23:34 2004 from bumby

moseley@laptop:~$ /sbin/ifconfig
eth1      Link encap:Ethernet  HWaddr 00:E0:29:9E:80:5E  
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2e0:29ff:fe9e:805e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:228 errors:0 dropped:0 overruns:0 frame:0
          TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:24575 (23.9 KiB)  TX bytes:31278 (30.5 KiB)
          Interrupt:3 Base address:0x100 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:257 errors:0 dropped:0 overruns:0 frame:0
          TX packets:257 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:22720 (22.1 KiB)  TX bytes:22720 (22.1 KiB)




-- 
Bill Moseley
moseley@hank.org



Reply to: