No internet connection from the router via ssh from time to time

Thanks a lot jeff, didn't know that this was so much effort, It works with R7800, but ....

root@R7800:~# ntpq
ntpq> pe
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*time.conova.com .GPS.            1 u   61   64   37   30.754   -0.672   0.497
+srv23.globale-g 131.188.3.221    2 u  100   64   36   48.956    0.411   1.895
-193.170.62.252  130.149.17.21    2 u   64   64   13   36.366   -0.404   0.636
+vpn.oe9hamnet.a .PPS.            1 u   27   64   77   44.723   -1.060   0.181

To check, if the wds-client works, I thought I compare:

root@R7800:~# nmap -sn 192.168.178.0/24 | grep -i "hosts up"
Nmap done: 256 IP addresses (11 hosts up) scanned in 10.75 seconds

But on the Archer C7, there is something wrong, probably DNS. The main difference on the server was that I have now "option dns", which was not found in the config files before, although I entered values.

root@R7800:~# grep -r "178\.1" /etc/
/etc/config/network:	option gateway '192.168.178.1'
/etc/config/network:	option dns '192.168.178.1'
grep: /etc/localtime: No such file or directory
grep: /etc/ppp/resolv.conf: No such file or directory

The question is, should I use "Use custom DNS servers" at http://192.168.178.59/cgi-bin/luci/admin/network/network/lan or DNS forwardings at http://192.168.178.59/cgi-bin/luci/admin/network/dhcp

root@archerc7v5:~# grep -r "178.1" /etc/
/etc/config/network: option dns '192.168.178.1'

Should I use the wds-master as gateway or the Fritzbox, which is gateway to the internet.

root@archerc7v5:~# grep -r "178\.55" /etc/
/etc/config/network:	option gateway '192.168.178.55'

Confused, before a reboot of the rooter it didn't work with the name, but with the ip:

root@archerc7v5:~# ping -c2 139.59.209.225
PING 139.59.209.225 (139.59.209.225): 56 data bytes
64 bytes from 139.59.209.225: seq=0 ttl=55 time=46.990 ms
64 bytes from 139.59.209.225: seq=1 ttl=55 time=46.598 ms
root@archerc7v5:~# ping -c2 openwrt.org
PING openwrt.org (139.59.209.225): 56 data bytes
64 bytes from 139.59.209.225: seq=0 ttl=55 time=46.720 ms
64 bytes from 139.59.209.225: seq=1 ttl=55 time=46.850 ms

Looks like, the client is ok now too:

root@archerc7v5:~# ntpq
ntpq> pe
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*80.64.136.37    131.130.250.250  2 u    4   64    1   34.750    9.553   0.219
+193.170.62.252  131.188.3.222    2 u    5   64    1   41.942   10.637   0.711
-185.9.19.142    89.109.251.21    2 u    5   64    1   81.807   -1.373   0.800
+extern4.nemox.n 80.92.126.65     3 u    6   64    1   43.313    8.850   0.505

Number of clients are the same:

root@archerc7v5:~# nmap -sn 192.168.178.0/24 | grep -i "hosts up"
Nmap done: 256 IP addresses (11 hosts up) scanned in 8.19 seconds

Could you please check the config files of the wds-client:

Network:

root@archerc7v5:~# 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 '....-....-....::/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.178.59'
	option stp '1'
	option dns '192.168.178.1'
	option gateway '192.168.178**.55**'

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

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

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

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

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

config interface 'wwan'
	option proto 'none'

DHCP:

root@archerc7v5:~# cat /etc/config/dhcp 

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

config dhcp 'lan'
	option interface 'lan'
	option ignore '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'

Both of your OpenWrt routers are LAN devices the same as your PCs or phones. All of your LAN devices should point to the Fritzbox as the gateway and DNS server.

I like to make the LAN a DHCP client so it automatically follows what the main router tells it. You can use hostnames or check the DHCP table in the main router to find the IP address of your OpenWrt devices. This of course requires a reliable connection to a main router DHCP server.

  • option hostname must be specified in the network config of the DHCP client network for it to be broadcast in a DHCP request and made available to the main router. The /etc/config/system hostname is not automatically used.

Thank you, not sure if I understood you right.

Do you mean, nothing at wds-client (.59) should point to the wds-master (.55)?

I have now:

root@archerc7v5:~# grep -r "178\.1" /etc/
/etc/config/network:	option dns '192.168.178.1'
/etc/config/network:	option gateway '192.168.178.1'
...

root@archerc7v5:~# grep -r "178\.55" /etc/
grep: /etc/localtime: No such file or directory
grep: /etc/ppp/resolv.conf: No such file or directory

From the results I see no difference, no idea if it is now faster.

Did I change it as you thought I should do? Thanks!

Maybe it should be mentioned at https://openwrt.org/docs/guide-user/network/wifi/atheroswds , that the confiugartion could be different, if the master-ap is not the gateway to the internet.

The WDS AP is working as a layer 2 bridge, it doesn't look at IP addresses on the way through. It takes traffic from wireless and sends it on to the cable to the Fritzbox. This is done at the MAC address level.

Thanks, I think I mark this thread as solved now, although there will be the next step with this configuration now. I want to include IoT, like a washing machine with a guest network.

Please discuss here: Guest network for washing machine, etc

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.