Official Tutorial: https://cloudsupport.digitalocean.co...N000000CorQQAS
NOTE: once enabled you will get the details of IPv6 network on the same page.
登入 droplet
#> ssh root@{public_ipv4_address} #> ip -6 addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 fe80::601:1eff:feb8:ee01/64 scope link valid_lft forever preferred_lft forever
NOTE: As you can see, we already have one address in the configuration. This is the link-local address and is a mandatory requirement for various routing and protocol functions. This is not our public address; we still need to configure that.
設定 IPv6 address
#> ip -6 addr add {public_ipv6_address}/64 dev eth0 #> ip -6 route add {default via public_ipv6_gateway} dev eth0 #> ip -6 route add default via {default via public_ipv6_gateway}
完成上述設定後,IPv6網路已經可以運作,但系統如有重開機,這些設定會自動消失。
檢查 the IPv6 default gateway
route -n -A inet6 ip -6 route show
#> ping6 2001:4860:4860::8888 PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes 64 bytes from 2001:4860:4860::8888: icmp_seq=0 ttl=60 time=3.76 ms 64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=60 time=0.789 ms 64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=60 time=0.764 ms #> dig @2001:4860:4860::8888 www.google.com ... ;; ANSWER SECTION: www.google.com. 123 IN A 74.125.24.106 www.google.com. 123 IN A 74.125.24.103 www.google.com. 123 IN A 74.125.24.147 www.google.com. 123 IN A 74.125.24.105 www.google.com. 123 IN A 74.125.24.104 www.google.com. 123 IN A 74.125.24.99 ... #> traceroute6 ipv6.google.com traceroute to ipv6.google.com (2404:6800:4003:803::200e), 30 hops max, 40 byte packets 1 2400:6180:0:d0:ffff:ffff:ffff:fff1 (2400:6180:0:d0:ffff:ffff:ffff:fff1) 1.046 ms 2400:6180:0:d0:ffff:ffff:ffff:fff2 (2400:6180:0:d0:ffff:ffff:ffff:fff2) 1.074 ms 0.878 ms 2 2604:a880:ffff:9::215 (2604:a880:ffff:9::215) 1.022 ms 2604:a880:ffff:9::219 (2604:a880:ffff:9::219) 0.732 ms 2604:a880:ffff:9::20d (2604:a880:ffff:9::20d) 0.520 ms 3 2604:a880:ffff:9:0:1:0:a (2604:a880:ffff:9:0:1:0:a) 0.916 ms 2604:a880:ffff:9:0:1:0:2 (2604:a880:ffff:9:0:1:0:2) 1.250 ms 2604:a880:ffff:9:0:1:0:a (2604:a880:ffff:9:0:1:0:a) 1.075 ms 4 2400:6180::90d (2400:6180::90d) 0.845 ms 0.779 ms 0.953 ms
/etc/sysconfig/network
... NETWORKING_IPV6=yes
/etc/sysconfig/network-scripts/ifcfg-eth0
... IPV6INIT=yes IPV6ADDR=primary_ipv6_address/64 IPV6_DEFAULTGW=ipv6_gateway IPV6_AUTOCONF=no ...
Images 0 | ||
---|---|---|
No images to display in the gallery. |