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've got a media server in my main network.

I want to allow my tv and other devices to see the media center. These devices have lan ports, but not wifi.

I have a bufallo wzr hp g300 with OpenWrt on it.

Will it be possible to use the buffallo to connect to my main network wifi, then plug in the tv etc to it and have them see the media center?

If so what's the best way to go about it?

there was post in this forum how to use OpenVPN tunnel to route multicast packets.
I tried that and it worked. but I prefer my current solution where wl500gp works as client bridge.

I'd love to here more about your setup.

I've got a tv with a LAN port and a spare wireless router.

My main goal is to allow the tv to see the media server on my main wireless network.

I've got relayd setup. All seems to work, but can't see the media center from the tv.

I can see the media center if the tv is plugged directly into the main router via ethernet cable.

I don't think WDS is an option because the 2 routers are different chipsets.

Will gargoyle run on my Buffalo?

ProggerPete wrote:

I don't think WDS is an option because the 2 routers are different chipsets.

It should work if both install OpenWrt.

The main router is a FritzBox 7390, doesn't seem to be in the supported list.

Download Gargoyle 1.3.x (Backfire trunk, I think) and upgrade from LuCI web GUI.

Download Gargoyle 1.3.x (Backfire trunk, I think) and upgrade from LuCI web GUI.

Just to confirm, you're talking about putting Gargoyle on the Buffalo right?

Also is ARPNAT different to what relayd is doing? Do I use ARPNAT along side relayd or do I replace relayd with ARPNAT?

I'm guessing the best way to go would be to reset the buffalo openwrt install back to defaults, then upgrade to gargoyle via luci?

(Last edited by ProggerPete on 28 May 2011, 05:31)

Either ARPNAT or relayd, not both.

Download Gargoyle 1.3.x sysupgrade image and upgrade from LuCI web GUI. Do not preserve configuration. You can revert to OpenWrt at anytime.

So I've installed Gargoyle on the router and set it up as a wireless bridge/repeater. The set up process for this was very easy.

A laptop plugged into the router can see the internet which is great.

However, my pc connected to the main router cannot ping the laptop or the buffalo router.

If I plug my tv into the router it still cannot see the media server and also cannot access the web.

I suspect ARPNAT is an additonal thing I need to get and install, but I can't figure out where to get it from. If it is part of the base gargoyle image (1.3.14) then I can't find where to turn it on.

(Last edited by ProggerPete on 28 May 2011, 13:06)

Not having much luck. Without changing anything I've lost the internet on the laptop. Makes me wonder if I tricked myself into believing it was working in the first place. Maybe I forgot to turn off the wifi.

The laptop connected to the buffalo does not get assigned an ip.

The wireless config on the buffalo is.

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'macaddr' '00:24:a5:b0:02:63'
        option 'hwmode' '11ng'
        option 'htmode' 'HT20'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'channel' '2'

config 'wifi-iface' 'cfg2'
        option 'device' 'radio0'
        option 'network' 'lan'
        option 'mode' 'sta'
        option 'client_bridge' '1'
        option 'ssid' 'Fritz'
        option 'encryption' 'psk2'
        option 'key' 'secretkey'

config 'wifi-iface' 'cfg3'
        option 'device' 'radio0'
        option 'network' 'lan'
        option 'mode' 'ap'

It looks like the client_bridge option is set to 1 automatically.

I've tried reseting back to default config and setting it up as a wireless bridge again. Still in the same boat, no ip to the laptop.

The Buffalo itself is connected to the fritzbox though, it can ping google and do other internetty type things.

Not sure where to go from here.

I suggest that you install relayd on RC5-testing or Bleeding edge and output the network, wireless and firewall configurations.

Sorry for being so slow. I had a go at getting relayd back up and failed my first attempt. I didn't get a chance for another go till now.

It's back up working as a relay now, I just can't see the media server on my fritz.box 7390.

Config looks like.

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'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'ipaddr' '192.168.2.1'

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'proto' 'dhcp'

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

config 'switch_vlan'
        option 'device' 'rtl8366s'
        option 'vlan' '1'
        option 'ports' '0 1 2 3 5'

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

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

WIRELESS

config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'channel' '2'
        option 'macaddr' '00:24:a5:b0:02:63'
        option 'hwmode' '11ng'
        option 'htmode' 'HT20'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'disabled' '0'

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

FIREWALL

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        option network  'lan'
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT

config zone
        option name             wan
        option network  'wan'
        option input    REJECT
        option output   ACCEPT
        option forward  REJECT
        option masq             1
        option mtu_fix  1

config forwarding
        option src      lan
        option dest     wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family   ipv4

#Allow ping
config rule
        option src wan
        option proto icmp
        option icmp_type echo-request
        option target ACCEPT

# include a file with users custom iptables rules
config include
        option path /etc/firewall.user


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  00:11:22:33:44:66
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp


### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port 80
#       option dest             wan
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp

(Last edited by ProggerPete on 4 Jun 2011, 16:14)

You didn't define "wwan" in firewall.

Routed Client with relayd (Pseudobridge) - OpenWrt Wiki - Step 5: Adjust the firewall

Edit:
BTW, I believe that you had connected the uplink cable from the main router to the wan port of WZR-HP-G300NH. In such case, it is called "Routed Client - Using MASQUERADE".

As for Relay Client, since it relays between lan and wwan which is the WiFi interface, you should connect the uplink cable to the lan port of WZR-HP-G300NH.

(Last edited by fyi on 5 Jun 2011, 00:36)

You're right, I missed it. Have added it now, though it hasn't changed anything that I've noticed.

I believe that you had connected the uplink cable from the main router to the wan port of WZR-HP-G300NH

There is no cable connection between the FritzBox (main router) and the Buffalo (relay router). The main thing I'm trying to achieve is wireless streaming of movies from the main network to the tv (which only has a lan port).

So I have

FritzBox => WIFI => Buffalo => LAN/CABLE => TV

Oh! I almost forgot what a relay client is.

Please run "ifconfig ; iwconfig wlan0 ; uci export dhcp ; uci export firewall".

Regardless of outcome, I want to say thanks a ton for helping out.

Here's what I got from the commands u mentioned.

root@OpenWrt:/bin# ifconfig ; iwconfig wlan0 ; uci export dhcp ; uci export firewall
br-lan    Link encap:Ethernet  HWaddr 00:24:A5:B0:02:63
          inet addr:192.168.2.1  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:533 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2010 (1.9 KiB)  TX bytes:43517 (42.4 KiB)

eth0      Link encap:Ethernet  HWaddr 00:24:A5:B0:02:63
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:534 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2520 (2.4 KiB)  TX bytes:44560 (43.5 KiB)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr 00:24:A5:B0:02:64
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5

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:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:24:A5:B0:02:63
          inet addr:192.168.1.28  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2791 errors:0 dropped:0 overruns:0 frame:0
          TX packets:784 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:577453 (563.9 KiB)  TX bytes:152238 (148.6 KiB)

wlan0     IEEE 802.11bgn  ESSID:"Fritz"
          Mode:Managed  Frequency:2.417 GHz  Access Point: BC:05:43:A8:59:A9
          Bit Rate=270 Mb/s   Tx-Power=27 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=59/70  Signal level=-51 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:6  Invalid misc:126   Missed beacon:0

package 'dhcp'

config 'dnsmasq'
        option 'domainneeded' '1'
        option 'boguspriv' '1'
        option 'filterwin2k' '0'
        option 'localise_queries' '1'
        option 'rebind_protection' '1'
        option 'rebind_localhost' '1'
        option 'local' '/lan/'
        option 'domain' 'lan'
        option 'expandhosts' '1'
        option 'nonegcache' '0'
        option 'authoritative' '1'
        option 'readethers' '1'
        option 'leasefile' '/tmp/dhcp.leases'
        option 'resolvfile' '/tmp/resolv.conf.auto'

config 'dhcp' 'lan'
        option 'interface' 'lan'
        option 'start' '100'
        option 'limit' '150'
        option 'leasetime' '12h'
        option 'ignore' '1'

config 'dhcp' 'wan'
        option 'interface' 'wan'
        option 'ignore' '1'

package 'firewall'

config 'defaults'
        option 'syn_flood' '1'
        option 'input' 'ACCEPT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'

config 'zone'
        option 'name' 'lan'
        option 'input' 'ACCEPT'
        option 'output' 'ACCEPT'
        option 'forward' 'ACCEPT'
        option 'network' 'lan wwan'

config 'zone'
        option 'name' 'wan'
        option 'network' 'wan'
        option 'input' 'REJECT'
        option 'output' 'ACCEPT'
        option 'forward' 'REJECT'
        option 'masq' '1'
        option 'mtu_fix' '1'

config 'forwarding'
        option 'src' 'lan'
        option 'dest' 'wan'

config 'rule'
        option 'src' 'wan'
        option 'proto' 'udp'
        option 'dest_port' '68'
        option 'target' 'ACCEPT'
        option 'family' 'ipv4'

config 'rule'
        option 'src' 'wan'
        option 'proto' 'icmp'
        option 'icmp_type' 'echo-request'
        option 'target' 'ACCEPT'

config 'include'
        option 'path' '/etc/firewall.user'
ProggerPete wrote:
wlan0     IEEE 802.11bgn  ESSID:"Fritz"
          Mode:Managed  Frequency:2.417 GHz  Access Point: BC:05:43:A8:59:A9
          Bit Rate=270 Mb/s   Tx-Power=27 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=59/70  Signal level=-51 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:6  Invalid misc:126   Missed beacon:0

The "Tx excessive retries:6  Invalid misc:126" looks weird and the traffic passed through br-lan is so low compared to wlan0.

Please run,

wifi down
uci set wireless.radio0.txpower=20
uci set wireless.radio0.hwmode=11g
wifi up

The above code is not permanent. I just want to check if it's a driver issue.

Wait a few seconds and run "ping -c 4 192.168.1.1 ; ifconfig ; iwconfig wlan0 ; route -n".

I install Backfire RC5-testing brcm47xx build on my ASUS WL-HDD2.5; follow the wiki to setup relayd and it works just fine.

root@OpenWrt:~# ifconfig wlan0 ; iwconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:15:F2:XX:XX:XX
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:191 errors:0 dropped:0 overruns:0 frame:0
          TX packets:272 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:87373 (85.3 KiB)  TX bytes:30951 (30.2 KiB)

wlan0     IEEE 802.11bg  ESSID:"xxxxxxxx"
          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:18:84:XX:XX:XX
          Bit Rate=36 Mb/s   Tx-Power=10 dBm
          RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=68/70  Signal level=-42 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:75   Missed beacon:0

And I made a small change to /etc/config/network,

config 'interface' 'wwan'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.253'
        option 'netmask' '255.255.255.0'
        option 'gateway' '192.168.1.1'
        option 'dns' '8.8.8.8 8.8.4.4'

so the ip address of the pseudo bridge can be statically fixed.

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.

(Last edited by fizze on 11 Jul 2011, 17:22)

I never found a solution. When I find myself with the time and energy I plan on just installing a media server on client router.

If you do find a way to get it work I'd be very interested to know how.