Problem with openwrt/lede software: OPKG / wget returned 4

hi there , i have some problem with my ap work with lede software i config it to work with bridge mode and its work and i write this topic from it my main problem i need to use opkg with it but i get this error

* opkg_download: Failed to download, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

and when i try to do ping from ap to or thers nothing just empty

why i get this error

this is my network config

confnterface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config globals 'globals'
        option ula_prefix 'fd07:5321:e605::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr ''
        option netmask ''
        option gateway ''
        option broadcast ''

and i disable (firewall and dhcp )

  • Please post /etc/config/wireless to confirm that your wireless is connected to the bridge
  • You do not have a LAN DNS server specified

Did you run opkg update first?

Forget about opkg, your main issue is that you do not have an internet connection on that device...

Your broadcast address does not match your ipaddr / netmask, but I do not think the problem is there. Let's check that your network is properly configured: execute ifconfig then route and post the results here. Then, instead of ping try with traceroute, so we can see where are your packets being lost.


Good catch.

this my wireless config

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:00.0'
        option htmode 'HT20'
        option disabled '0'

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

The wireless looks OK, I agree with @eduperez:

thank you for your reply
this route
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         UG    0      0        0 br-lan        *            U     0      0        0 br-lan
and this from ifconfigbr-lan    Link encap:Ethernet  HWaddr 68:72:51:6D:C5:35
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::6a72:51ff:fe6d:c535/64 Scope:Link
          RX packets:3807 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2296 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:271696 (265.3 KiB)  TX bytes:349702 (341.5 KiB)

eth0      Link encap:Ethernet  HWaddr 68:72:51:6D:C5:35
          RX packets:13116 errors:0 dropped:92 overruns:0 frame:0
          TX packets:12184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5523235 (5.2 MiB)  TX bytes:2357801 (2.2 MiB)

lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:5539 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5539 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:405924 (396.4 KiB)  TX bytes:405924 (396.4 KiB)

wlan0     Link encap:Ethernet  HWaddr 68:72:51:6C:C5:35
          inet6 addr: fe80::6a72:51ff:fe6c:c535/64 Scope:Link
          RX packets:14045 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17501 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2584422 (2.4 MiB)  TX bytes:6518718 (6.2 MiB)

and this result from traceroute

traceroute to (, 30 hops max, 38 byte packets
 1  LEDE.lan (  1435.435 ms !H  2997.303 ms !H  2998.696 ms !H

thank you for your time my dear

Why are you using as broadcast? This is normally the last one in the subnet, for your subnet mask I know this would not solve your problem, but probably your entire network config isn´t correct.
And why are you using such a big subnet, this is very uncommon...

Your traceroute output does validate that you not eaven reach your internal gateway, so your device ip config would definitely be wrong!


Thank you my frind the answer for all your Q is this ap connected with hotspot gateway so I use this subnet but the broadcast I change it but same problem

I assume you have a dhcp server running.... Whats your ip config if you use dhcp instead of static?

I do not get this... why is the same LEDE device on the first line (instead of the gateway)? why does it takes 3 seconds to reach itself? this does not make any sense...

How is this device connected to the main router? How is the main router configured?

1 Like

Its connected with pfsense dhcp server my pfsense get the connection from mikrotik ccr 1036 with load balance I get this problem just with lede any client connected with it get access but in lede inside it thers no access why what should I do

You did not answer my question...

1 Like

Sorry , my ap connected with main router from Ethernet and get dhcp from main router I hope I answer yor Q
Main router config as pppoe client
I wish I answer u Q
One other Q my ap in bridge mode do you think this make problem ?

Can I download package from source and add it to my device from winscp is it work I need snmpd package and zabbix agent can I do it without opkg

Yes, you could upload it to /tmp/XXX.ipk and install it with opkg install /tmp/XXX.ipk...
But you have to download all dependencies too and install this first.

You could also download the image builder and build a image with all packages included.
This could be easier / better than your aproach.

1 Like

thx i start with image builder now

i change the ip of my ap and work with other router for test when i use traceroute i get this :

 traceroute to (, 30 hops max, 38 byte packets
 1 (  0.301 ms  0.235 ms  0.215 ms
 2 (  1.124 ms  0.467 ms  0.414 ms
 3 (  80.847 ms  19.144 ms  31.497 ms
 4 (  27.331 ms  136.329 ms  347.008 ms
 5 (  35.015 ms  24.586 ms  23.853 ms
 6 (  64.870 ms  60.592 ms  99.572 ms
 7 (  84.905 ms  218.722 ms  94.444 ms
 8 (  300.920 ms  240.358 ms  200.659 ms
 9 (  209.745 ms  133.864 ms  145.255 ms
10 (  111.435 ms  112.710 ms  189.463 ms
11 (  117.270 ms^C

but its same when i ping i get this 
--- ping statistics ---
24 packets transmitted, 0 packets received, 100% packet loss

You have a very crazy network topology :crazy_face:

Is your subnet only local? How much clients are in this subnet?
You should consider to splitt your huge subnet into some smaller ones to get better performance with more broadcast domains...

1 Like

Th ip you see it not for my network its the ip from isp in my country the isp give you 254 ip to work with in my case I get this this range for dhcp I work with over 112 ip of this range with static ip and one of them for my pfsense its main router in my network and the range of it - this for my client
I have 1800+ clients works with wifi hotspot with over 148 ap