Computer has internet access while router does not. Other confusion

I want to get rid of the proprietary firmware that came with my gl.inet router. So I am trying to suss out how to do some of the configurating it was handling for me.

This computer on which I am posting is connected to the internet via this router (then via another router). Here I am, on the world wide web information super highway.

Yet from the device itself (LuCI or ssh) I am unable to successfully ping either a domain name or name server. Can't update opkg or reach the time server.

I thought I did a factory reset to this which I think should have left me unable to do anything (as it did hours ago the first time). So I am very confused as to how I have even got here.

Backup was made just before embarking on this but there is something wrong with it and I can't properly restore with it. Other things are wrong. But are the files /etc/config/network and /etc/config/dhcp the ones to look at for getting generally connectivity back to normal?

I doubt there is enough information here to get a total solution but I am not sure what to look at.

Does anyone have a hint?

I am able to somewhat make progress editing /etc/config/network/ and /etc/config/dhcp to match what it was previously. But I keep encountering a problem whereby I am unable to get through password authentication in web interface once changes applied. I can get to ssh so I know I have correct creds. Then further changes break even that.

Here is my record of what I did to bring this about (to default everything reset):

uci del dhcp.lan.ra
uci del dhcp.lan.dhcpv6
uci set dhcp.lan.start='2'
uci set dhcp.lan.limit='253'
uci set dhcp.lan.force='1'
uci set dhcp.lan.netmask=''
uci set network.lan.ifname='eth0 eth0.1 eth1'
uci set network.lan.ipaddr=''
uci set network.lan.broadcast='' 
uci set network.lan.ip6hint='0'
uci set network.lan.ip6ifaceid='::1'
uci set network.wan.ifname='eth0'
uci set network.wan.metric='10'
uci set network.wan6.reqaddress='try'
uci set network.wan6.reqprefix='auto'

Typical reason is that you are trying to avoid double nat, have gone halfway toward dumb AP setup, but you have not yet provided that gateway and DNS server address parameters for its LAN interface config.

(The computer gets its gateway via DHCP, but the secondary router with a fixed IP (but without DHCP on wan) requires you to tell it where the route to internet starts.)


Oh yes the web interface would not allow me to specify the gateway. Unfortunately I don't seem to have the error recorded. It did not like the value I was inputting which was, the value it was previously. So I thought I would go ahead and change it afterwards once the rest was set up.

One nice thing about the command line is that it's very easy to log things done and the results in case you need them later.