似乎无法使 IPv6 网络正常工作。
不幸的是,我还是决定重新安装系统。而且 IPv6 对我来说也不起作用。
给定:专用 IPv4 如:45.80.XX.XX/32 和网关 10.0.0.1;IPv6 子网:2a03:XX:XX::5b8/125(/125 前缀)和网关 2a03:XX:XX::5b9
结论:IPv4 运行良好,但 IPv6 不想做任何事情...
问题:请告诉我,IPv6 问题的可能解决方案。
我的配置在 /etc/netplan/00-network-all.yaml
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: no
dhcp6: no
addresses:
- 45.80.XX.XX/32
- 2a03:XX:XX::5b8/125
nameservers:
addresses:
- 1.1.1.1
- 8.8.8.8
- 2606:4700:4700::1111
- 2001:4860:4860::8888
routes:
- to: 0.0.0.0/0 # default
via: 10.0.0.1 # Gateway IPv4
metric: 100
on-link: true
- to: ::/0 # default
via: 2a03:XX:XX::5b9 # Gateaway IPv6
metric: 200
on-link: true
知识产权
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: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:XX:XX:XX brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 45.80.XX.XX/32 scope global ens3
valid_lft forever preferred_lft forever
inet6 2a03:XX:XX::5b8/125 scope global
valid_lft forever preferred_lft forever
inet6 fe80::XX:XX:XX:1904/64 scope link
valid_lft forever preferred_lft forever
ip-6r
ip -6 r
Code:
::1 dev lo proto kernel metric 256 pref medium
2a03:XX:XX::5b8/125 dev ens3 proto kernel metric 256 pref medium
fe80::/64 dev ens3 proto kernel metric 256 pref medium
default via 2a03:XX:XX::5b9 dev ens3 proto static metric 200 onlink pref medium
邻居
10.0.0.1 dev ens3 lladdr 02:00:00:00:00:01 REACHABLE
2a03:XX:XX::5b9 dev ens3 FAILED
路线-6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
ip6-localhost/128 [::] U 256 2 0 lo
myhost/125 [::] U 256 1 0 ens3
fe80::/64 [::] U 256 1 0 ens3
[::]/0 _gateway UGH 200 1 0 ens3
ip6-localhost/128 [::] Un 0 5 0 lo
myhost/128 [::] Un 0 2 0 ens3
myhost/128 [::] Un 0 2 0 ens3
ip6-mcastprefix/8 [::] U 256 4 0 ens3
[::]/0 [::] !n -1 1 0 lo
PS 在 IPv6 路由表中有一个奇怪的“UGH”标志,也许它应该只是“UG”???
答案1
此处配置有误,因为您在接口上声明了两个主机地址,其中一个是网络地址。您的 ipv6 配置应为:
addresses:
- 2a03:XX:XX::5ba/125
routes:
- to: ::/0 # default
via: 2a03:XX:XX::5b9