Opkg update fails due to IPV6 running

Hi all
I refer to this link
https://forum.openwrt.org/t/unable-to-get-opkg-list-update-after-sysupgrade-ipv6-connectivity/25664/5

I thought my problem was upstream DNS, but it appears to be IPV6 related-reading through various posts, IPV6 takes priority on the CLI of the router (running LEDE Reboot 17.01.6 r3979-2252731af4 / LuCI lede-17.01 branch (git-19.002.70607-e86fedb) which means any opkg update takes an age. Disabling IPV6 does the trick but my ISP (Hyperoptic UK) runs a carrier-grade NAT system-so I really need IPV6 if I want to use services inside my network (iperf server, webcam etc) . Does anybody know of a way to run both IPV6 and IPV4 on LEDE, and eveything just "works"?

Cheers
cabs

If your ISP offers normal IPV6 connectivity with Prefix Delegation, the default settings usually "just work".

Sounds like you have IPv6 in use, but do not actually have IPv6 connectivity.
You might use a free he.net 6in4 tunnel or something like that to provide IPv6 connectivity.

Alternatively, if your ISP offers IPv6 but requires some specific config or routing, just modify your IPv6 config according to their specs. If you e.g. get only a single /64, you may need a relay config.

Additionally, if you have an old OpenWrt installation that has been sysupgraded from old releases, it is possible that you are not using current OpenWrt default config.

1 Like

Thanks for the reply
Everything inside/behind the router works for ipv6 in terms of checking web pages or running a ping6 from a Raspberry Pi. It just seem to be on the CLI of the router itself :slight_smile: , hence why opkg takes an age (if I use wget it does pull down the .ipk, just takes forever-I can see it is preferring IPV6 over IPV4). Maybe I'm fussing over nothing, but its annoying me!

Cheers
cabs

Doesn't OpenWrt use IPv4 by default?
I have a dual stack, and my clients use IPv6 by default, but OpenWrt 18.06.1 still prefers IPv4.
ping6, traceroute6 and nslookup -qAAAA work fine from both OpenWrt and clients.
Is there some setting to switch it to IPv6?


I get it, it's not OpenWrt prefers IPv4.
It's ping, tracepath and traceroute from OpenWrt prefer IPv4.
wget and curl prefer IPv6.

Got it working-not sure why but here is what I did:

Simply disabled Request IPv6-address! Set up an iperf3 server on an internal Rasp Pi, put a rule in the firewall to allow iperf3 on a specific port, tried from a Digital Ocean $5 server that has native IPV6-and straight in. All other devices on the LAN (so far) seem to work as well.Opkg update works a treat using IPV6.
Would love someone to explain what it is I have done!

cabs

It almost sounds like the (global) IPv6 address assigned on the wan6 interface didn't work. If that's the case then there may be a problem at the ISP. But the router doesn't need a global IPv6 address on the wan6 interface to use IPv6. It's enough with a (routed) IPv6-prefix, and an IPv6 address on the lan interface. In this case the link-local IPv6 address on the wan6 interface is used when communicating with the upstream router.

1 Like

Ack-forget my last-I must have been hanging on to some routing somewhere-came back after an hour and we are back to square one. I had to re-enable the IPV6 WAN6 interface, to make the internal clients route back out-and opkg update is back to a go-slow. I need to go and read up on IPV6 I think.

cabs

The fact that ipv6 goes slow (but not completely broken) for you on the router and not on your LAN suggests something slightly exotic. A few ideas include checking if icmpv6 is partially filtered. Is MTU set right?

Exotic?-I like your style :slight_smile:
Never messed about with it, and can do a tcpdump to see what actually happens (actually, sounds like a good idea considering I'm becoming a a bit of a Wireshark nerd!). Considering my ISP does CG-NAT (Hyperoptic), doing something funky on the IPV6 wouldn't surprise me. All very mysterious.

cheers
cabs

I am only getting the wget errors with IPv6 enabled in the Software page of the OpenWRT. So, what I have done to remedy this is to create an update script for opkg instead. I run it once a day from the command prompt. It could be ran from a cron job so it runs at the same time everyday. This is what I have done:

#!/bin/sh

echo "Checking for updated packages..."

opkg update
opkg list-upgradable | grep $ >/dev/null

case $? in
	0) echo "Updates found..."
	   echo "Installing..."
	   opkg list-upgradable | awk '{print $1}' | while read opapp
	   do
		sleep 5
		opkg upgrade $opapp
	   done
	   echo "Upgrade complete"
	   exit 0;;
	1) echo "No Updates found... Exiting...";;
esac