Problem with internet connection on LEDE 17.01

I'm trying to download hostapd_cli but i cant do opkg update.
I can't do ping 8.8.8.8 neither so i supose i dont have internet connection or my interface is not well configured. I can't figure out what is wrong with my router.
I do have wifi connection.

this is /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 'fdc0:55b5:84e0::/48'

config interface 'lan'
        option type 'bridge'
        option proto 'static'
        option ip6assign '60'
        option _orig_ifname 'eth0.1 wlan0'
        option _orig_bridge 'true'
        option ifname 'eth0.1'
        option ipv6 '0'
        option dns '8.8.8.8'
        option gateway '192.168.0.1'
        option ipaddr '192.168.1.254'
        option netmask '255.255.0.0'
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 3 5t' 

192.168.0.1 is the ip of my main router.

This is mi /etc/config/firewall

                                                                             
config defaults                                                                 
        option syn_flood '1'                                                    
        option input 'ACCEPT'                                                   
        option output 'ACCEPT'                                                  
        option forward 'REJECT'                                                 
                                                                                
config zone                                                                     
        option name 'lan'                                                       
        list network 'lan'                                                      
        option input 'ACCEPT'                                                   
        option output 'ACCEPT'                                                  
        option forward 'ACCEPT'                                                 
                                                                                
config zone                                                                     
        option name 'wan'                                                       
        list network 'wan'                                                      
        list network 'wan6'                                                     
        option output 'ACCEPT'                                                  
        option input 'REJECT'                                                   
        option forward 'REJECT'                                                 
        option masq '1'                                                         
        option mtu_fix '1'                                                      
                                                                                
config forwarding                                                               
        option src 'lan'                                                        
        option dest 'wan'                                                       
                                                                                
config rule                                                                     
        option name 'Allow-DHCP-Renew'                                          
        option src 'wan'                                                        
        option proto 'udp'                                                      
        option dest_port '68'                                                   
        option target 'ACCEPT'                                                  
        option family 'ipv4'                                                    
                                                                                
config rule                                                                     
        option name 'Allow-Ping'                                                
        option src 'wan'                                                        
        option proto 'icmp'                                                     
        option icmp_type 'echo-request'                                         
        option family 'ipv4'                                                    
        option target 'ACCEPT'                                                  
                                                                                
config rule                                                                     
        option name 'Allow-IGMP'                                                
        option src 'wan'                                                        
        option proto 'igmp'                                                     
        option family 'ipv4'                                                    
        option target 'ACCEPT'
config rule                                                                     
        option name 'Allow-DHCPv6'                                              
        option src 'wan'                                                        
        option proto 'udp'                                                      
        option src_ip 'fc00::/6'                                                
        option dest_ip 'fc00::/6'                                               
        option dest_port '546'                                                  
        option family 'ipv6'                                                    
        option target 'ACCEPT'                                                  
                                                                                
config rule                                                                     
        option name 'Allow-MLD'                                                 
        option src 'wan'                                                        
        option proto 'icmp'                                                     
        option src_ip 'fe80::/10'                                               
        list icmp_type '130/0'                                                  
        list icmp_type '131/0'                                                  
        list icmp_type '132/0'                                                  
        list icmp_type '143/0'                                                  
        option family 'ipv6'                                                    
        option target 'ACCEPT'                                                  
                                                                                
config rule                                                                     
        option name 'Allow-ICMPv6-Input'                                        
        option src 'wan'                                                        
        option proto 'icmp'                                                     
        list icmp_type 'echo-request'                                           
        list icmp_type 'echo-reply'                                             
        list icmp_type 'destination-unreachable'                                
        list icmp_type 'packet-too-big'                                         
        list icmp_type 'time-exceeded'                                          
        list icmp_type 'bad-header'                                             
        list icmp_type 'unknown-header-type'                                    
        list icmp_type 'router-solicitation'                                    
        list icmp_type 'neighbour-solicitation'                                 
        list icmp_type 'router-advertisement'                                   
        list icmp_type 'neighbour-advertisement'                                
        option limit '1000/sec'                                                 
        option family 'ipv6'                                                    
        option target 'ACCEPT'
config rule                                                                     
        option name 'Allow-ICMPv6-Forward'                                      
        option src 'wan'                                                        
        option dest '*'                                                         
        option proto 'icmp'                                                     
        list icmp_type 'echo-request'                                           
        list icmp_type 'echo-reply'                                             
        list icmp_type 'destination-unreachable'                                
        list icmp_type 'packet-too-big'                                         
        list icmp_type 'time-exceeded'                                          
        list icmp_type 'bad-header'                                             
        list icmp_type 'unknown-header-type'                                    
        option limit '1000/sec'                                                 
        option family 'ipv6'                                                    
        option target 'ACCEPT'                                                  
                                                                                
config rule                                                                     
        option name 'Allow-IPSec-ESP'                                           
        option src 'wan'                                                        
        option dest 'lan'                                                       
        option proto 'esp'                                                      
        option target 'ACCEPT'                                                  
                                                                                
config rule                                                                     
        option name 'Allow-ISAKMP'                                              
        option src 'wan'                                                        
        option dest 'lan'                                                       
        option dest_port '500'                                                  
        option proto 'udp'                                                      
        option target 'ACCEPT'                                                  
                                                                                
config include                                                                  
        option path '/etc/firewall.user'   

When i ping 8.8.8.8

root@LEDE:/# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

when i do OPKG update:


root@LEDE:/# opkg update
Downloading http://downloads.lede-project.org/releases/17.01.4/targets/brcm63xx/generic/packages/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/targets/brcm63xx/generic/packages/Packages.gz

Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/base/Packages.gz

Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/base/Packages.gz

Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/luci/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/luci/Packages.gz

Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/packages/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/packages/Packages.gz

Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/routing/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/routing/Packages.gz

Downloading http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/telephony/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/targets/brcm63xx/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.lede-project.org/releases/17.01.4/packages/mips_mips32/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

Thank you so much in advance. I've been trying to solve this for a week without results.

Can you ping that address from your OpenWrt device?

What does the routing table look like on the OpenWrt device? ip route

Thank you for your response.
Yes, i can ping 192.168.0.1

root@LEDE:/# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
64 bytes from 192.168.0.1: seq=0 ttl=64 time=1.443 ms
64 bytes from 192.168.0.1: seq=1 ttl=64 time=1.252 ms
64 bytes from 192.168.0.1: seq=2 ttl=64 time=1.287 ms
64 bytes from 192.168.0.1: seq=3 ttl=64 time=1.234 ms
^C
--- 192.168.0.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 1.234/1.304/1.443 ms

My ip route looks like this:

root@LEDE:/# ip route
default via 192.168.0.1 dev br-lan 
192.168.0.0/16 dev br-lan  src 192.168.1.254 

Check your LAN subnet. Look like it might have been mistyped. 255.255.255.0 is probably what you want there.

Your network topology looks strange. /16 subnet ? no wan in this LEDE router?

What is your targeted topology? Several routers in 192.168.x.x without double-NAT?
LEDE router is connected to the main router via LAN port? (wan port is empty?)
Why does LEDE router have a firewall, if that is true?

The problem is that if i put as netmask 255.255.255.0, network is unreachable:

root@LEDE:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: Network unreachable

Thank you for your response.
This is my interface LAN:

I just need this router with openwrt to execute scripts made by myself. I've been reading that i need hostapd_cli to do that so i've been looking for hostapd in my router and doesnt seem to appear.
Solutions for this said that opkg update and installing that package should be the solution but i cant do opkg update because i have no connection.

That was not much helpful. Pretty much a picture about the end-result of the config above.

I repeat my previous question: how should your network infra look like?
"main router" + LEDE router providing wifi?

I have a feeling that you are trying to complicate things a bit too much, and we are now looking at config details, when your basic overall network plan is faulty.

If you are just looking for a secondary wifi access point with the LEDE router, without needing to have it actually do any actual routing / firewalling and your main router handles firewall and DHCP, you should likely just follow the "dumb AP" guide:

or

Note that as your main router has 192.168.0.1, your LEDE router should have e.g. 192.168.0.2 or 192.168.0.3 or ... And then your can keep the netmask normal 255.255.255.0 in both router.
(right now you might e.g. have a wrong netmask 255.255.225.0 in the main router, as 255.255.0.0 is required due to you using both 192.168.0.x and 192.168.1.x)

But please tell us what is your end goal.

that is what im trying to do

O

Ok im stupid... that worked great
Now i have to look for hostapd
Thank you so much!!

If your problem is solved, please consider marking this topic as [Solved]. (Click the pencil behind the topic...)

You can also mark the reply that solved your problem:
grafik

Just curious: What router did you flash with 17.01? Why 17.01 and not 18.06?

1 Like

Please confirm that your gateway is in the same subnet, and that you defined a network of 192.168.0.0/16 on all interfaces. Otherwise, this probably should be 255.255.255.0.

Feel free to use one posting to reply to multiple people, we can all see them.

Huawei hg556a Ver.C
I installed 17.01 because 18.06 was giving me problems with wifi ethernet card detection. So i downgraded to 17.01.

I'd try v19 when it is released, as v17 is EOL and most likely won't be getting any further security updates (and hasn't gotten feature updates in quite a while).

I will. But right now 17.01 is the one that works better for me. I've tried 18 without success.

1 Like

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