OpenWrt Forum Archive

Topic: Bug in relayd?

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

Hello!

My device is old TP-Link TL-WR740N v4.21 with OpenWrt 15.05.1, r48532. I have configured it to work as relayd repeater and it's works just fine, except one thing... After some time I can't use ping / opkg / wget / any app that use DNS (I guess), its just says: "ping: bad address 'dev.openwrt.org'" bla bla.

But, just after I restart relayd with "/etc/init.d/relayd restart" things became to work, for some time) So I put this line to cron (0 */3 * * * /etc/init.d/relayd restart), and its helps.

So, the question is: is it a bug, or I just doing wrong? )

My config:

/etc/config/dhcp

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

config dhcp 'lan'
        option interface 'lan'
        option ignore '1'
        list dns '192.168.0.1'

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

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

/etc/config/firewall

config defaults
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

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

config include
        option path '/etc/firewall.user'

/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 globals 'globals'
        option ula_prefix 'fd1f:e100:f7c5::/48'

config interface 'lan'
        option _orig_iframe 'eth0 wlan0-1'
        option _orig_bridge 'true'
        option ifname   'eth0 eth1'
        option force_link '1'
        option type     'bridge'
        option proto    'static'
        option ipaddr   '192.168.2.1'
        option netmask  '255.255.255.0'
        option gateway  '192.168.0.1'
        option dns      '192.168.0.1'
        option ip6assign '60'

config interface 'wwan'
        option proto 'static'
        option ipaddr '192.168.0.2'
        option netmask '255.255.255.0'
        option gateway '192.168.0.1'
        option dns '192.168.0.1'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 4'

/etc/config/wireless

config wifi-device 'radio0'
        option type     'mac80211'
        option channel  'auto'
        option hwmode   '11g'
        option path     'platform/ar933x_wmac'
        option htmode   'HT20'
        option txpower  '17'
        option country  'UA'
        option disabled '0'

config wifi-iface
        option device 'radio0'
        option network 'wwan'
        option mode 'sta'
        option ssid 'WEB'
        option encryption 'psk2+ccmp'
        option key '********'

config wifi-iface
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'psk2+ccmp'
        option key '********'

(Last edited by matasar.ei on 27 Jul 2017, 08:15)

Yes, I see the same issue.

bump it up :-)

i use relayd on three routers here and I do not experience those problems, but I'm using a way newer version of openwrt/lede.  If you can upgrade to a newer version that may help.  Also consider using luci-proto-relay for configuring the bridge as it is far simpler to configure in luci.

That being said I'm not certain your interface names are correct typically you need to use like eth0.1 but given the version difference and the differences between routers i'm not 100% sure of that.

Are you getting any messages in the logs when things fail?

if you ssh to the router while broken and try nslookup what do you see?

Here is my network file:

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

config globals 'globals'
        option ula_prefix 'fd95:3c65:ccdf::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.205.205'
        option gateway '192.168.32.1'
        option dns '192.168.32.1'
        option delegate '0'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

config interface 'br0'
        option proto 'relay'
        list network 'lan'
        list network 'wlan0'
        option delegate '0'

config interface 'wlan0'
        option proto 'dhcp'
        option delegate '0'

I guess I need to upgrade my bridge router. Because current CC works perfectly stable with TP-Link WDR4300 I stay on CC for long time.

@WWTK, thank you! LEDE works. It looks LEDE fix a lot issues for the newer sw package. I am gonna move all my routers to LEDE. :-)

The discussion might have continued from here.