Relayd client receiving no traffic from cable modem/gateway via OpenWrt bridge

I have followed the instrucitons in [This article](http://client router cannot pass the DHCP message between the main router ) and this document a few times now. I am failing. I will try again and document as I go.

                                                                 resources:

Objective: bridged netwrok, one subnet.

Internet gatway:Arris DG3450A>>Netgear Ex6100>>WNDR4300v1>>ubuntu 16.04 workstation.

This setup provides blazing internet speeds the following conditons. We will refer to this setup in the future as NAT mode:
Arris: default settings
ex6100: bridge mode. 2.4g to the Arris and 5g access point. (netgear calls it fast lane technology)
WNDR4300: 5g client mode to ex6100 with nat enabled. This router receives a dhcp address from the arris so the ex6100 seems to be working fine.

I want to convert the wndr4300 from NAT to bridge mode so I can share the printer and NAS for multiple ip security cams. I will refer to this goal as bridge mode.

Things I have tried. I can replace the wndr4300v1 with a v2 and bridging works fine. The v2 is running Netgear factory firmware (openwrt kamikaze bleeding edge r18571). I would just leave it that way but the v2 router drops the signal every 20 minutes or so and takes a couple of minute to reconnect.

Most recently I followed the first article carefully except for order of operations. I did not have logging enabled either.

Right now NAT mode is set up and workingt. v! router also has logging enabled with logs being saved to a USB drive.

Right now I have loging enabled in my wireless config.

> Blockquote

root@wndr4300:~# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ar934x_wmac'
	option htmode 'HT20'
	option disabled '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'HT40'
	option channel '153'
	option country 'US'
	option legacy_rates '1'
	option log_leve '1'

config wifi-iface
	option network 'wwan'
	option ssid 'ARRIS-5249-5G'
	option encryption 'psk2'
	option device 'radio1'
	option mode 'sta'

Here is my current network config file:

root@wndr4300:~# cat /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 'fd25:7162:8a50::/48'

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

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '20:e5:2a:4f:c2:3d'

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

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr '20:e5:2a:4f:c2:3e'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'

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

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

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

config interface 'wwan'
	option proto 'dhcp'

And here is my dhcp file

root@wndr4300:~# cat /etc/config/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'
	option nonwildcard '1'
	option localservice '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'

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'
	option loglevel '4'

First step is to add relayd

root@wndr4300:~# opkg install relayd
Installing relayd (2016-02-07-ad0b25ad-2) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mips_24kc/base/relayd_2016-02-07-ad0b25ad-2_mips_24kc.ipk
Configuring relayd.
root@wndr4300:~# opkg install luci-proto-relay
Installing luci-proto-relay (git-19.079.57770-b99e77d-1) to root...
Downloading http://downloads.openwrt.org/releases/18.06.2/packages/mips_24kc/luci/luci-proto-relay_git-19.079.57770-b99e77d-1_all.ipk
Configuring luci-proto-relay.
root@wndr4300:~# 

To follow order of operations the dhcp needs to be disabled next and the lan ip set to a manual ip outside the main segment. I will first delete the wifi client setup and put it back afterwards so the the order of operations is maintained. I have also set my workstation ip manually.

That is done now.

I re-created the wifi client connection and selected the lan firewall zone.

Next, I created the repeater_bridge interface. I selected the lan firewall zone as instructed and when I hit the save button the following error occurred.

(This turned out to be a result of Openwrt trying to auto select a routing table. When editing the bridge_repeater interface the setting is down at the bottom on the advanced tab. Delete the setting and save immediately.)
and here is what is in my log file right now.

Sat Apr 13 08:10:10 2019 daemon.notice netifd: Interface 'wwan' is disabled
Sat Apr 13 08:10:10 2019 daemon.notice netifd: Interface 'wwan' has link connectivity loss
Sat Apr 13 08:10:10 2019 daemon.notice netifd: wwan (1649): udhcpc: received SIGTERM
Sat Apr 13 08:10:10 2019 daemon.notice netifd: Interface 'wwan' is now down
Sat Apr 13 08:10:10 2019 daemon.warn dnsmasq[1657]: no servers found in /tmp/resolv.conf.auto, will retry
Sat Apr 13 08:10:10 2019 kern.info kernel: [ 5141.963507] wlan1: deauthenticating from a4:2b:8c:86:32:21 by local choice (Reason: 3=DEAUTH_LEAVING)
Sat Apr 13 08:10:11 2019 user.notice mac80211: Failed command: iw phy phy1 set antenna all all
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[1657]: exiting on receipt of SIGTERM
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: started, version 2.80 cachesize 150
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: DNS service limited to local subnets
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify dumpfile
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain test
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain onion
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain localhost
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain local
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain invalid
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain bind
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: using local addresses only for domain lan
Sat Apr 13 08:11:23 2019 daemon.warn dnsmasq[7021]: no servers found in /tmp/resolv.conf.auto, will retry
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: read /etc/hosts - 4 addresses
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: read /tmp/hosts/odhcpd - 0 addresses
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: read /etc/hosts - 4 addresses
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: read /tmp/hosts/odhcpd - 0 addresses
Sat Apr 13 08:11:23 2019 daemon.info dnsmasq[7021]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Apr 13 08:11:25 2019 daemon.info dnsmasq[7021]: read /etc/hosts - 4 addresses
Sat Apr 13 08:11:25 2019 daemon.info dnsmasq[7021]: read /tmp/hosts/odhcpd - 0 addresses
Sat Apr 13 08:11:25 2019 daemon.info dnsmasq[7021]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Apr 13 08:13:59 2019 kern.info kernel: [ 5371.037340] IPv6: ADDRCONF(NETDEV_UP): tmp.radio1: link is not ready
Sat Apr 13 08:17:21 2019 user.notice mac80211: Failed command: iw phy phy1 set antenna all all
Sat Apr 13 08:17:21 2019 kern.info kernel: [ 5572.534256] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Sat Apr 13 08:17:21 2019 daemon.notice netifd: radio1 (9344): Successfully initialized wpa_supplicant
Sat Apr 13 08:17:22 2019 daemon.notice netifd: Interface 'wwan' is enabled
Sat Apr 13 08:17:24 2019 kern.info kernel: [ 5575.937090] wlan1: authenticate with a4:2b:8c:86:32:21
Sat Apr 13 08:17:24 2019 kern.info kernel: [ 5575.953481] wlan1: send auth to a4:2b:8c:86:32:21 (try 1/3)
Sat Apr 13 08:17:24 2019 kern.info kernel: [ 5575.970208] wlan1: authenticated
Sat Apr 13 08:17:24 2019 kern.info kernel: [ 5575.990202] wlan1: associate with a4:2b:8c:86:32:21 (try 1/3)
Sat Apr 13 08:17:24 2019 daemon.notice netifd: Network device 'wlan1' link is up
Sat Apr 13 08:17:24 2019 daemon.notice netifd: Interface 'wwan' has link connectivity
Sat Apr 13 08:17:24 2019 daemon.notice netifd: Interface 'wwan' is setting up now
Sat Apr 13 08:17:24 2019 kern.info kernel: [ 5576.005127] wlan1: RX AssocResp from a4:2b:8c:86:32:21 (capab=0x911 status=0 aid=1)
Sat Apr 13 08:17:24 2019 kern.info kernel: [ 5576.013252] wlan1: associated
Sat Apr 13 08:17:25 2019 daemon.notice netifd: wwan (9462): udhcpc: started, v1.28.4
Sat Apr 13 08:17:25 2019 daemon.notice netifd: wwan (9462): udhcpc: sending discover
Sat Apr 13 08:17:25 2019 kern.info kernel: [ 5576.676754] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Sat Apr 13 08:17:28 2019 daemon.notice netifd: wwan (9462): udhcpc: sending discover
Sat Apr 13 08:17:28 2019 daemon.notice netifd: wwan (9462): udhcpc: sending select for 192.168.0.3
Sat Apr 13 08:17:28 2019 daemon.notice netifd: wwan (9462): udhcpc: lease of 192.168.0.3 obtained, lease time 3600
Sat Apr 13 08:17:28 2019 daemon.notice netifd: Interface 'wwan' is now up
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: reading /tmp/resolv.conf.auto
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain test
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain onion
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain localhost
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain local
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain invalid
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain bind
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using local addresses only for domain lan
Sat Apr 13 08:17:28 2019 daemon.info dnsmasq[7021]: using nameserver 192.168.0.1#53
Sat Apr 13 08:17:28 2019 user.notice firewall: Reloading firewall due to ifup of wwan (wlan1)


  Now I am rebooting the router and setting my workstation ip back to dhcp per the instructions.  Everything should work now.

But it does not.  

Static ip for work station in gateway ip sement fails to connect.  Dhcp addr for workstation receives an ipv6 add but no ipv4 addr and still there is no connection.  

I have switched to  manual ip of the local segment so I can download and post the current config files:


Here are my new config files.

root@wndr4300:~# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ar934x_wmac'
	option htmode 'HT20'
	option disabled '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'HT40'
	option channel '153'
	option country 'US'
	option legacy_rates '1'
	option log_leve '1'
	option disabled '0'

config wifi-iface
	option network 'wwan'
	option ssid 'ARRIS-5249-5G'
	option encryption 'psk2'
	option device 'radio1'
	option mode 'sta'
	option bssid 'A4:2B:8C:86:32:21'
	option key '483485123776'


root@wndr4300:~# cat /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 'fd25:7162:8a50::/48'

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

config device 'lan_dev'
	option name 'eth0.1'
	option macaddr '20:e5:2a:4f:c2:3d'

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

config device 'wan_dev'
	option name 'eth0.2'
	option macaddr '20:e5:2a:4f:c2:3e'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'dhcpv6'

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

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

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

config interface 'wwan'
	option proto 'dhcp'

root@wndr4300:~# cat /etc/config/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'
	option nonwildcard '1'
	option localservice '1'

config dhcp 'lan'
	option interface 'lan'
	option dhcpv6 'server'
	option ra 'server'
	option ignore '1'
	option ra_management '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'
	option loglevel '4'

And here is what has been added to the log file.

at Apr 13 08:29:16 2019 kern.info kernel: [ 6288.145036] wlan1: deauthenticating from a4:2b:8c:86:32:21 by local choice (Reason: 3=DEAUTH_LEAVING)
Sat Apr 13 08:29:17 2019 daemon.notice netifd: Network device 'wlan1' link is down
Sat Apr 13 08:29:17 2019 daemon.notice netifd: Interface 'wwan' has link connectivity loss
Sat Apr 13 08:29:17 2019 daemon.notice netifd: Interface 'wwan' is disabled
Sat Apr 13 08:29:17 2019 daemon.notice netifd: wwan (9462): udhcpc: SIOCGIFINDEX: No such device
Sat Apr 13 08:29:17 2019 daemon.notice netifd: wwan (9462): udhcpc: received SIGTERM
Sat Apr 13 08:29:17 2019 user.notice mac80211: Failed command: iw phy phy1 set antenna all all
Sat Apr 13 08:29:17 2019 kern.info kernel: [ 6289.024997] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Sat Apr 13 08:29:17 2019 daemon.notice netifd: radio1 (9897): Successfully initialized wpa_supplicant
Sat Apr 13 08:29:19 2019 daemon.notice netifd: Interface 'wwan' is enabled
Sat Apr 13 08:29:21 2019 kern.info kernel: [ 6292.661981] wlan1: authenticate with a4:2b:8c:86:32:21
Sat Apr 13 08:29:21 2019 kern.info kernel: [ 6292.678437] wlan1: send auth to a4:2b:8c:86:32:21 (try 1/3)
Sat Apr 13 08:29:21 2019 kern.info kernel: [ 6292.686199] wlan1: authenticated
Sat Apr 13 08:29:21 2019 kern.info kernel: [ 6292.694846] wlan1: associate with a4:2b:8c:86:32:21 (try 1/3)
Sat Apr 13 08:29:21 2019 kern.info kernel: [ 6292.701951] wlan1: RX AssocResp from a4:2b:8c:86:32:21 (capab=0x911 status=0 aid=1)
Sat Apr 13 08:29:21 2019 kern.info kernel: [ 6292.710038] wlan1: associated
Sat Apr 13 08:29:21 2019 daemon.notice netifd: Network device 'wlan1' link is up
Sat Apr 13 08:29:21 2019 daemon.notice netifd: Interface 'wwan' has link connectivity
Sat Apr 13 08:29:21 2019 daemon.notice netifd: Interface 'wwan' is setting up now
Sat Apr 13 08:29:21 2019 daemon.notice netifd: wwan (10056): udhcpc: started, v1.28.4
Sat Apr 13 08:29:21 2019 daemon.notice netifd: wwan (10056): udhcpc: sending discover
Sat Apr 13 08:29:22 2019 kern.info kernel: [ 6293.200691] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Sat Apr 13 08:29:24 2019 daemon.notice netifd: wwan (10056): udhcpc: sending discover
Sat Apr 13 08:29:24 2019 daemon.notice netifd: wwan (10056): udhcpc: sending select for 192.168.0.3
Sat Apr 13 08:29:25 2019 daemon.notice netifd: wwan (10056): udhcpc: lease of 192.168.0.3 obtained, lease time 3600
Sat Apr 13 08:29:25 2019 daemon.warn dnsmasq[7021]: no servers found in /tmp/resolv.conf.auto, will retry
Sat Apr 13 08:29:25 2019 daemon.notice netifd: Interface 'wwan' is now up
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: reading /tmp/resolv.conf.auto
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain test
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain onion
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain localhost
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain local
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain invalid
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain bind
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using local addresses only for domain lan
Sat Apr 13 08:29:25 2019 daemon.info dnsmasq[7021]: using nameserver 192.168.0.1#53
Sat Apr 13 08:29:25 2019 user.notice firewall: Reloading firewall due to ifup of wwan (wlan1)
Sat Apr 13 08:35:55 2019 daemon.info procd: - shutdown -
Sat Apr 13 08:35:56 2019 authpriv.info dropbear[895]: Early exit: Terminated by signal
Sat Apr 13 08:35:56 2019 authpriv.info dropbear[2208]: Exit (root): Terminated by signal
Sat Apr 13 08:35:56 2019 authpriv.info dropbear[2234]: Exit (root): Terminated by signal
root@wndr4300:~# 

netstat -lnp
ps -w | grep relayd ( or ps -aux )

If I decide to try again I will try that and post my results. It seems like I should work towards batman-adv if I want control of osi layer 2 and integration of various routers with various chipsets.

1 Like