OpenWrt Forum Archive

Topic: Should I expect a media server to be seen across a wireless bridge?

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

I played some with tcpdump last night. The bridge of course sees the announcements on the wired part, but doesn't forward them over the wireless network. I think that relayd just blocks those packets on purpose.

For iTunes and bonjour announcements there is a proxy program, so I can't see why this shouldn't work with upnp, too.

edit:
igmpproxy seems to do the trick.
This is my igmpproxy.conf:

quickleave

phyint br-lan downstream ratelimit 0 threshold 1
        altnet 192.168.1.0/24
phyint wlan0 upstream ratelimit 0 threshold 1
        altnet 192.168.1.0/24

To make sure it works, I ran it in foreground like this:

igmpproxy -d /etc/igmpproxy.conf

It gave me output like:

The origin for route 239.255.255.250 changed from 192.168.1.x to 192.168.1.y

So I know it was receiving something. my whole network is on a 192.168.1.0/24 network, except for the WNDR3700 with is at 192.168.2.1 just like suggested in the relayd wireless bridge how-to.
I set the wndr3700 to static IP in the 192.168.1.0/24 subnet. I added this IP to the network config so it's accessible in this network too. With igmpproxy in place it is now accessible from both sides of the bridge, which makes it seem work better.

I just set it up and tested it in the last hour, so it might not be perfect. But it's working at least. ymmv. wink
I'll keep posting my experiences here. If this setup is stable, maybe it can be added to the relayd how-to.

edit2:
I can see ushare across the bridge, and some other stuff, so this seems to be fine.

(Last edited by fizze on 12 Jul 2011, 20:33)

This is promising news! Hopefully I'll find time to have a play this weekend and see if I can get it going.

Thanks Fizze! That igmpproxy really works and solved all my of problems related to media server. It nice to see that at least someone really knows what they are doing smile

(Last edited by hmm on 5 Aug 2011, 10:07)

Glad to be helpful!
I'm still not sure whether it's igmpproxy that is actually doing something, or whether it's relayd that suddenly works in broadcast mode. Anyway, it's still working for me, and has been stable for weeks. Never touch a running system! wink

Alrighty, so I've had a crack at sticking igmpproxy on but I'm not having the same luck as you guys did.

Most likely this is because I'm not as smart.

I've got my router set up and working as a bridge.

I can see the usb drive connected to the router from my pc via

PC => FritzBox => Buffalo => USB drive

So I think the basics are ok.

When I run igmpproxy -d /etc/igmpproxy.conf I see things like

The origin for route 239.255.255.250 changed from 192.168.1.20 to 192.168.1.31
The origin for route 239.255.255.250 changed from 192.168.1.31 to 192.168.1.33
The origin for route 239.255.255.250 changed from 192.168.1.33 to 192.168.1.1

.20 is my PC
.31 is my TV
.33 is a network tv tuner
.1 is the FritzBox

The media server is on the fritz box.

I'm pretty sure my firewall in openwrt is turned off. I ran

/etc/init.d/firewall stop
/etc/init.d/firewall disable

My igmpproxy config is

########################################################
#
#   Example configuration file for the IgmpProxy
#   --------------------------------------------
#
#   The configuration file must define one upstream
#   interface, and one or more downstream interfaces.
#
#   If multicast traffic originates outside the
#   upstream subnet, the "altnet" option can be
#   used in order to define legal multicast sources.
#   (Se example...)
#
#   The "quickleave" should be used to avoid saturation
#   of the upstream link. The option should only
#   be used if it's absolutely nessecary to
#   accurately imitate just one Client.
#
########################################################

##------------------------------------------------------
## Enable Quickleave mode (Sends Leave instantly)
##------------------------------------------------------
quickleave


##------------------------------------------------------
## Configuration for eth0 (Upstream Interface)
##------------------------------------------------------
phyint wlan0 upstream  ratelimit 0  threshold 1
        altnet 192.168.1.0/24


##------------------------------------------------------
## Configuration for eth1 (Downstream Interface)
##------------------------------------------------------
phyint br-lan downstream  ratelimit 0  threshold 1
        altnet 192.168.1.0/24

##------------------------------------------------------
## Configuration for eth2 (Disabled Interface)
##------------------------------------------------------
phyint eth2 disabled

I'd appreciate any help you can give me to get this working.

Also, Is there any command I could try on the router that would verify whether it can receive and forward the response from the media server? Having to go in and try my tv all the time is a bit tedious.

(Last edited by ProggerPete on 24 Sep 2011, 12:43)

Weird. I had a power outage and since the resulting forced reboot my upnp server cannot be seen across the wireless bridge either. I tried to mimic the setup, but to no avail.
The weird thing is that igmpproxy seems to translate packets from one side only. I tried it with relayd running in broadcast mode, and without. I need to investigate this some more, I'm afraid.

@ hmm:
Any chance you can post details of your setup?
like 'ps auxw' output, ifconfig, igmpproxy.conf and uci network config/firewall config dump?

I have a similar setup with a server connected to the pseudobridged client.  Computers connected to the main AP can see the server (ping 192..) and samba share, but not a upnp server.  I have tried both mediatomb and minidlna with no luck.  I am looking into igmpproxy but I don't know enough to configure it.  I have not tried WDS, which also sounds like it might work, but is not the solution that I want.

fizze wrote:

I have a similar setup, and used a WRT54G as a wireless bridge for years without issues.
I got a WNDR3700, and sadly discovered that the Atheros chipset doesn't really play well with client bridge mode.

I found a working solution was relayd, but sadly it seems that multicast packets aren't forwarded across the bridge.
Is there a known workaround? Can the multicast announcements be re-created by igmpproxy or something similar?

edit:
I use squeezeboxserver and multiple squeezeboxes. the server is behin the relayd bridge, the squeezeboxes are on the other side. That is working fine. DLNA/UPNP however, isn't.

I believe relayd just does not implement the needed bits for multicast relaying. It only handles broadcasts and unicast traffic.

OK, got this working.  Setup:

cable modem == main AP ---- pseudobridge router == server

== is wired
---- is wireless

The network segment is 192.168.1.x.
The LAN of the pseudobridge router is 192.168.3.1.
The wireless interface of the pseudobridge router is 192.168.1.3 and is set via DHCP from the main AP.
The address of the pseudobridge router is set statically on the main AP.

The main AP is an Asus WL-500g Premium V2 running DD-WRT.
The pseudobridge is a Buffalo WZR-HP-G300NH2 running OpenWRT image compiled from svn version 29600.  Support for relayd and igmpproxy is enabled.

Settings on the Buffalo...

/etc/config/wireless:

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'macaddr' '00:24:a5:f4:bc:e4'
        option 'hwmode' '11ng'
        option 'htmode' 'HT20'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'TX-STBC'
        list 'ht_capab' 'RX-STBC1'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'disabled' '0'
        option 'channel' '6'

config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'wwan'
        option 'mode' 'sta'
        option 'ssid' 'yyyy'
        option 'key' 'xxxx'
        option 'encryption' 'psk2'

/etc/config/network:

config 'interface' 'loopback'
        option 'ifname' 'lo'
        option 'proto' 'static'
        option 'ipaddr' '127.0.0.1'
        option 'netmask' '255.0.0.0'

config 'interface' 'lan'
        option 'ifname' 'eth0.1'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ipaddr' '192.168.3.1'

config 'interface' 'wan'
        option 'ifname' 'eth0.2'
        option 'proto' 'dhcp'

config 'switch'
        option 'name' 'eth0'
        option 'reset' '1'
        option 'enable_vlan' '1'

config 'switch_vlan'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '0t 1 3 4 5'

config 'switch_vlan'
        option 'device' 'eth0'
        option 'vlan' '2'
        option 'ports' '0t 2'

config 'interface' 'wwan'
        option 'proto' 'dhcp'

config 'interface' 'stabridge'
        option 'proto' 'relay'
        option 'network' 'lan wwan'
        option 'ipaddr' '192.168.1.3'

/etc/igmpproxy.conf:  (comment header deleted for brevity)

quickleave


##------------------------------------------------------
## Configuration for eth0 (Upstream Interface)
##------------------------------------------------------
phyint wlan0 upstream  ratelimit 0  threshold 1
        altnet 192.168.1.0/24


##------------------------------------------------------
## Configuration for eth1 (Downstream Interface)
##------------------------------------------------------
phyint br-lan downstream  ratelimit 0  threshold 1
        altnet 192.168.1.0/24

I followed the instructions in the  pseudobridge wiki entry with appropriate changes for the Buffalo.

The server is sharing some directories via samba and is running Mediatomb 0.12 and sharing some music.  The server is running Ubuntu Server 10.04LTS.  Windows and Ubuntu machines on the main AP can see the samba shares and VLC running on an Ubuntu machine can see the Mediatomb service and play the served music.

Regards.

(Last edited by rmbult01 on 2 Jan 2012, 16:03)

Good to see this thread is still active. This is pretty much the config that I had working.
After a hard reboot of the bridge and my gateway it didn't work anymore. Unicast traffic etc works, but I cannot see any UPnP stuff.

Can you let us know the "ps ausw|grep igmp" output? and "ps auxw|grep relayd"?
I found that even after changing some settings and restarting the network, not all were actually applied.

root@OpenWrt:~# ps ausw | grep igmp
  606 root       804 S    /usr/sbin/igmpproxy /etc/igmpproxy.conf
root@OpenWrt:/etc# ps | grep relayd
  333 root       880 S    /usr/sbin/relayd -I br-lan -I wlan0 -L 192.168.1.3 -
root@OpenWrt:/etc# for x in $(pidof relayd); do tr '\0' ' ' < /proc/$x/cmdline; echo; done
/usr/sbin/relayd -I br-lan -I wlan0 -L 192.168.1.3 -B -D

(Last edited by rmbult01 on 3 Jan 2012, 23:45)

That was quick!
Your relayd output is truncated. can you expand your console window and paste again please? ;-)

Uh, can't figure out how to expand the console.  I've tried both putty in Windows and a linux terminal in Ubuntu.  In putty, setting the window settings had no effect in the output of ps (still truncated) and selecting 132x43 before ssh'ing had the same effect.  Is that a setting on the router?

Thanks...

Its busybox ps, it does not support wide output.
I usually use the following command to obtain a full commandline:

for x in $(pidof dropbear); do tr '\0' ' ' < /proc/$x/cmdline; echo; done

So, it's ps in busybox that is broken?  After (maybe before?) your command above, ls would go past 80 columns.  ps still broken.

Anyway to fix the truncation in ps?  Or, I guess what ps is telling us is how relayd was started.  Any way to get that from a log file?  I assume that is what fizze is after.  I don't see relayd in /etc/init.d.

(Last edited by rmbult01 on 3 Jan 2012, 23:36)

The command above was meant to determine the commandlines.

Relayd:
for x in $(pidof relayd); do tr '\0' ' ' < /proc/$x/cmdline; echo; done

IGMP Proxy:
for x in $(pidof igmproxy); do tr '\0' ' ' < /proc/$x/cmdline; echo; done

etc.

As for ps, it can be fixed by recompiling busybox with the ps wide output feature (CONFIG_BUSYBOX_CONFIG_FEATURE_PS_WIDE)

Oops, got it, and done.  Output revised above.

Sweet, thanks. Turns out my igmpproxy init script was broken. I had to manually remove it and then re-create it.
Then it worked when I restarted the network.

So whoever has problems despite following these instructions: Check your symlinks in /etc/rc.d

Is there any chance this whole igmpproxy thing can be added to the wiki here: http://wiki.openwrt.org/doc/recipes/relayclient ?

I looked at it, but couldn't find a package at the time, so I went for igmpproxy.
Since this is working fine, and I don't use IPTV I have no reason to try it.

Hmm... for whatever reason I can't get it working. I am trying to connect an Airport Express via the wired network to the openwrt pseudo bridge and through the bridge to the media server. (The wireless of the airport express doesn't work stable).

This is my setup:
Server == Main AP --- OpenWRT===AirportExpress

When connecting my laptop to the openwrt switch I do have internet and also the AirportExpress indicates with a green LED that it would be connected OK.

relayd and igmpproxy are up and running.
I do get the following messages in the system log:

Jan 21 20:50:24 OpenWrt user.info igmpproxy[1946]: Updated route entry for 239.255.255.250 on VIF #0
Jan 21 20:50:24 OpenWrt user.notice igmpproxy[1946]: Adding MFC: 192.168.2.1 -> 239.255.255.250, InpVIf: 1
Jan 21 20:51:00 OpenWrt user.notice igmpproxy[1946]: RECV V2 member report   from 192.168.2.103   to 239.255.255.250

Any idea how I can figure out what the problem is?
Thanks in advance!
Max

The system log wont help you there.
Do as we did, and run igmpproxy in foreground to see its output.

AirportExpress uses Bonjour to announce itself, which is a little different from the UPnP broadcasts iirc.
You might also want to look into something called BonjourProxy or mDNS proxy. These programs can bridge DAAP/bonjour etc. between two networks, which is useful to tunnel DAAP through a VPN, for instance.

I followed all the configurations above and outputs:
i got

root@OpenWrt:~# igmpproxy -d /etc/igmpproxy.conf
The origin for route 239.255.255.250 changed from 10.1.1.20 to 10.1.1.234
The origin for route 239.255.255.250 changed from 10.1.1.234 to 10.1.1.153
The origin for route 239.255.255.250 changed from 10.1.1.153 to 10.1.1.181
The origin for route 239.192.152.143 changed from 10.1.1.234 to 10.1.1.181
MRT_DEL_MFC; Errno(2): No such file or directory

but don't see any UPnP behind realyd

(Last edited by maurer on 25 Jan 2012, 09:13)

still need you help with issue above, guys!
thanks