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
  • 236

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
  • 73,649