how can i get rid of this error when i type opkg update?
i disabled IPv6
This is a general error with general network connectivity. How is your device configured (is it a router or a dumb AP, etc.)?
Please copy the output of the following commands and post it here using the "Preformatted text </>
" button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
thank you for your reply. my device is Mi Router 4A (R4AC 100M INT)
root@OpenWrt:~# cat /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 'fd1f:8e4c:eed5::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
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 'eth0.2'
option macaddr '24:cf:24:5a:b5:49'
config interface 'wan'
option device 'eth0.2'
option proto 'pppoe'
option username
option password
option ipv6 'auto'
config interface 'wan6'
option device '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 '4 2 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0 6t'
root@OpenWrt:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/10300000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'mero'
option encryption 'psk2'
option key
config wifi-device 'radio1'
option type 'mac80211'
option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
option channel '36'
option band '5g'
option htmode 'VHT80'
option disabled '1'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
root@OpenWrt:~# cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option localservice '1'
option ednspacket_max '1232'
list server '192.168.1.1'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv4 'server'
option dhcpv6 'server'
option ra 'server'
option ra_slaac '1'
list ra_flags 'managed-config'
list ra_flags 'other-config'
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'
config host
option mac '54:8D:5A:CF:91:53'
option name 'Turan'
option ip '192.168.1.180'
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
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 input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
# Allow IPv4 ping
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
# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
option name Allow-DHCPv6
option src wan
option proto udp
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
# Allow essential incoming IPv6 ICMP traffic
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
# Allow essential forwarded IPv6 ICMP traffic
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
Iām not seeing anything immediately wrong.
Do your devices connected to the router have internet access?
What happens if you run the following ping tests from your router:
8.8.8.8
openwrt.org
downloads.openwrt.org
yes, the device i log in to the site is connected to the router. i have an internet access.
here is the results
trn@trn-VirtualBox:~$ ping 8.8.8.8 openwrt.org
PING openwrt.org (139.59.209.225) 56(124) bytes of data.
64 bytes from dns.google (8.8.8.8): icmp_seq=1 ttl=59 time=21.0 ms (DIFFERENT ADDRESS!)
64 bytes from dns.google (8.8.8.8): icmp_seq=2 ttl=59 time=23.0 ms (DIFFERENT ADDRESS!)
64 bytes from dns.google (8.8.8.8): icmp_seq=3 ttl=59 time=21.9 ms (DIFFERENT ADDRESS!)
64 bytes from dns.google (8.8.8.8): icmp_seq=4 ttl=59 time=22.3 ms (DIFFERENT ADDRESS!)
64 bytes from dns.google (8.8.8.8): icmp_seq=5 ttl=59 time=26.5 ms (DIFFERENT ADDRESS!)
What about the router itself. Ssh into the router and run the requests tests.
root@OpenWrt:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=61 time=19.627 ms
64 bytes from 8.8.8.8: seq=1 ttl=61 time=19.330 ms
64 bytes from 8.8.8.8: seq=2 ttl=61 time=19.419 ms
root@OpenWrt:~# ping openwrt.org
PING openwrt.org (139.59.209.225): 56 data bytes
64 bytes from 139.59.209.225: seq=0 ttl=54 time=44.654 ms
64 bytes from 139.59.209.225: seq=1 ttl=54 time=43.909 ms
64 bytes from 139.59.209.225: seq=2 ttl=54 time=44.088 ms
root@OpenWrt:~# ping downloads.openwrt.org
PING downloads.openwrt.org (168.119.138.211): 56 data bytes
64 bytes from 168.119.138.211: seq=0 ttl=57 time=56.579 ms
64 bytes from 168.119.138.211: seq=1 ttl=57 time=55.710 ms
64 bytes from 168.119.138.211: seq=2 ttl=57 time=55.732 ms
What happens when you try this from the router:
wget https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/packages/Packages.gz
resulted in success
root@OpenWrt:~# wget https://downloads.openwrt.org/releases/22.03.3/targets/ath7
9/generic/packages/Packages.gz
Downloading 'https://downloads.openwrt.org/releases/22.03.3/targets/ath79/generic/packages/Packages.gz'
Connecting to 168.119.138.211:443
Writing to 'Packages.gz'
Packages.gz 100% |*******************************| 89770 0:00:00 ETA
Download completed (89770 bytes)
root@OpenWrt:~#
ok... so try opkg update again.
error again
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages/Packages.sig, wget returned 4.
* opkg_download: Check your network settings and connectivity.
Have you installed any packages previously? Or have you upgraded pacakges? Or restored a backup configuration?
No. I just installed openwrt. I tried to install luci-app-sqm but failed. My main goal is to be able to use SQM. But I am also getting this error when i use "opkg install luci-app-sqm" command
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/packages/libiptext6-0_1.8.7-7_mipsel_24kc.ipk, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_install_pkg: Failed to download libiptext6-0. Perhaps you need to run 'opkg update'?
* opkg_install_cmd: Cannot install package luci-app-sqm.
The problem just doesn't seem to make sense given the troubleshooting we've done.
I'd recommend that you make a backup then reflash the firmware (and do not keep settings). Configure from scratch (don't use the backup for now), and then try again.
ok, i am reflashing the firmware now.
reflash is finished. what should I do now? should I try the "opkg update" command first?
Based on the error screenshot, you only get errors regarding the package list signature files (.sig), right? (But not regarding the actual package lists?)
That is really weird. And the network error might be misleading.
I agree, no obvious network error. I have no problem with my internet access. I am using R4AC model router.
My device got bricked while trying to install openwrt with this file: https://downloads.openwrt.org/snapshots/targets/ramips/mt76x8/openwrt-ramips-mt76x8-xiaomi_mi-router-4a-100m-intl-initramfs-kernel.bin found at https://openwrt.org/inbox/toh/xiaomi/r4ac
So I installed openwrt with the following file: https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/openwrt-22.03.2-ramips-mt76x8-xiaomi_mi-router-4a-100m-squashfs-sysupgrade.bin
found at https://openwrt.org/toh/xiaomi/mi_router_4a_mir4a_100m#flash_layout and it worked right away.
But now, I'm having trouble installing packages.
Is there a reason why you are installing the older 22.03.2 instead of the current 22.03.3?
You should do the wget test with the exact same file that fails in the opkg update command.
no, I've never tried 22.03.3. I installed with the old version because I saw it here: Xiaomi Mi Router 4A - R4AC New revision - #6 by Gabrifol