User avatar
bensimmo
Posts: 3886
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

apt-get and ipv6 troubles

Mon Jan 30, 2017 12:14 pm

Since a little while back apt-get has started to try using ipv6 connections, these do not work on our network (they are always 101 unreachable)
Why does it try them and how do I stop it from trying them?
Why does it not rollover and try another connection/mirror?
It's the only thing that does and it is a royal pain in the butt.

Today it's the damn mythic-beasts one.

There are some old posts on the internet I can see, but I know you lot known it w.r.t. Raspian a lot better.
(Fully updated Raspian on Pi's)
That is before I go trying random solutions.

Various number of 'apt-get update' eventually knocks it onto an ipv4 connection.

epoch1970
Posts: 2654
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: apt-get and ipv6 troubles

Mon Jan 30, 2017 5:01 pm

"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

User avatar
bensimmo
Posts: 3886
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: apt-get and ipv6 troubles

Mon Jan 30, 2017 5:12 pm

I was going to give this a go, but couldn't read it at work,
Now I can read it at home. (works filter (a school) blocks a lot of sites.)
If you want to make the setting persistent just create /etc/apt/apt.conf.d/99force-ipv4 and put Acquire::ForceIPv4 "true"; in it:

echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4
Config options Acquire::ForceIPv4 and Acquire::ForceIPv6 were added to version 0.9.7.9~exp1 (see bug 611891) which is available since Ubuntu Saucy (released in October 2013) and Debian Jessie (released in April 2015).
Still interested as to why it's not cleverer :-)

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: apt-get and ipv6 troubles

Mon Jan 30, 2017 6:52 pm

bensimmo wrote:Since a little while back apt-get has started to try using ipv6 connections, these do not work on our network (they are always 101 unreachable)
I don't think that's a particularly new thing, I'm sure I've seen apt-get using IPv6 on my Pi's going back quite a long way (I've been running IPv6 for years).

It might be that something's changed on your network. If it doesn't support IPv6 then you shouldn't get an IPv6 address (other than perhaps a link locak fe80:: address) and nothing should be using IPv6. If you're getting a global IPv6 (likely starting with a 2), but IPv6 hasn't been configured then you're likely to have lots of issues (apt-get might just be more obvious about such issues).

I suspect something is advertising itself as an IPv6 router on the network meaning other devices (your Pi included) generate a matching global address. However what ever is advertising itself as a router isn't properly configured. If it's a rogue device then whoever looks after the network should probably hunt it down (one of the many reasons network admins shouldn't bury their heads in the sands over IPv6)
Last edited by mfa298 on Mon Jan 30, 2017 10:00 pm, edited 1 time in total.

Martin Frezman
Posts: 1020
Joined: Mon Oct 31, 2016 10:05 am

Re: apt-get and ipv6 troubles

Mon Jan 30, 2017 7:04 pm

If it's a rouge device ...
Yeah, those red devices are really troublemakers.
If this post appears in the wrong forums category, my apologies.

User avatar
bensimmo
Posts: 3886
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: apt-get and ipv6 troubles

Mon Jan 30, 2017 7:39 pm

mfa298 wrote:
bensimmo wrote:Since a little while back apt-get has started to try using ipv6 connections, these do not work on our network (they are always 101 unreachable)
I don't think that's a particularly new thing, I'm sure I've seen apt-get using IPv6 on my Pi's going back quite a long way (I've been running IPv6 for years).

It might be that something's changed on your network. If it doesn't support IPv6 then you shouldn't get an IPv6 address (other than perhaps a link locak fe80:: address) and nothing should be using IPv6. If you're getting a global IPv6 (likely starting with a 2), but IPv6 hasn't been configured then you're likely to have lots of issues (apt-get might just be more obvious about such issues).

I suspect something is advertising itself as an IPv6 router on the network meaning other devices (your Pi included) generate a matching global address. However what ever is advertising itself as a router isn't properly configured. If it's a rouge device then whoever looks after the network should probably hunt it down (one of the many reasons network admins shouldn't bury their heads in the sands over IPv6)
I'll see if they know, likely it's our net nanny causing the problems (it usually is the route cause of all evil) and not allowing anything through or plain messing it up along the way. I would assume ipv6 is enabled as there is no reason not to have it enabled and everything is up to date. It is the true ipv6 IP address.
It's a shame apt-get is not clever enough to roll through the mirrors to see if it can connect, which is one of the main points of mirrors.
I wonder if other schools have this sort of headache. ;)

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: apt-get and ipv6 troubles

Mon Jan 30, 2017 10:01 pm

Martin Frezman wrote:
If it's a rouge device ...
Yeah, those red devices are really troublemakers.
To paraphrase Eric Morecambe, I'm using all the right letters, but not necessarily in the right order. 8-)

(spelling now fixed in the original post)

Return to “Troubleshooting”