Author Topic: Routing question  (Read 3390 times)

tsuribaka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Routing question
« on: November 15, 2004, 04:57:41 pm »
I want my Zaurus (OpenZaurus, latest version) to have access to the Internet using the following setup:

My Zaurus is connected via USB to a laptop, which is in turn connected to a PC acting as a gateway to the Internet. I can ping the Zaurus from the gateway PC, and vice versa. However, I can't do "route add default gw the_pc" - I get a "no route to host" error.

Details:

Zaurus: 192.168.129.201

Laptop: 192.168.129.1 (usb) and 192.168.1.3

Gateway PC: 192.168.1.2 + connected to isp modem

route -n on the Zaurus gives:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.2     192.168.129.1   255.255.255.255 UGH   0      0        0 usbd0
192.168.129.0   0.0.0.0         255.255.255.0   U     0      0        0 usbd0

while route add default gw 192.168.1.2 results in :

route: SIOC[ADD|DEL]RT: Network is unreachable


/proc/sys/net/ipv4/ip_forward on the laptop is set to 1.


Please not that I did get this to work once, however I can't recreate it - I don't remember the exact commands I issued on the Zaurus.

I would appreciate any help!

orac

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • http://
Routing question
« Reply #1 on: November 15, 2004, 07:17:03 pm »
What OS are you running under? I did this once under Windows 2000, but do it regularly under XP. I'd have to dig up the info for under Windows 2000, but in XP all you do is bridge your USB and network connections together and then run the dhcpcd client on your Z like so:
dhcpcd usbd0
That will request a dhcp addy from the same net as your ethernet or whatever. If you're only allowed one drop, you can use the seldom stable "internet connection sharing". I'll write more on this later, but I could swear I wrote about this setup last year. I'll try to find it.
« Last Edit: November 15, 2004, 07:17:28 pm by orac »

freizugheit

  • Sr. Member
  • ****
  • Posts: 409
    • View Profile
    • http://
Routing question
« Reply #2 on: November 15, 2004, 10:20:52 pm »
Your first route is via laptop and the command should be:

route add default gw 192.168.129.1

tsuribaka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Routing question
« Reply #3 on: November 16, 2004, 04:22:45 pm »
Thank you both!

I did use the wrong ip for the gateway, I understand better how it works now (and it does work).