- 最新
- 最多得票
- 最多評論
Hello.
I was able to check the IPv6 address set on EC2 by running "ip a" in my environment.
Does it not appear even if you recreate EC2?
root@ip-10-0-0-180:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc fq_codel state UP group default qlen 1000
link/ether 06:13:93:d4:4c:57 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.180/25 metric 100 brd 10.0.0.255 scope global dynamic eth0
valid_lft 3051sec preferred_lft 3051sec
inet6 yyyy:yyyy:yyy:yyyy:yyyy:yyyy:yyyy:bd41/128 scope global dynamic noprefixroute
valid_lft 391sec preferred_lft 81sec
inet6 fe80::413:93ff:fed4:4c57/64 scope link
valid_lft forever preferred_lft forever
Any additional information or remedy on this issue would be appreciated.
I encountered the same problem, ie attached an IPv6 address to the NIC, after spending a day wondering why the instance was inaccessible via IPv6 even though other instances in the same subnet were in fact accessible via IPv6.
I finally reattach an IPv4 address to the instance and ssh into it, and of course I see it is only bound to the the private IPv4 address and no binding to IPv6, that would have saved me hours had I checked that first.
In other words it is possible for the NIC to show IPv6 binding in the AWS console to signal IPv6 is enabled on the instance but in fact for that not to be true, you can only confirm by logging into the instance via IPv4.
This turns out to be an OS related issue, possibly tied to instances derived from older OS releases. While my instance has an up-to-date ubuntu OS it was created years ago so I am not sure if something is off in its configuration.
In any case I came across this post https://github.com/coreos/bugs/issues/1828
My instance doesn't have /etc/network/interfaces.d/50-cloud-init.cfg but it does have /etc/network/interfaces.d/eth0.cfg
sudo vi /etc/network/interfaces.d/eth0.cfg #add this line for ipv6 binding iface eth0 inet6 dhcp #save then restart networking sudo systemctl restart networking
#exit the instance and ssh back in and i see the IPv6 binding
eth0.cfg is apparently a static config meaning you can't take advantage of cloud-init in ubuntu, meaning using is ultimately not a solution but will do for now.
This post (https://github.com/canonical/cloud-init/issues/2663) suggests deleting /etc/network/interfaces.d/eth0.cfg, however that left my instance unreachable because /etc/network/interfaces.d/50-cloud-init.cfg did not get created as expected, fortunately I had an AMI backup.
Hey, thanks for the response!!! This is what I get... there is nothing in there that looks like the ipv6 address on the EC2 dashboard of my instance... when you say "recreate the EC2" - what I did was reboot the instance. Is "recreate" a different process?
$ ifconfig ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 inet 172.31.X.XX netmask 255.255.240.0 broadcast 172.31.XX.XX inet6 fe80::82c:d4ff:fe6f:XXXX prefixlen 64 scopeid 0x20<link> ether 0a:2c:d4:6f:XX:XX txqueuelen 1000 (Ethernet) ... lo: ...
@Riku_Kobayashi - yes, I went through the instructions in the document you referenced, and when I go to the EC2 dashboard of my instance, it does show the ipv6 address. So since I see the address, I think I must have done things right. But I don't see the ipv6 address in Ubuntu with ifconfig...
相關內容
- 已提問 7 個月前
- 已提問 7 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
Have you attached an IPv6 address to EC2 using the steps in the document below? For existing EC2, you need to attach an IPv6 address yourself. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#working-with-ipv6-addresses