Wifi devices stuck at obtaining IP address

Hi,

I'm currently having trouble accessing the Internet via wifi on my Fritz.box 7430.
As the router does not have a WAN port, I reconfigured one of the LAN ports.
I'm connected to the internet via regular ethernet, my ISP gives me a static IP address.

This is the output of my /etc/config/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 '****:****:****::/48'
                                          
config atm-bridge 'atm'                   
        option vpi '1'                    
        option vci '32'                   
        option encaps 'llc'               
        option payload 'bridged'          
        option nameprefix 'dsl'           
                                          
config dsl 'dsl'                          
        option annex 'b'                  
        option tone 'av'                  
        option ds_snr_offset '0'          
                                          
config device                             
        option name 'br-lan'              
        option type 'bridge'              
        option igmp_snooping '1'          
        list ports 'eth0'                 
        list ports 'eth0.2'               
                                          
config device                             
        option name 'eth0.1'              
        option macaddr '38:10:**:**:**:**'
                                      
config interface 'lan'                
        option proto 'static'         
        option netmask '255.255.255.0'
        option ip6assign '60'      
        option device 'eth0.2'     
        option type 'bridge'       
        option ipaddr '192.168.1.1'
                                
config interface 'wan'          
        option proto 'dhcp'     
        option device 'eth0.1'  
        option type 'bridge' 

config interface 'wan6'                   
        option device '@wan'              
        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 '6t 3'               
        option vid '1'                    
        option description 'WAN'          
                                      
config switch_vlan                    
        option device 'switch0'       
        option vlan '2'               
        option ports '6t 4 5 2'    
        option vid '2'             
        option description 'LAN'   
                                   
config device                   
        option name 'eth0.2'    
        option type '8021q'     
        option ifname 'eth0'    
        option vid '2'          
        option acceptlocal '1'  
        option multicast '0'    

Using this config, the router does have access to the internet, connected devices via LAN also have internet.

This is the my /etc/config/wireless (no encryption for now to rule this out as a potential problem):

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
        option hwmode '11g'
        option country 'DE'
        option cell_density '0'
        option htmode 'HT20'
        option channel 'auto'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
        option network 'lan'

On my android phone, selecting the OpenWrt ssid gets me stuck at obtaining IP address. If I manually set one (e.g. 192.168.1.112) I do get a connection, but no internet access.

Could someone give me a pointer to what I am doing wrong? I'm really new to all of this networking stuff, so I probably got some of the terminology wrong.
I guess this has something to do with a wrong DHCP setup? Or maybe a firewall issue? I didn't change any of the defaults there though.

Thank you!

Static IP usually means you need to add the DNSes manually, this applies to the phone, and to the openwrt device.

1 Like

Thanks for the reply! I tried setting the DNS manually to 1.1.1.1 on the router and on the phone, but still get no connection.
If this would be an DNS issue, wouldn't this mean that the devices connected via LAN also should not have internet access (but they do)?

It might be a good idea to look over the OpenWRT Quick Start Guide and the User Guide...

1 Like

Thanks, that's exactly what I did!
While the documentation is good and extensive, it cannot cover every possible use case.
So if you can tell what's going wrong here, a pointer to the possible cause would be much appreciated.

I would take a look at the sections in the docs on DHCP, and wireless setup.

I just got it working. For anyone who has a similar problem in the future:
I just did a factory reset and reconfigured everything and it worked out of the box.
These are the contents of the /etc/config/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 '****:****:****::/48'

config atm-bridge 'atm'
	option vpi '1'
	option vci '32'
	option encaps 'llc'
	option payload 'bridged'
	option nameprefix 'dsl'

config dsl 'dsl'
	option annex 'b'
	option tone 'av'
	option ds_snr_offset '0'

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

config device
	option name 'eth0.1'
	option macaddr '**:**:**:**:**:**'

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

config device
	option name 'dsl0'
	option macaddr '**:**:**:**:**:**'

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

config interface 'wan6'
	option device '@wan'
	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 '6t 4 5 2'
	option vid '1'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '6t 3'
	option vid '2'
	option description 'WAN'

And the /etc/config/wireless:

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option htmode 'HT20'
	option cell_density '0'
	option hwmode '11g'
	option channel 'auto'
	option country 'DE'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'
        option network 'lan'

I'm not sure why it wasn't working before, the only differences I can spot are a.) the WAN port was on VLAN 1, now it is on VLAN 2, which I believe was a bit unusual and b.) the LAN device was 'eth0.2' instead of 'br-lan'. If I had to bet this was probably the main culprit.

1 Like

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