Listen in the Operating System
Each Operating System has a slightly different network set up and will need a different configuration.
If you are unsure what Operating System you are running you can find out by reading this file:
cat /etc/*-release
I use vim below but you can use nano if you prefer we don’t mind. 🙂
Ubuntu 16 clients
- Connect into the server on the command line over IPv4 as the admin user.
- Find your Network Interface name
- You can see all running network interfaces by running
ifconfig, in most situations there should be two interfaces.lois for local networking (where the traffic doesn’t leave the server) and there will be another which is what you are looking for. - You can also see your interfaces via the current configs:
cat /etc/network/interfaces.d/50-cloud-init.cfg - My interface is
eth0but it will depend on your instance type what interface name you have.
- You can see all running network interfaces by running
- Create a new configuration file for IPv6.
sudo vim /etc/network/interfaces.d/60-auto-ipv6.cfg- And add the following line to your file and save.
iface eth0 inet6 dhcp
- If you are interested in what this line does, it binds to the interface (for me eth0) using the inet6 (IPv6) address family and uses DHCP (Dynamic Host Configuration Protocol) to get the servers IP address.
- And last of all to load in this new config
sudo service networking restart- OR
sudo ifdown eth0 && sudo ifup eth0replacing “eth0” with your interface name.

Ubuntu 14 clients
You will need to reboot your Ubuntu 14 system to load in the new static IPv6 address.
- Connect into the server on the command line over IPv4 as the admin user.
- Find out your Network Interface name
- You can see all running network interfaces by running
ifconfig - My interface is
eth0but it will depend on your instance type what you have.
- You can see all running network interfaces by running
- Edit the existing network interface file.
vim /etc/network/interface.d/eth0.cfg- And make sure it contains the below lines
- If you are interested in what these lines do, lines 1 and 2 set up a local loopback interface this guides traffic from the server to itself which sounds strange but is used often in networking.
- Lines 3 and 4 starts networking on eth0 using DHCP (Dynamic Host Configuration Protocol) to get the servers IP address
- Finally line 6 starts dhclient which handles DHCP with the -6 flag to get the IPv6 address.
- Reboot the server.
sudo reboot
RedHat Enterprise Linux 7.4 and CentOS 7.4 clients
- Connect into the server on the command line over IPv4 as the admin user.
- On version 7.4 networking is managed by cloud-init. This is a standard tool for configuring cloud servers (like EC2 instances).
- Create a new config file in which we will enable ipv6 and add the below options.
vim /etc/cloud/cloud.cfg.d/99-ipv6-networking.cfg
network:
version: 1
config:
- type: physical
name: eth0
subnets:
- type: dhcp6

RedHat Enterprise Linux 7.3 and CentOS 7.3 clients
- Connect into the server on the command line over IPv4 as the admin user.
- Edit the global network settings file
vim /etc/sysconfig/network- Update the following line to match this. This will enable IPv6 for your system.
NETWORKING_IPV6=yes
- Edit the existing network interface file.
vim /etc/sysconfig/network-scripts/ifcfg-eth0- Enable IPv6 for the interface
IPV6INIT=yes- Enable IPv6 DHCP so the server can automatically get its new IPv6 address
DHCPV6C=yes- Disable the Network Manager daemon so it doesn’t clash with AWS network services
NM_CONTROLLED=no
sudo service network restart

分组





