After setup no internet access and no connection between interfaces

I just installed the ROM fresh and can't access the internet. Also, I can't access the WAN router (192.168.100.1) from a client in the LAN network (192.168.210.0).

So, I think there is something wrong with the config of the interfaces and possibly DNS.

I provide the following info from my configuration which I hope can be helfpul to you.

root@OpenWrt:~# ubus call system board; \
> uci export network; uci export wireless; \
> uci export dhcp
{
	"kernel": "5.10.138",
	"hostname": "OpenWrt",
	"system": "ARMv7 Processor rev 5 (v7l)",
	"model": "AVM FRITZ!Box 4040",
	"board_name": "avm,fritzbox-4040",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "22.03.0",
		"revision": "r19685-512e76967f",
		"target": "ipq40xx/generic",
		"description": "OpenWrt 22.03.0 r19685-512e76967f"
	}
}
package network

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

config globals 'globals'
	option ula_prefix 'xxxxxx'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.210.1'

config interface 'wan'
	option device 'eth1'
	option proto 'static'
	option ipaddr '192.168.100.35'
	option gateway '192.168.100.1'

config interface 'wan6'
	option device 'eth1'
	option proto 'static'
	list ip6addr 'xxxxxxxxxxxxx'

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 0'

package wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/a000000.wifi'
	option channel '1'
	option band '2g'
	option htmode 'HT20'
	option cell_density '0'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'sae'
	option key 'xxxxxx'
	option ssid 'xxxx'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/a800000.wifi'
	option channel '36'
	option band '5g'
	option htmode 'VHT80'
	option cell_density '0'
	option disabled '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option encryption 'sae'
	option key 'xxxxxx'
	option ssid 'xxxx'

package 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 authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'
	list server 'xxx'
	list server 'xxx'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'

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

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

You are missing the subnet mask and dns from the wan interface.

	option netmask '255.255.255.0'
	option dns '192.168.100.1'

(Assuming 192.168.100.1 hosts dns services)

1 Like

Or you can just simple write the address as CIDR. ipaddr is not only valid as option but also as list, like when you want to assign multiple addresses on an interface, like with or on lo. Nevertheless you are right about that the mask was/is missing in the config.

1 Like

Ok, with diagnostics in OpenWRT I can ping a webpage successfully once I entered options netmask and dns.

But connecting with a client it seems I don't get an IP assigned. The client keeps trying to connect but no connection is made.

Is the client device wired or wireless?

1 Like

the connetion is wired.

Try restarting the router and unplug the computer. Plug the computer back in again after the router has fully booted. Make sure the computer is set to get an ip using dhcp.

1 Like

the connection is working! thank you for your guidance!

Great!

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

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