maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   USB connection interrupts wifi access on host debian PC (https://talk.maemo.org/showthread.php?t=47129)

白い熊 2010-03-11 15:47

USB connection interrupts wifi access on host debian PC
 
I'm goin' nuts, have been messing with this for hours now, and though I think it's something stupid, can't figure out what I've messed up...

I just wanna achieve the following: my Debian PC is connected to the internet over a Wifi connection. Wanna plug in the N900 with the USB cable and ssh access it.

Had it working easily, don't know what's changed.

Basically now, as per:
http://wiki.maemo.org/N900_USB_networking
http://wiki.maemo.org/USB_networking..._Configuration
and
http://pc-connectivity.garage.maemo....00000000000000

I've added to /etc/network/interfaces on the PC:
Code:

auto usb0
allow-hotplug usb0

mapping hotplug
script grep
map usb0

iface usb0 inet static
  up iptables -t nat -A POSTROUTING -s 192.168.2.15 -j MASQUERADE
  up echo 1 > /proc/sys/net/ipv4/ip_forward
  down iptables -t nat -D POSTROUTING -s 192.168.2.15 -j MASQUERADE
  down echo 0 > /proc/sys/net/ipv4/ip_forward

Now, when I plug in the USB cable, ifconfig gives me for USB:
Code:

usb0      Link encap:Ethernet  HWaddr 12:5e:6e:98:55:a5 
          inet6 addr: fe80::105e:6eff:fe98:55a5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:3525 (3.4 KiB)

and I can ping google.com no prob. Can't ping 192.168.2.15

The moment I run
Code:

# ifconfig usb0 192.168.2.14
I can ping 192.168.2.15 but pinging google.com gives me, after a couple of secs wait:
Code:

ping: unknown host google.com
After unplugging the USB, all goes back to normal.

WTF? What am I missing?

白い熊 2010-03-11 16:47

Re: USB connection interrupts wifi access on host debian PC
 
Duh... DNS problems.

Adding public DNS servers to /etc/resolv.conf fixes the issue.

Don't know why ifconfig usb0 messes up with DNS resolution on the wifi, but WTH it works now...


All times are GMT. The time now is 04:57.

vBulletin® Version 3.8.8