Any help with opkg update (Failed to establish connection)

i test it thers no ping on google dns 8.8.8.8 or 8.8.4.4

First error is right here:

You have defined the subnet (netmask) so that router's own IP address and the gateway address are not in the same subnet. This breaks routing.

Your netmask 255.255.255.0 defines that only the last number of the IP address varies inside the subnet. So, the router 10.0.132.100 thinks that only 10.0.132.(0-254) are in the same net. It has no idea how to reach 10.0.0.1 that you have defines as gateway.

Either

  • change the subnet netmask to 255.255.0.0 or
  • adjust the router's IP address to be inside the same subnet as the gateway. If gateway is 10.0.0.1 and netmask is 255.255.255.0, the router's IP address can be 10.0.0.(1-254, well not actually 1 as gateway has that, so 2-254)

EDIT:
based on that gateway 10.0.0.1 gateway address, I suspect that you have more complex net environment than just a LEDE router. An additional router? A smart modem? It could well be that you need a bit more complex config, if you need to avoid double NAT or double DHCP etc.

So, what are you actually trying to accomplish? Add a LEDE router to an existing net?

1 Like

Thank you for your time I work with lede for my puplic wifi network I have with my network 130 ap active in puplic zone , I work with unifi ac mesh but I have mire problem like coverage speed ... etc , so I test lede and thers big difference from my unifi so I want to upgrade all my unifi to lede and work with wpa2 enterprise I install radius in google cloud and its work but I cant install wpad for my ap , can you help me with best config for lede ap , my main router get 10.0.0.1/16 ip thx

In a /16 network, the netmask is 255.255.0.0 as already mentioned.

I have the same issue with opkg update after I configured openvpn. Any help is appreciated.

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

network config

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 'fd77:1b85:17f0::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth1'
        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 '0 1 2 3 5'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6'

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

dhcp config

config dnsmasq
        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 localservice '1'

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

See this LEDE thread...

jwoods thanks for that....i tried adding below to no avail. i am going to change dns servers to see if that works

config interface wan
    option ipv6 0

nothing works that I tried...i still cannot get opkg update to work

worked fine until i upgraded to 17.01.4

Of course it's still not working... You still haven't configured a Gateway.

Maybe I missed this...but did you confirm your Internet was on LAN or WAN?

I have the same problem;

when I try to download updates in Luci interface there is a warning that:

The opkg install command failed with code 255 .

how can I sure the correct interface

  • IP
  • DNS
  • Gateway
    ?
root@OpenWrt:~# cat /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 'fdc4:264d:2461::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ip6assign '60'
        option ipaddr '192.168.0.111'
        option netmask '255.255.255.0'

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

config interface 'wan6'
        option ifname 'eth0.2'
        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 '1 2 3 4 5t'

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

Is this the primary router? Secondary? Dumb ap?

secondary
it connected with ethernet cable

aqtually this is third. Main router is docsis 3.0 wired modem. It connect an access point with ethernet. That openwrt modem also connectted that modem with ethernet cable

Can you draw a diagram. Are you using lan-lan connection of lan-wan?

DOCSIS 3 -- Lan -- TPLİNK - Lan - OpenWRT

The issue is that you don’t have a gateway and dns defined in the lan interface

I write gateway main docsis 3.0 (192.168.0.1) there is no change.

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 'fdc4:264d:2461::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ip6assign '60'
        option ipaddr '192.168.0.111'
        option gateway '192.168.0.1'
        option netmask '255.255.0.0'

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

config interface 'wan6'
        option ifname 'eth0.2'
        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 '1 2 3 4 5t'

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

how should I define correct dns

Netmask should probably be 255.255.255.0

Is 192.168.0.1 your main router?
Do you have the name server defined?