LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-04-2005, 12:46 AM   #1
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Rep: Reputation: 30
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.
 
Old 12-04-2005, 02:46 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

You'll have to enable IP forwarding:
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
Dave
 
Old 12-04-2005, 04:06 PM   #3
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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
 
Old 12-04-2005, 09:24 PM   #4
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
What do the routing tables look like on the other machines?

Dave
 
Old 12-06-2005, 09:37 AM   #5
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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
 
Old 12-06-2005, 10:32 AM   #6
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
Old 12-06-2005, 10:53 AM   #7
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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.
 
Old 12-06-2005, 11:01 AM   #8
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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
 
Old 12-06-2005, 11:08 AM   #9
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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
 
Old 12-06-2005, 02:55 PM   #10
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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

Last edited by ilikejam; 12-06-2005 at 03:10 PM.
 
Old 12-06-2005, 08:37 PM   #11
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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.
 
Old 12-07-2005, 01:41 PM   #12
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
Smile

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
 
Old 12-07-2005, 01:50 PM   #13
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
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
 
Old 03-01-2007, 11:07 PM   #14
izquierdista
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 342

Rep: Reputation: 30
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
Mar  1 21:49:08 linux SuSEfirewall2: Firewall rules set to CLOSE.
Mar  1 21:49:08 linux SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6 support disabled.
Mar  1 21:49:08 linux SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
Mar  1 21:49:08 linux SuSEfirewall2: Firewall rules successfully set
Mar  1 21:49:37 linux kernel: ohci_hcd 0000:00:02.2: wakeup
Mar  1 21:49:37 linux kernel: usb 1-1: new full speed USB device using ohci_hcd and address 3
Mar  1 21:49:38 linux kernel: usb 1-1: USB disconnect, address 3
Mar  1 21:49:38 linux kernel: usb 1-1: new full speed USB device using ohci_hcd and address 4
Mar  1 22:07:15 linux su: (to root) chacmool on /dev/pts/9
Mar  1 22:08:06 linux su: (to root) chacmool on /dev/pts/9
instead of what I am suppossed to see:

Code:
 Jan 24 09:42:57 waddler kernel: usb 2-1: new full speed USB device using address 2
Jan 24 09:42:57 waddler kernel: usb 2-1: Product: SL-5600
Jan 24 09:42:57 waddler kernel: usb 2-1: Manufacturer: Sharp
Jan 24 09:43:04 waddler kernel: usb0: register usbnet at usb-0000:00:11.3-1, Sharp Zaurus, PXA-2xx based
Jan 24 09:43:04 waddler kernel: usbcore: registered new driver usbnet
Jan 24 09:43:25 waddler kernel: usb0: no IPv6 routers present
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP default route attached to loopback interface chiefdan Linux - Hardware 2 12-06-2005 05:08 PM
ping on wrong interface despite route ocgltd Linux - Networking 1 09-26-2005 11:23 PM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
bypass local prerouting route for external eth interface? tblack Linux - Networking 1 09-27-2004 03:47 PM
Route all traffic of a given type to an interface tsweatt Linux - Networking 0 09-01-2003 12:24 PM


All times are GMT -5. The time now is 04:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration