How to create a route to a usb0 interface?
I have a zaurus 5600 connected to one of the machines on my LAN. I can access it with that machine but cannot access it from the other machines in my network.
My network is 192.168.0.0/24. My zaurus's IP is 192.168.129.201. It is connected to the machine with IP of 192.168.0.2 hostname mymythtv. I have a gateway to the internet at 192.168.0.1 hostname mylivingroom. mymythtv can ping and connect to the zaurus,but no other machine in the network can. The zaurus can access all the other machines and the internet. I thought it was a simple matter of adding a route on each of the other machines to point to mymythtv: route add -host 192.168.129.201 gw 192.168.0.2 <interface> but this does not work. route add -net 192.168.129.0 netmask 255.255.255.0 gw 192.168.0.2 <interface> does not work as well. Any help is appreciated. |
Hi.
You'll have to enable IP forwarding: Code:
echo "1" > /proc/sys/net/ipv4/ip_forward |
Yes, I have that enabled already. But still no go.
I am tempted to connect the zaurus cradle to 192.168.0.1 which is the default gw for the lan. Hopefully it will know where to send the packets for the zaurus. However, it should be possible with 192.168.0.2 as well. Here is my route info from mymythtv (192.168.0.2) Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface mykitchen mykitchen 255.255.255.255 UGH 0 0 0 ipsec0 mylivingroom mylivingroom 255.255.255.255 UGH 0 0 0 ipsec0 192.168.129.0 * 255.255.255.0 U 0 0 0 usb0 192.168.0.0 * 255.255.255.0 U 0 0 0 ath0 192.168.0.0 * 255.255.255.0 U 0 0 0 ipsec0 169.254.0.0 * 255.255.0.0 U 0 0 0 usb0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default mylivingroom 128.0.0.0 UG 0 0 0 ipsec0 128.0.0.0 mylivingroom 128.0.0.0 UG 0 0 0 ipsec0 default mylivingroom 0.0.0.0 UG 0 0 0 ath0 Thanks |
What do the routing tables look like on the other machines?
Dave |
Here is the route info from mylivingroom which is the lan gateway to the internet, ipmasq and vpn server.
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface mykitchen mykitchen 255.255.255.255 UGH 0 0 0 ipsec0 mymythtv mymythtv 255.255.255.255 UGH 0 0 0 ipsec0 mylaptop mylaptop 255.255.255.255 UGH 0 0 0 ipsec0 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 ipsec0 12.218.208.0 * 255.255.248.0 U 0 0 0 eth0 12.218.208.0 * 255.255.248.0 U 0 0 0 ipsec1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 12-218-208-1.cl 0.0.0.0 UG 0 0 0 eth0 like I said in the earlier post, adding a route to the 192.168.129.0 network via gateway 192.168.0.2 and interface ipsec0 gets accepted as a valid route command but still I cannot access the zaurus connected to 192.168.0.2 from 192.168.0.1 (mylivingroom). Other info: All my lan machines communicate wirelessly and have vpn via freeswan. They will only accept vpn connections from the wireless network (through shorewall) but will accept any connections from wired ethernet and usb interfaces. Chris |
Hi again.
How are the machines on the LAN connected together? If it's through a switch (e.g.an ADSL router with multiple ports), then you'll have to set up a static route on the switch which points packets for the 192.168.129 network to 192.168.0.2, otherwise packets for the 192.168.129 network will be dropped at the switch. Dave |
I have mylivingroom with two ethernet interfaces : eth0 connects to the cable modem, eth1 connects to a netgearwireless router via ethernet cable.
mymythtv connects wirelessly to the netgear router. It has a connecetion to the zaurus via usb. I thought I added a static route already but I did not reboot the router. I will try that. |
Static Routes on the Netgear Wireless router
# Active Name Destination Gateway 1 Yes zaurus 192.168.129.201 192.168.0.2 I rebooted it but still no go. Everything seems to be still working. zaurus can ping mylivingroom and mymythtv and access the internet ( so ipv4 forwarding is working) mymythtv can ping zaurus and mylivingroom mylivingroom can ping mymythtv -- but not the zaurus Chris |
Here is the routing table in mylivingroom with the route to 192.168.129.0 via gw mymythtv:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface mykitchen mykitchen 255.255.255.255 UGH 0 0 0 ipsec0 mymythtv mymythtv 255.255.255.255 UGH 0 0 0 ipsec0 mylaptop mylaptop 255.255.255.255 UGH 0 0 0 ipsec0 192.168.129.0 mymythtv 255.255.255.0 UG 0 0 0 ipsec0 192.168.129.0 mymythtv 255.255.255.0 UG 0 0 0 eth1 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 ipsec0 12.218.208.0 * 255.255.248.0 U 0 0 0 eth0 12.218.208.0 * 255.255.248.0 U 0 0 0 ipsec1 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 12-218-209-111. 0.0.0.0 UG 0 0 0 eth0 I dont understand it. Packets to 192.168.129.0 network should find their way to that network via mymythtv according to the routing table. I have routes up via eth0 and ipsec0. Is there a way to figure out in mylivingroom if these packets are getting out? If they are, maybe the problem is in mymythtv not routing them to the usb network. Chris |
Hi.
What is the IP address of the usb0 interface on mymythtv? Try running 'traceroute 192.168.129.201' on mylivingroom. That should let you see how far packets are getting. Dave |
Trace route doesn't seem to be able to find 192.168.129.201.
I think I have an idea what is happening here. My guess is that there is nothing wrong with the routing table but freeswan is preventing me from going past mymythtv into the usb subnet. All ipsec connections to mymythtv are terminated as host only at the mymythtv end. I think I need to establish an ipsec connection from the other machines to mymythtv that is a host to subnet type. I will test this tomorrow and post results. |
I was right :) Adding this host to subnet connection in ipsec.conf
in mymythtv: conn mylaptop-to-mymythtvnet left=192.168.0.2 # Local vitals leftid="/C=US/ST=IN/O=MYPCNET/CN=MYMYTHTV" leftsubnet=192.168.129.0/24 leftcert=mymythtvcert.pem right=192.168.0.100 # Remote vitals rightid="/C=US/ST=IN/O=MYPCNET/CN=MYLAPTOP" rightcert=mylaptopcert.pem auto=add pfs=yes in mylaptop: conn mylaptop-to-mymythtvnet left=192.168.0.100 # Local vitals leftid="/C=US/ST=IN/O=MYPCNET/CN=MYLAPTOP" leftcert=mylaptopcert.pem right=192.168.0.2 # Remote vitals rightid="/C=US/ST=IN/O=MYPCNET/CN=MYMYTHTV" rightsubnet=192.168.129.0/24 rightcert=mymythtvcert.pem auto=start pfs=yes allowed mylaptop to ping the zaurus connected to mymythtv. It was a vpn issue after all. The reason why the zaurus could access the internet was because I had a host to subnet connection between mymythtv (host) and mylivingroom(subnet) in which the subnet was specified as 0.0.0.0/0. Indeed, connecting the zaurus cradle to mylivingroom would not have necessitated creation of additional connections since 192.168.129.0/24 would fall within the more general 0.0.0.0/0. To do the opposite, connect to the zaurus from elsewhere means that the subnets attached to mymythtv ( usb0 and company) need to be made accessible via a host(otherpc) to subnet(mymythtv) vpn tunnel. I can see clearly now. Thanks for your time and effort in assisting me to troubleshoot this. Chris |
Cool. That makes sense. I've bookmarked this in case I have to deal with this sort of thing myself.
I'm glad it's working for you. Cheers. Dave |
I am extremely frustrated. and I am happy to see that someone got a Zaurus SL5600 connected to their linux computer.
I have SUSE linux 9.3 installed on my computer and have tried all sorts of things to get my SL5600 to connect to my laptop so that I can sync. Unfortunately as much as I try I cant get it to work. can you please tell me step by step how you did this?? I have the zaurus SL5600 cradle and have tried following the instructions in this website: http://easynews.dl.sourceforge.net/s...conf-1.0.1.pdf but think I am doing something wrong. becuase I see: Code:
linux:/home/chacmool # tail -f /var/log/messages Code:
Jan 24 09:42:57 waddler kernel: usb 2-1: new full speed USB device using address 2 |
All times are GMT -5. The time now is 05:42 PM. |