问题原文
原帖链接 · Aram Hăvărneanu · CC BY-SA 3.0
Amazon provides instructions on how to enable IPv6 on RHEL 7 and Centos 7: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-migrate-ipv6.html#ipv6-dhcpv6-rhel
These instructions work on RHEL 7-7.3 and Centos 7-7.3, but do not work on RHEL 7.4 (and presumably neither on Centos 7.4, when it will become available).
The problem is that the file /etc/sysconfig/network-scripts/ifcfg-eth0 is user-writable on the older versions, but on RHEL 7.4 this file becomes managed by cloud-init instead.
$ sed 1q /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
I find it very unexpected that merely upgrading from 7.3 to 7.4 would require such a fundamental change to managing networking. I am not sure if this change is specific to Amazon EC2 or not, I can't find anything in the RHEL 7.4 release notes, so it might be specific to Amazon.
So how are you supposed to enable IPv6 on RHEL 7.4 and Centos 7.4 in the cloud-init model?
已采纳解答
原帖链接 · Al Pooley · CC BY-SA 3.0
To configure DHCPv6 on RHEL 7.4 or CentOS 7
- Connect to your instance using the instance's public IPv4 address.
Using a text editor of your choice, create a custom file, for example:
/etc/cloud/cloud.cfg.d/99-custom-networking.cfgAdd the following lines to your file, and save your changes:
network: version: 1 config: - type: physical name: eth0 subnets: - type: dhcp6Reboot your instance.
Reconnect to your instance and use the ifconfig command to verify that the IPv6 address is configured on the network interface.
Source: https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-migrate-ipv6.html#ipv6-dhcpv6-rhel
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
