No internet using WIFI, LAN ok, IPTV at the same time
#1
Hello!

My system setup:
Raspberry pi model B
OpenElec 3.2.4 official
wifi usb dongle on powered usb hub (for internet connection) (I use static IP)
usb IR (microsoft) reciever on powered usb hub
Microsoft remote controle
HDMI connected to LG TV
ethernet connected to IPTV port of my ISPs modem (for IPTV) (I use static IP)
router Linksys WRT160NL (original firmware)

My problem:
If I disable (in GUI) wired connection eth0 (used for IPTV), I have internet access and LAN.
If I enable wired connection eth0 (used for IPTV), only LAN works ((I can ssh to raspberry), but internet does not. IPTV works.

As I understand, raspberry pi defaults to eth0 interface for internet connection when both interfaces (eth0 and wlan0) are used.
Is it possible to make wlan0 default internet interface, even when eth0 is active?
If that is possible, what do I have to do?

Thank you for your answers.
Andy

P.s.
Here are my listings for ifconfig and netstat -r:

OpenELEC (official) Version: 3.2.4
OpenELEC:~ # ifconfig
eth0 Link encap:Ethernet HWaddr B8:27:EB:57:01:EA
inet addr:10.247.247.100 Bcast:10.247.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:32693408 errors:0 dropped:37270 overruns:0 frame:0
TX packets:17136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:920432431 (877.7 MiB) TX bytes:2528695 (2.4 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12598798 errors:0 dropped:0 overruns:0 frame:0
TX packets:12598798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:41964886059 (39.0 GiB) TX bytes:41964886059 (39.0 GiB)

wlan0 Link encap:Ethernet HWaddr 64:70:02:29:71:12
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:610173 errors:0 dropped:616589 overruns:0 frame:0
TX packets:320568 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:695478245 (663.2 MiB) TX bytes:89282378 (85.1 MiB)


OpenELEC:~ # netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.247.247.100 0.0.0.0 UG 0 0 0 eth0
8.8.8.8 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
10.247.0.0 * 255.255.0.0 U 0 0 0 eth0
10.247.247.100 * 255.255.255.255 UH 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.1.1 * 255.255.255.255 UH 0 0 0 wlan0

ping www.google.com returns no data

Andy
Reply
#2
I suspect the real problem is in the setup of the router, and that is where it needs to be tackled.
Ideally you should need only one connection to the router, but the 2 suggests that there may be a need to split using filters based on what the traffic is for - you have to query whether the RPi can handle both without overloading.
How did you arrive at this setup?

What does the routing table look like when you disable the interfaces - do you see any difference?
Derek
Reply
#3
My ISP provides us with VDSL modem with 4 ports. 2 ports are for inernet (no IPTV) and 2 for IPTV (no internet). Router is connected to internet port. This is why I need two connections on raspi, one for internet (wlan) and one for IPTV (eth). On win7 computer both connections work together, on pi do not.
As I said before, internet over wlan0 works, when eth0 is down. When eth0 is up, only local access works.

Routing table when eth0 is down:

OpenELEC:~ # netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
Default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
8.8.8.8 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
192.168.1.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.1.1 * 255.255.255.255 UH 0 0 0 wlan0
Reply
#4
OK, that confirms one train of thought.
The real problem is this entry (your first post)
default 10.247.247.100 0.0.0.0 UG 0 0 0 eth0

which you really want to be that in your last post
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

so that all traffic which is not IPTV (ie on 10.247.0.0) gets routed by the wlan0 by default.

Memory says that you can manually manipulate the routing tables - something like:
route del default
to delete the default route.
route add default gw 192.168.1.1
to add the new default route
BUT I don't know how to make this permanent with raspbmc - used to be able to do this with Windows, but I never saw a variant of route which allowed it for linux

later: could you just swap the ethernet and wireless connections - that way the default would be what you want
Derek
Reply
#5
Your sugestion with deleting and adding default route worked!
For two or three minutes. Sad
Then it reverted to old routing table.
So it is a question of making this routing table permanent. Does anybody know how to do that?

Swaping connections is probably costly, as I would need special wifi router with multicast only for this device.
Reply

Logout Mark Read Team Forum Stats Members Help
No internet using WIFI, LAN ok, IPTV at the same time0