Author Topic: Almost Have Full Usb Networking With 5500  (Read 4311 times)

bboyken

  • Newbie
  • *
  • Posts: 5
    • View Profile
Almost Have Full Usb Networking With 5500
« on: August 01, 2005, 10:33:22 am »
I am running Gentoo Linux on my laptop.
I have an SL-5500 sitting in the cradle.
I have usbnet working and I can ping from the SL-5500 to my laptop. I can also ping from my laptop to the SL-5500.
I am able to ssh from my laptop into the SL-5500.

Here is the network setup on my laptop as it relates to usb0:
My ifconfig line in /etc/conf.d/net looks like this: ifconfig_usb0=("192.168.129.1 broadcast 192.168.129.255 netmask 255.255.255.0 pointopoint 192.168.129.201")

FWIW, I have tried it both with and without the "pointopoint" directive and my results are the same.

Here is the network setup on the SL-5500:
- ip address: 192.168.129.201
- subnet mask: 255.255.255.0
- gateway: blank
- DNS (both blank)

From the Zaurus, I have no visibility of the internet.  If I ssh into the Zaurus from my laptop and attempt a wget to my web site:

wget http://www.boyken.org
wget: www.boyken.org: Host name lookup failure

If I attempt the same thing via ip address, I get this:

wget http://69.72.158.138
Connecting to 69.72.158.138[69.72.158.138]:80
wget: Unable to connect to remote host (69.72.158.138): Network is unreachable

I feel like I am really, really close to getting this set up properly.  Any help would be greatly appreciated!

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Almost Have Full Usb Networking With 5500
« Reply #1 on: August 01, 2005, 12:58:51 pm »
You need to set up a/some route(s) on the laptop.

There are some posts about this scattered around on the forum,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
Almost Have Full Usb Networking With 5500
« Reply #2 on: August 01, 2005, 10:39:07 pm »
Quote
You need to set up a/some route(s) on the laptop.

There are some posts about this scattered around on the forum,


Si
[div align=\"right\"][a href=\"index.php?act=findpost&pid=90395\"][{POST_SNAPBACK}][/a][/div]

From Zauraus and using su mode:

route add default gw 192.168.129.1
route add -host  192.168.129.1 usbd0

Next, add the following in /etc/resolv.conf

nameserver ISPnameserverIP

I hope the above will help.

bboyken

  • Newbie
  • *
  • Posts: 5
    • View Profile
Almost Have Full Usb Networking With 5500
« Reply #3 on: August 02, 2005, 04:17:16 pm »
Quote
From Zauraus and using su mode:

route add default gw 192.168.129.1
route add -host  192.168.129.1 usbd0

Next, add the following in /etc/resolv.conf

nameserver ISPnameserverIP

I hope the above will help.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
Just in case I had perhaps messed things up, I went back and flashed the ROM again from the OpenZaurus site.  I then followed [a href=\"http://openzaurus.org/wordpress/howto/usb-networking/]these instructions[/url] to get basic USB networking up and running.

Once I had confirmed that I was able to ping both ways (to and from Zarus and laptop), I executed the suggested "route" commands on my Zaurus and added the nameserver line to /etc/resolv.conf.

I'm still having serious connectivity issues from the Zaurus through my laptop.  I can get to my laptop, but not through it. Let me explain.

The ip my Zaurus is set to is 192.168.129.201.  I am able to ping from my laptop to this ip address with no problems.
The usb0 ip adddress on my laptop is 192.168.129.1.  I am able to ping from the Zaurus to this ip address with no problem.
The eth0 ip address on my laptop is 172.16.105.182.  I am able to ping from the Zaurus to this ip address with no problem.
The gateway from my network has an ip address of 172.16.105.1.  I am unable to ping this ip address from my Zaurus.  Similarly, I am unable to ping any of our nameservers by ip address.

What am I missing?  What am I doing wrong?

Pyrates

  • Full Member
  • ***
  • Posts: 198
    • View Profile
    • http://www.pipsfrank.de
Almost Have Full Usb Networking With 5500
« Reply #4 on: August 02, 2005, 05:31:35 pm »
You need to configure your PC for masquerading:

iptables -A POSTROUTING -t nat -o usb0 -j MASQUERADE
iptables -A POSTROUTING -t nat -o eth0 -j SNAT --to-source 192.168.0.2
echo "1" >/proc/sys/net/ipv4/ip_forward

Cheers
Philipp
\" ... and the Vogon will do things to you that you wish you\'d never been born, or, if you\'re a clearer minded thinker, that the Vogon had never been born.\"

berkenb

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • http://
Almost Have Full Usb Networking With 5500
« Reply #5 on: August 02, 2005, 05:37:26 pm »
Quote
Quote
From Zauraus and using su mode:

route add default gw 192.168.129.1
route add -host  192.168.129.1 usbd0

Next, add the following in /etc/resolv.conf

nameserver ISPnameserverIP

I hope the above will help.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
Just in case I had perhaps messed things up, I went back and flashed the ROM again from the OpenZaurus site.  I then followed [a href=\"http://openzaurus.org/wordpress/howto/usb-networking/]these instructions[/url] to get basic USB networking up and running.

Once I had confirmed that I was able to ping both ways (to and from Zarus and laptop), I executed the suggested "route" commands on my Zaurus and added the nameserver line to /etc/resolv.conf.

I'm still having serious connectivity issues from the Zaurus through my laptop.  I can get to my laptop, but not through it. Let me explain.

The ip my Zaurus is set to is 192.168.129.201.  I am able to ping from my laptop to this ip address with no problems.
The usb0 ip adddress on my laptop is 192.168.129.1.  I am able to ping from the Zaurus to this ip address with no problem.
The eth0 ip address on my laptop is 172.16.105.182.  I am able to ping from the Zaurus to this ip address with no problem.
The gateway from my network has an ip address of 172.16.105.1.  I am unable to ping this ip address from my Zaurus.  Similarly, I am unable to ping any of our nameservers by ip address.

What am I missing?  What am I doing wrong?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=90541\"][{POST_SNAPBACK}][/a][/div]

It sounds like you are doing it right. The problem is not so much on your Zaurus' side but on your laptop's side instead. Your laptop has to be setup to do IP forwarding for your Zaurus: right now your laptop is connected to the internet as a client, but it is probably not set up to act as a gateway for your Zaurus.
You can use iptables on your laptop for that. I can never quite remember how it is done in detail, but look at the HOWTO's on your laptop (should be in something like /usr/share/doc/HOWTO or somewhere around there): the ones that have "masquerading" (IPMasquerade and Simple-Masquerade?) will explain the issue in more detail and show how to set it up...
Hope this helps...