1

I have a fresh installation of Ubuntu Server 16.04 LTS (Xenial Xerus).

I added this to /etc/network/interfaces to assign an IPv4 address:

auto enp2s0
iface enp2s0 inet static
 address 192.168.1.100
 netmask 255.255.255.0
 gateway 192.168.1.1

However, the interface gets an IPv6, too. I don't know where it is coming from. There shouldn't be any IPv6 in this network, but I can't deny the possibility that some device is trying to assingn IP addresses, which is why I did not enable DHCP.

Now this seems to trigger AAAA instead of A lookups which prevents me from doing an apt-get update:

Cannot initiate the connection to th.archive.ubuntu.com:80 (2001:3c8:9009:81::101:34). - connect (101: Network is unreachable) [IP: 2001:3c8:9009:81::101:34 80]

What to do?

AndreKR
  • 237
  • 2
  • 9
  • 1
    @Ravexina Ok, yes, that would probably solve my apt-get problem but I guess other software will have the same problem, so I am looking for a solution that solves the root of the problem. – AndreKR May 05 '17 at 17:52
  • Could you please open a new question if you have a new or follow-up question? The comment section is not suitable or meant for new questions or extended discussion. You’re welcome to send me a comment with a notification to draw my attention to it. Thanks. – David Foerster May 09 '17 at 05:49

1 Answers1

1

Update:

Since you're running Ubuntu Server, then please see Disabling IPv6 on a single interface. And, you'll also want to add dns-nameservers to your interfaces file.


If you're running standard Ubuntu, then delete your changes to /etc/network/interfaces and setup a standard network connection profile to use DHCP to set your address (or manually set an address if you must) and DNS servers (comma-separated list), in the IPv4 tab, and set your IPv6 tab to Ignore...

enter image description here enter image description here

You can also try another server instead of th.archive.ubuntu.com.

heynnema
  • 70,711
  • How do I do that using the command line? I don't have X. – AndreKR May 05 '17 at 18:12
  • Aren't you running standard Ubuntu? To disable IPv6 you can see https://askubuntu.com/questions/316492/disabling-ipv6-on-a-single-interface (and you'll also want to add dns-nameservers to your interfaces file). – heynnema May 05 '17 at 18:27
  • Ubuntu Server, I edited that into the question. – AndreKR May 06 '17 at 08:44