[Solved] Wifi up, cannot connect with any device (even with cable)

You're a genious! It works! I tried to set a static IP address on one laptop and left my phone and another laptop with a dynamic IP address.
I turn on the gl inet (without ethernet) and only the laptop with static IP address connects successfully! The other two are stuck connecting.
This is my /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 'fddc:960a:8c2d::/48'

config interface 'lan'
	option custom_dns '1'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option hostname 'openwrthost'
	option type 'bridge'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.8.1'

config interface 'wan'
	option custom_dns '1'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option hostname 'openwrthost'
	option ifname 'eth0'
	option proto 'dhcp'

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

config interface 'wwan'
	option custom_dns '1'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option proto 'dhcp'

/etc/config/dhcp:

config dnsmasq
	list server '8.8.4.4'
	list server '8.8.8.8'
	option noresolv '1'
	option dnssec '1'
	option dnsseccheckunsigned '1'
	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'
	option proxydnssec '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'
	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'

If I remember correctly, I don't think you need those two options in your Lan config. Also you are adding DNS servers everywhere you find a DNS option. That may be an over-kill in my opinion. If you are using a DHCP server on your router then just configure your DNS addresses in Network -> DHCP and DNS in LuCI or list server option in dnsmasq and leave all other DNS options to default or empty.

Maybe something like this would help you. Network:

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

config atm-bridge 'atm'
   option vpi '0'
   option vci '103'
   option encaps 'llc'
   option payload 'bridged'
   option nameprefix 'dsl'

config dsl 'dsl'
   option xfer_mode 'atm'
   option line_mode 'adsl'
   option annex 'a2p'
   option ds_snr_offset '-10'

config interface 'ptcl'
   option ifname 'eth0.2'
   option proto 'dhcp'
   option delegate '0'
   option defaultroute '0'

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

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 4 6t'

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

config interface 'vpnclient'
   option ifname 'tun0'
   option proto 'none'

I don't use ipv6 so you may need to adapt it to your needs. But I would suggest to remove the above 2 options from all the interfaces that have them. Your dhcp config seems okay so far but add option force '1' in Lan section in DHCP config. Apply the changes or reboot the router and then see how it goes.

1 Like

It's working! Thank you so so much! I'll dig into why those settings are not to be used now that I have a working connection :blush: thanks!

Those 2 options only get used in a pppoe sort-of connection or maybe WAN in case you use ADSL/VDSL or a Bridged Modem. Lan section does not need them because you can just specify the DNS with option dns 'x.x.x.x'. If you look in LuCI, Network -> Interfaces, you may find it helpful to configure the network from there and then look at the config files in code.

It is always advisable not to use DNS addresses everywhere, if you have a central DHCP server. Because that DHCP server will be handling everything relating to DNSs and IPs. It may be noted that some ISPs do not allow the use of custom DNS addresses with their connections and internet might not work if you change them in the source connection. So it will be a lot of help if you change them in DHCP rather than in the WAN config.

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