[ltp] WiFi on T42 (eth1 --> AP connection problems)

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Sun, 16 Jan 2005 17:27:17 -0800 (PST)


Hello,

--- morpheus <morpheus@post.harvard.edu> wrote:

> On Sat, 2005-01-15 at 16:55 -0800, ogjunk-linuxtp@yahoo.com wrote:
> > I think my problem is even more basic. :)
> > That is, if I take down eth0, bring up eth1, ensure the correct
> route,
> > I still can't ping.... can't even ping the router:
> 
> Sorry, I thought you said in a previous post that if you set the IP
> address of eth1 manually, you were able to ping the router.  Are you
> saying that you can't do this:
> # ping -I eth1 192.168.0.1

Yes, I did say I could ping the router... I think I did ping it, but I
can't ping it now.  I went back to that email I sent and I didn't
actually include the output of that ping, so it is possible that I made
a mistake when I said I was pinging the router and I was actually just
pinging myself/WiFi IF (192.168.0.3) when I thought I was pinging the
AP/router (192.168.0.1).

> > # Remove the extra default route (the one that didn't use metric)
> > [root@localhost otis]# route del default
> > [root@localhost otis]# route
> > Kernel IP routing table
> > Destination     Gateway         Genmask         Flags Metric Ref   
> Use
> > Iface
> > 192.168.0.0     *               255.255.255.0   U     0      0     
>   0
> > eth1
> > 192.168.0.0     *               255.255.255.0   U     0      0     
>   0
> > eth0
> > 169.254.0.0     *               255.255.0.0     U     0      0     
>   0
> > eth0
> > default         192.168.0.1     0.0.0.0         UG    1      0     
>   0
> > eth1
> > default         192.168.0.1     0.0.0.0         UG    2      0     
>   0
> > eth0
> 
> Yes, this looks perfect.  You have no problem with the routing table.
> It seems we're back to diagnosing a simple connectivity issue between
> the interface and the access point.

Yes, I'm afraid we are. :(

> > [root@localhost otis]# ping 66.94.234.13 -I eth1
> > PING 66.94.234.13 (66.94.234.13) from 192.168.0.3 eth1: 56(84)
> bytes of
> > data.
> > >From 192.168.0.3 icmp_seq=1 Destination Host Unreachable
> 
> Even more evidence to confirm the above.  However, if you could run:
> # traceroute -i eth1 66.94.234.13
> We can know for sure.

Here it is:

# traceroute 66.94.234.13 -i eth1
traceroute to 66.94.234.13 (66.94.234.13), 30 hops max, 38 byte packets
 1  192.168.0.3 (192.168.0.3)  3000.079 ms !H  3000.138 ms !H  3000.410
ms !H

> > Don't my routing tables look correct now?
> 
> Yes, definitely.
> 
> > > You could use different subnets...but this doesn't seem to be an
> > > option for you since your AP is on the same subnet as your wired
> LAN.
> > 
> > My AP's IP is: 192.168.0.1.  eth0 is 192.168.0.2 and eth1 is
> currently
> > 192.168.0.3.  I could manually set the IP for eth1 to be, say,
> > 192.168.1.3, if that would make things easier.
> 
> You'd also have to change the IP of the AP to the 192.168.1.0 subnet.
> If
> the AP has a built-in router, you can then have it route your packets
> to the 192.168.0.0 subnet.  

I have Netgear MR814, which has a router, but I don't see any options
for manipulating routing in its web-based admin application.  I do see
a way to set its LAN IP, it's IP subnet mask and that's about it for
IP-related stuff.

> However, as your problem now appears to be the
> connection between the AP and the IF, I would hold off on doing this
> since it will probably not solve the problem.

Yes.

> > Well, let me thank you one more for your patience!  I really
> appreciate
> > it.  Would you (or anyone else) happen to have an example of a
> routing
> > table with both eth0 and eth1/wlan0 on the same subnet and going
> out
> > through the single gateway, so that packets go over either eth0 or
> > eth1, depending on whether the computer is plugged into the network
> or
> > is near an AP?
> 
> Your routing table as posted here looks fine.  To summarize, with the
> routing table set as shown above, please provide the following info:
> 1. Results of: # ping -I eth1 192.168.0.1
> 2. Results of: # traceroute -i eth1 192.168.0.1
> 3. Results of: # ifconfig
> 4. Results of: # iwconfig
> 5. Is your AP also your router?  A quick "sketch" of how everything
> is connected would help.

Here it is, starting with the sketch:


 [My T42 with eth0 + eth1(WiFi)]     [AP/Router/DHCP server] <--> WAN
               ^      ^                  ^   ^   ^
               |      |------ eth1 ------|   |   |
               |------------- eth0 ----------|   |
                                                 |
                                                 |
 [Wife's laptop with WiFi] <----------------------

IPs:

 AP/Router/DHCP server: 192.168.0.1
 T42 eth0:              192.168.0.2
 T42 eth1:              192.168.0.3
 Wife's laptop:         192.168.0.4

I configured the AP to always give the same IPs to same Mac addresses. 
The AP does see all 3 interfaces (Wife's WiFi, my eth0 and my eth1) as
'attached devices', so some kind of a connection _is_ established
between eth1 and AP.

Wife's laptop WiFi works (Winblows XP).  My T42 also has Winblows XP on
it, and the WiFi works fine there - so the actual WiFi hardware is OK.

Ping and traceroute (note errors/warnings for both when I use them as a
regular, non-root user):

$ ping 192.168.0.1 -I eth1
Warning: cannot bind to specified iface, falling back: Operation not
permitted
PING 192.168.0.1 (192.168.0.1) from 192.168.0.2 eth1: 56(84) bytes of
data.
>From 192.168.0.3 icmp_seq=1 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=2 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=3 Destination Host Unreachable

--- 192.168.0.1 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time
2999ms
, pipe 4


Note the mention of 'from 192.168.0.2' above.  Weird, no?  .0.2 is
eth0, not eth1!

[otis@localhost ~]$ traceroute 192.168.0.1 -i eth1
setsockopt: Operation not permitted
unable to bind to device: eth1


I'm not sure why I'm getting these errors... but if I ping and
traceroute as root, I don't get them, nor the weird/wrong mention of
.0.2 IP, when I'm trying to go through eth1 (.0.3)):

[root@localhost otis]# ping -I eth1 192.168.0.1
PING 192.168.0.1 (192.168.0.1) from 192.168.0.3 eth1: 56(84) bytes of
data.
>From 192.168.0.3 icmp_seq=1 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=2 Destination Host Unreachable
>From 192.168.0.3 icmp_seq=3 Destination Host Unreachable

--- 192.168.0.1 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time
2998ms
, pipe 4
[root@localhost otis]# traceroute 192.168.0.1 -i eth1
traceroute to 192.168.0.1 (192.168.0.1), 30 hops max, 38 byte packets
 1  192.168.0.3 (192.168.0.3)  3000.183 ms !H  3000.513 ms !H  3000.605
ms !H


Finally, ifconfig and iwconfig outputs:
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:11:25:12:18:EE
          inet addr:192.168.0.2  Bcast:192.168.0.255 
Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:fe12:18ee/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2474 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2420 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1134224 (1.0 MiB)  TX bytes:311783 (304.4 KiB)
          Base address:0x8000 Memory:c0220000-c0240000

eth1      Link encap:Ethernet  HWaddr 00:0C:F1:59:B4:3D
          inet addr:192.168.0.3  Bcast:192.168.0.255 
Mask:255.255.255.0
          inet6 addr: fe80::20c:f1ff:fe59:b43d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:149 dropped:128 overruns:0 frame:0
          TX packets:228 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:9600 (9.3 KiB)
          Interrupt:11 Base address:0x6000 Memory:c0214000-c0214fff

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:1756 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1756 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1880634 (1.7 MiB)  TX bytes:1880634 (1.7 MiB)


# /sbin/iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11b  ESSID:"Wireless" 
Nickname:"localhost.localdomain"
          Mode:Managed  Frequency:2.412GHz  Access Point:
00:09:5B:29:41:3F
          Bit Rate=11Mb/s   Tx-Power:off
          Retry:on   RTS thr:off   Fragment thr:off
          Encryption key:1234-5678-4243-4331-3142-0000-00   Security
mode:open
          Power Management:off
          Link Quality=100/100  Signal level=-36 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:21   Missed beacon:0

sit0      no wireless extensions.


> We're getting closer to the answer...I don't think the issue is with
> the routing table.

Yes, I agree.  This is my first WiFi on a Linux box... :)

Thank you,
Otis