不懂计算机网络,使用脚本 https://github.com/felixonmars/vps2arch
ping ff02::1%eth0
PING ff02::1%eth0 (ff02::1%eth0) 56 data bytes
64 bytes from fe80::x:x:x:x%eth0: icmp_seq=1 ttl=64 time=0.109 ms
64 bytes from fe80::x:x:x:x%eth0: icmp_seq=2 ttl=64 time=0.072 ms
64 bytes from fe80::x:x:x:x%eth0: icmp_seq=3 ttl=64 time=0.166 ms
ip -6 neigh
fe80::x:x:x:x dev eth0 lladdr 00:x:x:x:x:x router STALE
ping -I 2607:x:x:x:x:x:x:x
ping: usage error: Destination address required
ping -6 google.com
PING google.com (2607:x:x:x::x) 56 data bytes
From archlinux (2607:x:x:x:x:x:x:x) icmp_seq=9 Destination unreachable: Address unreachable
ping: sendmsg: No route to host
cat /etc/systemd/network/default.network
[Match]
Name=eth0
[Network]
Gateway=148.x.x.x
Address=148.x.x.x/26
最近编辑记录 Zntros (2024-02-17 23:57:41)
离线
你的 IPv6 地址是多少,是什么分配机制?
离线
已用 x 符号替换部分地址位;无状态分配机制。
ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2607:x:x:x:x:x:x:x/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 2591925sec preferred_lft 604725sec
inet6 fe80::x:x:x:x/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
离线
所以你是有地址了但是没路由?ip -6 r 看看?然后 ping ff02::2%eth0 看看。
离线
ip -6 r
2607:x:x:x::/64 dev eth0 proto ra metric 1024 expires 2591918sec mtu 1500 hoplimit 64 pref medium
fe80::/64 dev eth0 proto kernel metric 256 pref medium
default via fe80::x:x:x:x dev eth0 proto ra metric 1024 expires 1719sec mtu 1500 hoplimit 64 pref medium
无反应,是依云输错了吗?
ping ff02::2%eth0
PING ff02::2%eth0 (ff02::2%eth0) 56 data bytes
ping ff02::1%eth0
PING ff02::1%eth0 (ff02::1%eth0) 56 data bytes
64 bytes from fe80::x:x:x:x%eth0: icmp_seq=1 ttl=64 time=0.115 ms
64 bytes from fe80::x:x:x:x%eth0: icmp_seq=2 ttl=64 time=0.074 ms
64 bytes from fe80::x:x:x:x%eth0: icmp_seq=3 ttl=64 time=0.071 ms
离线
你这两个「fe80::x:x:x:x」是同一地址吗?ping fe80::x:x:x:x%eth0 (第一个)通吗?第二个是你的本机地址吗?
离线
ip -6 r
default via fe80::a:x:x:x dev eth0 proto ra metric 1024 expires 1680sec mtu 1500 hoplimit 64 pref medium #这里是 a
ping fe80::a:x:x:x%eth0 #这里是 a
PING fe80::a:x:x:x%eth0 (fe80::a:x:x:x%eth0) 56 data bytes #这里是 a
From fe80::b:x:x:x%eth0 icmp_seq=9 Destination unreachable: Address unreachable #这里是 b
ping: sendmsg: No route to host
#这里全是 b
ip -6 addr
inet6 fe80::b:x:x:x/64 scope link proto kernel_ll
ping fe80::b:x:x:x%eth0
PING fe80::b:x:x:x%eth0 (fe80::b:x:x:x%eth0) 56 data bytes
64 bytes from fe80::b:x:x:x%eth0: icmp_seq=1 ttl=64 time=0.079 ms
64 bytes from fe80::b:x:x:x%eth0: icmp_seq=2 ttl=64 time=0.052 ms
64 bytes from fe80::b:x:x:x%eth0: icmp_seq=3 ttl=64 time=0.105 ms
离线
那问题很明确了:你的网关没理你。给 vps 商开 ticket 吧。
离线
邮件回复内容:
---------------
We have successfully added the IPV6 address for your server please allow some time for the configuration.
And also please note For Ubuntu & Debian instance needs to enable IPV6 manually after configuring. Kindly follow the below-mentioned steps to enable the IPv6 address for your server.
Login to your server via ssh connection and adding the below entries in sysctl.conf file:
nano /etc/sysctl.conf
Scroll all the way down, and add the following lines at the end:
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.eth0.accept_ra = 0
To check run:
sysctl -p
Then try to restart network
systemctl restart networking
Then check with
ping6 google.com
If its still not working try to reboot your VPS once.
Note: Lastly, also ensure that your /etc/sysctl.conf file does not have any values in place that might be disabling IPv6 connectivity. If it does, be sure to comment those out and refresh your settings afterwards by using "sysctl -p" or by rebooting your VPS.
最近编辑记录 Zntros (2024-02-18 12:18:44)
离线
哎,它说不要用 ra 啊。那你地址怎么获取?他有告诉你地址和网关吗?
离线
我想知道,如果在物理机上使用 Archiso 进行安装,那么 /dev /proc /sys 这些文件是否会按照 ArchLinux 的默认设置进行挂载?注意到 vps2arch 脚本在安装过程中并没有删除这些文件,那么在重新启动之后,这些文件的配置是否会遵循 ArchLinux 的默认设置?
最近编辑记录 Zntros (2024-02-18 12:14:09)
离线
/proc 和 /sys 目录是当前内核的运行状态信息。/dev 是由 udev 管理的、位于内存中的数据。重启之后一切就是全新的了。
离线
邮件回复内容:
------------------------------------------------------------------------
我:
But if I set these parameters, how can I get an IPv6 address for my VPS? According to my research, these parameters disable the automatic configuration and the router advertisement for IPv6, which means that I have to manually assign an IPv6 address and a gateway for my VPS.
Could you please tell me what IPv6 address and gateway I should use for my VPS? Or is there another way to enable IPv6 on my VPS without setting these parameters?
------------------------------------------------------------------------
提供商:
Please use the following ipv6, gateway to assign the ipv6 address.
IPv6 : 2607:x:x:x:x:x:x:a
Gateway: 2607:x:x:x:x:x:x:b
Netmask: 64
最近编辑记录 Zntros (2024-02-17 23:11:26)
离线
好,把 eth0 上的其它公网 v6 地址都 ip a del xxx dev eth0 删掉。然后:
ip a add 2607:x:x:x:x:x:x:a/64 dev eth0
ip -6 r replace default via 2607:x:x:x:x:x:x:b dev eth0
就应该通了。ping -6 www.google.com 测试。
没问题的话,去写个静态网络的配置文件就好了(取决于你用什么网络管理器,不会就查 ArchWiki 和手册)。
离线
那个 autoconf 和 accept_ra 你可以设置成 0 (写到 /etc/sysctl.d/99-xxx.conf 里)。不过你的网络管理器可能会帮你搞定。
离线