OpenWrt Forum Archive

Topic: DLNA/UPnP media server not visible from wired lan to wifi: TL-WR1043ND

The content of this topic has been archived between 28 Apr 2018 and 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I've just installed OpenWRT on a TP-Link TL-WR1043ND. I have a DLNA media server running on the wired LAN which is not immediately visible to clients on the wifi network. They see the DLNA server randomly after some time, but not always.

After lots of searching on here and elsewhere it seems that the issue is that DLNA uses multicast to announce server availability but OpenWRT does not copy multicast packets from the wired LAN to the wireless network.

Some previous posts have suggested that using igmpproxy is the solution, but all of the examples I have seen are discussing making multicast from the WAN available on the LAN. What I think I need to do is proxy the multicast announcements sent on the wired LAN to the wifi network.

I've tried all combinations I can think of, but can't find a configuration of igmpproxy that works.

This is my ifconfig:

br-lan    Link encap:Ethernet  HWaddr 64:70:02:40:63:8C 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2162917 errors:0 dropped:7057 overruns:0 frame:0
          TX packets:2425509 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:257030963 (245.1 MiB)  TX bytes:1141148035 (1.0 GiB)

eth0      Link encap:Ethernet  HWaddr 64:70:02:40:63:8C 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:18113569 errors:0 dropped:154 overruns:60037 frame:0
          TX packets:16417836 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1359873919 (1.2 GiB)  TX bytes:4242649814 (3.9 GiB)
          Interrupt:4

eth0.1    Link encap:Ethernet  HWaddr 64:70:02:40:63:8C 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1901742 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1948010 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:237559123 (226.5 MiB)  TX bytes:499581105 (476.4 MiB)

eth0.2    Link encap:Ethernet  HWaddr 64:70:02:40:63:8C 
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9101140 errors:0 dropped:2929 overruns:0 frame:0
          TX packets:7702271 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5059208064 (4.7 GiB)  TX bytes:1143172262 (1.0 GiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2649 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2649 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:947834 (925.6 KiB)  TX bytes:947834 (925.6 KiB)

wlan0     Link encap:Ethernet  HWaddr 64:70:02:40:63:8C 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:295113 errors:0 dropped:0 overruns:0 frame:0
          TX packets:524147 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:32
          RX bytes:34395913 (32.8 MiB)  TX bytes:665261569 (634.4 MiB)

I'm assuming eth0.1 is the wired LAN, eth0.2 is the wired WAN, br-lan is the bridged wired LAN and wifi and wlan0 is the wifi.

So, it seems to me that I want to proxy igmp from eth0.1 to wlan0. So I have set igmpproxyconfig to:

quickleave

phyint eth0.1 upstream ratelimit 0 threshold 1

phyint wlan0 downstream ratelimit 0 threshold 1   

When I run it with igmpproxy -d ./igmpproxy.conf I get the error:
There must be at least 2 Vif's where one is upstream.

Which seems as if I have not got the interfaces right.

Any ideas? Am I on the right tracks with using igmpproxy? If so any ideas on how I should configure it correctly? Or is there something completely different I should be trying to get DLNA servers on the wired LAN visible from the wifi network?

After trying everything obvious I could see from the forums here or from general google searches it seems that it might be the case that OpenWRT may not support DLNA from wired to wireless LANs... I would love to find out that I am wrong as I like many of the other features of OpenWRT... should I try a differnet firmware?

I have to admit defeat. I've resorted to rewiring my house (we had the builders in today anyway) so that all foreseen DLNA clients are on the wired LAN and now all of my DLNA media servers are discovered instantly by the clients. It is a real pity that OpenWRT does not have an obvious method to get UPnP/DLNA working for wireless clients. I have yet to see a solution to this multicast bridging problem with OpenWRT - while my rather drastic solution has been to build a physical network to get things working other people have resorted to using the original T-Link firmware... I would still like to find a workaround so that visitor laptops in my wifi network can use DLNA, so, please, if anyone has a solution I am all ears.

I think this is one of the only real problems with OpenWRT, but it is a major one as most people want to be able to connect their TVs, iPads, etc. to their media servers... while this remains an unsolved problem I do not see OpenWRT ever hitting the mainstream.

(Last edited by dpg on 28 Mar 2013, 01:07)

What is your igmpproxy config?

Sounds to me you didn't configure igmpproxy accordingly
http://wiki.openwrt.org/doc/howto/udp_multicast

FYI, your problem is merely a configuration issue... not that Openwrt doesn't support this.

(Last edited by ericwongcm on 31 Mar 2013, 12:31)

ericwongcm wrote:

What is your igmpproxy config?

Sounds to me you didn't configure igmpproxy accordingly

I configured it as I mentioned in the first post:

dpg wrote:

I'm assuming eth0.1 is the wired LAN, eth0.2 is the wired WAN, br-lan is the bridged wired LAN and wifi and wlan0 is the wifi.

So, it seems to me that I want to proxy igmp from eth0.1 to wlan0. So I have set igmpproxyconfig to:

quickleave

phyint eth0.1 upstream ratelimit 0 threshold 1

phyint wlan0 downstream ratelimit 0 threshold 1   

When I run it with igmpproxy -d ./igmpproxy.conf I get the error:
There must be at least 2 Vif's where one is upstream.

Which seems as if I have not got the interfaces right.

I read the instructions at the link you sent before I tried anything out. The link is explaining how to get incoming multicast from the WAN proxied onto the LAN. I wanted to do something slightly different and get multicast from the wired LAN proxied onto the wireless LAN. So my original question was which interfaces I should use to get this working.

I tried eth0.1 and wlan0 but this didn't work as it generated errors about needing at least two Vifs... so if you have any suggestions I would love to hear them.

Thanks.

dpg wrote:

I'm assuming eth0.1 is the wired LAN, eth0.2 is the wired WAN, br-lan is the bridged wired LAN and wifi and wlan0 is the wifi.

So, it seems to me that I want to proxy igmp from eth0.1 to wlan0. So I have set igmpproxyconfig to:

quickleave

phyint eth0.1 upstream ratelimit 0 threshold 1

phyint wlan0 downstream ratelimit 0 threshold 1   

When I run it with igmpproxy -d ./igmpproxy.conf I get the error:
There must be at least 2 Vif's where one is upstream.

Which seems as if I have not got the interfaces right.

I read the instructions at the link you sent before I tried anything out. The link is explaining how to get incoming multicast from the WAN proxied onto the LAN. I wanted to do something slightly different and get multicast from the wired LAN proxied onto the wireless LAN. So my original question was which interfaces I should use to get this working.

I tried eth0.1 and wlan0 but this didn't work as it generated errors about needing at least two Vifs... so if you have any suggestions I would love to hear them.

Thanks.

Don't make assumptions. Check what is the real name of your router interface via LUCI or command.

The error "There must be at least 2 Vif's where one is upstream." is saying your router doesn't have any devices connected with those IP address range you specify... which means you need to check your IP address if you have already configured igmp config correctly..

It appears like your igmp config doesn't contain the required line to set your subnet IP address
altnet 10.254.0.0/16

My igmp config which seems to work look like this...
My lan is using 192.168.15.x for all connected devices.
WLAN is connected to the upstream router for internet access.
My Openwrt router have DHCP disabled and IP address are all acquired from upstream internet router.

config igmpproxy
    option quickleave 1

config phyint
    option network wwan
    option direction upstream
    list altnet 192.168.15.0/24

config phyint
    option network wwan
    option direction downstream
    list altnet 192.168.15.0/24
   
config phyint
    option network lan
    option direction downstream
    list altnet 192.168.15.0/24

config phyint
    option network lan
    option direction upstream
    list altnet 192.168.15.0/24

(Last edited by ericwongcm on 3 Apr 2013, 06:12)

" it might be the case that OpenWRT may not support DLNA from wired to wireless LANs"

I've noticed the same thing but for me when the router is freshly rebooted, dlna from wired to wireless works for a while. Then after a while it stops working and the wireless and wired clients can't see dlna servers past the divide any longer.

Until this is fixed you can create a wireless wds client router and connect to that one via wire. This seems to work.

ericwongcm wrote:

Don't make assumptions. Check what is the real name of your router interface via LUCI or command.

In my original post I pasted the output from ifconfig which showed all of the interfaces:
br-lan
eth0
eth0.1
eth0.2
lo
wlan0

ericwongcm wrote:

The error "There must be at least 2 Vif's where one is upstream." is saying your router doesn't have any devices connected with those IP address range you specify... which means you need to check your IP address if you have already configured igmp config correctly..

It appears like your igmp config doesn't contain the required line to set your subnet IP address
altnet 10.254.0.0/16

I've tried with and without altnet lines to specify the IP addresses, I always get the same error "There must be at least 2 Vif's where one is upstream."

The only time I can get igmpproxy to run is if I specify that it should proxy between interfaces eth0.2 and br-lan (and this works whether or not I specify the addresses in the altnet config line, btw).

However, this is proxying between the WAN and the bridged LAN (wired+wifi) and this is not what I want to do - I want to get multicast from the wired LAN proxied onto the wifi network.

From looking at your config it looks as if you are proxying between the WAN and LAN, which, is working for me too. So, the question remains - can I use igmpproxy to proxy multicast traffic between the wired and wireless LANS?

BigD wrote:

" Until this is fixed you can create a wireless wds client router and connect to that one via wire. This seems to work.

I'm a bit confused - do you mean set up a second router to act as a client of the wifi network from the first router?

The trouble with doing this is that the first OpenWRT router is not copying any multicast packets onto the wifi, so the second router or any hosts connected to it through its wired LAN would not receive multicast either.

I'm sure I've misunderstood - can you explain further?

dpg wrote:
BigD wrote:

" Until this is fixed you can create a wireless wds client router and connect to that one via wire. This seems to work.

I'm a bit confused - do you mean set up a second router to act as a client of the wifi network from the first router?

The trouble with doing this is that the first OpenWRT router is not copying any multicast packets onto the wifi, so the second router or any hosts connected to it through its wired LAN would not receive multicast either.

I'm sure I've misunderstood - can you explain further?

For me, in this case multicast would work even over wifi. I think this has to do with WDS working in a different way than an ordinary STA connection (the wiki mentions something about "using a 4-address-format to allow transparent ethernet bridging on the station"). I'm talking about having a wired connection to the client router though, if this would work even if you connected to the client router over wireless I do not know. 

I'm using a media player connected to a wr703 router which is connected to the main network though wds and I can browse dlna servers just fine.

dpg wrote:

From looking at your config it looks as if you are proxying between the WAN and LAN, which, is working for me too. So, the question remains - can I use igmpproxy to proxy multicast traffic between the wired and wireless LANS?

Yes, I am proxying between WAN and LAN because my WIFI is configured as the WWAN and it is configured as WAN.

My configuration is correct for what I am doing.
Check how you have configured your router.

BigD wrote:

For me, in this case multicast would work even over wifi. I think this has to do with WDS working in a different way than an ordinary STA connection (the wiki mentions something about "using a 4-address-format to allow transparent ethernet bridging on the station"). I'm talking about having a wired connection to the client router though, if this would work even if you connected to the client router over wireless I do not know. 

I'm using a media player connected to a wr703 router which is connected to the main network though wds and I can browse dlna servers just fine.

This is an interesting workaround, but, unfortunately, it does mean deploying two routers.

Just to check whether I have got it right:

[H1]----wired----[R1]----wired WDS----[R2]----wireless----[H2]
DLNA                WR1043                    WR1043                  DLNA
media               router                        router                     media
server              OpenWRT                  OpenWRT                client

Is it the case that the second router (R2) copies the multicast arriving from R1 over the wired WDS connection onto the wifi because it is a WDS link so it treats it differently to a normal wired link?

ericwongcm wrote:

My configuration is correct for what I am doing.
Check how you have configured your router.

This was what I was hoping to get some help with. The configuration is pretty much out-of-the-box, I have the interfaces I showed in the original post with the output from ifconfig and I can only get igmpproxy to work between eth0.2 (the WAN) and br-lan (the bridged wired/wifi LANs). If you can help me find out which aspects of the router configuration I should check to help configure igmpproxy to work between wired and wifi LANs I would be very grateful.

(Last edited by dpg on 10 Apr 2013, 18:19)

ericwongcm wrote:

Sounds to me you didn't configure igmpproxy accordingly

FYI, your problem is merely a configuration issue... not that Openwrt doesn't support this.

I've just discovered an open bug report for this issue at: https://dev.openwrt.org/ticket/13042 so perhaps it may be more than just a configuration issue after all.

dpg wrote:

Just to check whether I have got it right:

[H1]----wired----[R1]----wired WDS----[R2]----wireless----[H2]
DLNA                WR1043                    WR1043                  DLNA
media               router                        router                     media
server              OpenWRT                  OpenWRT                client

Is it the case that the second router (R2) copies the multicast arriving from R1 over the wired WDS connection onto the wifi because it is a WDS link so it treats it differently to a normal wired link?

Well in my case, it's a wireless wds connection (I'm not even sure there is such a thing as a wired wds connection), but the last link is wired.

In any case, it's a bug, and the wds solution is only a workaround. Hopefully it will get some attention and get fixed properly.

SOLUTION!


The problem with multicast is multicast snooping. Disable it and the bridge will forward all multicast packets (DLNA/UPnP).

echo "0">/sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Substitude br-lan with your actual bridge interface, for example br0.
You must of course disable multicast_snooping on all wlan-wired bridges in your network.

(Last edited by Gatak on 19 Apr 2013, 09:53)

Gatak wrote:

SOLUTION!


The problem with multicast is multicast snooping. Disable it and the bridge will forward all multicast packets (DLNA/UPnP).

echo "0">/sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Substitude br-lan with your actual bridge interface, for example br0.
You must of course disable multicast_snooping on all wlan-wired bridges in your network.

Amazing!

First impression is that it does indeed seems to work.  Time will tell if it will this is a temporary thing or not. Even before, at times, dlna access worked for on random occasions. But this seems very promising. Thanks so much Gatak!

BigD wrote:
Gatak wrote:

SOLUTION!


The problem with multicast is multicast snooping. Disable it and the bridge will forward all multicast packets (DLNA/UPnP).

echo "0">/sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Substitude br-lan with your actual bridge interface, for example br0.
You must of course disable multicast_snooping on all wlan-wired bridges in your network.

Amazing!

First impression is that it does indeed seems to work.  Time will tell if it will this is a temporary thing or not. Even before, at times, dlna access worked for on random occasions. But this seems very promising. Thanks so much Gatak!

Geat that it worked! I got the tip from #netfilter on FreeNode smile

I am running the following setup on a WR1043ND with VLAN disabled (option enable_vlan '0'):

[client A] <-wired-> [eth0-bridge-wlan0] <-wifi-> [wlan0-bridge-eth0] <-wired-> [client B]

The guide on the Wiki is now updated too: http://wiki.openwrt.org/doc/howto/udp_multicast

(Last edited by Gatak on 19 Apr 2013, 15:39)

Correct me if I'm wrong Gatak, but this is not a setting that will survive reboot so the command has to be entered into /etc/rc.local so that it is run on start up.

No it doesn't survive a reboot, so you are correct that it should be added to /etc/rc.local

BigD wrote:

Correct me if I'm wrong Gatak, but this is not a setting that will survive reboot so the command has to be entered into /etc/rc.local so that it is run on start up.

No, you are right that you would have to put it in rc.local or type it manually each reboot. Maybe I should have added this in the wiki too smile

Gatak wrote:

SOLUTION!


The problem with multicast is multicast snooping. Disable it and the bridge will forward all multicast packets (DLNA/UPnP).

echo "0">/sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Brilliant Gatak. Works perfectly. Just what I was looking for.

Thanks!

Gatak wrote:

SOLUTION!


The problem with multicast is multicast snooping. Disable it and the bridge will forward all multicast packets (DLNA/UPnP).

echo "0">/sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Substitude br-lan with your actual bridge interface, for example br0.
You must of course disable multicast_snooping on all wlan-wired bridges in your network.

How do I do this if I don't have /sys/devices/virtual/net/br-lan/bridge/multicast_snooping
in my router?

root@Vodafone-HG556A:/sys/devices/virtual/net/br-lan/bridge# ls
ageing_time               hello_time                stp_state
bridge_id                 hello_timer               tcn_timer
flush                     max_age                   topology_change
forward_delay             priority                  topology_change_detected
gc_timer                  root_id                   topology_change_timer
group_addr                root_path_cost
group_fwd_mask            root_port

I am interested to use method rather than IGMP proxy... (if it means I can install and run one app less.)

(Last edited by ericwongcm on 23 Apr 2013, 01:59)

ericwongcm wrote:
Gatak wrote:

SOLUTION!


The problem with multicast is multicast snooping. Disable it and the bridge will forward all multicast packets (DLNA/UPnP).

echo "0">/sys/devices/virtual/net/br-lan/bridge/multicast_snooping

Substitude br-lan with your actual bridge interface, for example br0.
You must of course disable multicast_snooping on all wlan-wired bridges in your network.

How do I do this if I don't have /sys/devices/virtual/net/br-lan/bridge/multicast_snooping
in my router?

root@Vodafone-HG556A:/sys/devices/virtual/net/br-lan/bridge# ls
ageing_time               hello_time                stp_state
bridge_id                 hello_timer               tcn_timer
flush                     max_age                   topology_change
forward_delay             priority                  topology_change_detected
gc_timer                  root_id                   topology_change_timer
group_addr                root_path_cost
group_fwd_mask            root_port

I am interested to use method rather than IGMP proxy... (if it means I can install and run one app less.)

What version of OpenWRT do you use? I am using Trunk version (daily build) http://downloads.openwrt.org/snapshots/trunk/ar71xx/

It could be that you do not have a recent enough kernel that supports this.

Gatak wrote:

What version of OpenWRT do you use? I am using Trunk version (daily build) http://downloads.openwrt.org/snapshots/trunk/ar71xx/

It could be that you do not have a recent enough kernel that supports this.

The message logs above comes from HG556A router running BARRIER BREAKER (Bleeding Edge, r35770)

I use another rt3052 router running Attitude Adjustment which doesn't have this multicast_snooping either..

Any idea from which revision onwards this features is implemented?
(adding this information to wiki will be useful...)

ericwongcm wrote:
Gatak wrote:

What version of OpenWRT do you use? I am using Trunk version (daily build) http://downloads.openwrt.org/snapshots/trunk/ar71xx/

It could be that you do not have a recent enough kernel that supports this.

The message logs above comes from HG556A router running BARRIER BREAKER (Bleeding Edge, r35770)

I use another rt3052 router running Attitude Adjustment which doesn't have this multicast_snooping either..

Any idea from which revision onwards this features is implemented?
(adding this information to wiki will be useful...)

The wiki says "Luckily, starting from 2.6.34, the kernel has IGMP snooping feature for the software bridges (disabled by default in OpenWrt) which should prevent unnecessary traffic on ports that were not actually subscribing" So it depends on the kernel you have. I would assume this feature is available in kernel 2.6.34 and newer.

You can check your kernel version from the shell:

root@WiFi-AP:~# cat /proc/version
Linux version 3.8.7 (openwrt@OpenWRTBuild) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36349) ) #1 Wed Apr 17 16:22:31 MST 2013

Had a quick look. OpenWRT 10.03.1 has kernel 2.6.30, so it would be in later release than last official "stable". Latest official beta (Attitude Adjustment 12.09) should be ok since is has a 3.x kernel. Trunk (nightly builds) are obviously ok too.

(Last edited by Gatak on 24 Apr 2013, 11:12)