pppoe 重新连接无法释放旧的 ipv6 地址

pppoe 重新连接无法释放旧的 ipv6 地址

我安装了 ubuntu 22.04 并在 pppoe 网络中启用了 ipv6,但是我发现当 ISP 自动断开连接并重新连接网络时,pppoeconf 不会释放旧的 ipv6 地址。

有人知道如何解决这个问题吗?谢谢

  1. uname -a
Linux xxxxxxxx 5.15.0-83-generic #92-Ubuntu SMP Mon Aug 14 09:30:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  1. dpkg -l | grep pppoe
ii pppoeconf 1.21+nmu2ubuntu1 all configures PPPoE/ADSL connections
  1. /etc/netplan# cat 00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      addresses:
      - 192.168.1.xxx/24
      nameservers:
        addresses:
        - 8.8.8.8
        - xxx.xx.xx.xx
        search:
        - xxxx.xxxx.xxxx
      routes:
        - to: default
          via: 192.168.1.1
  1. /etc/network$ cat 接口
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

auto dsl-provider
iface dsl-provider inet ppp
pre-up /bin/ip link set enp2s0 up # line maintained by pppoeconf
provider dsl-provider

auto enp2s0
#iface enp2s0 inet dhcp
iface enp2s0 inet manual
  1. /etc/ppp/peers$ cat dsl-provider
# Minimalistic default options file for DSL/PPPoE connections

noipdefault
defaultroute
replacedefaultroute
hide-password
lcp-echo-interval 30
lcp-echo-failure 4
noauth
persist
#mtu 1492
#persist
maxfail 0
holdoff 20
plugin rp-pppoe.so
nic-enp2s0
user "xxxx@xxxxx"
usepeerdns
  1. vi /etc/ppp/选项
# enable ipv6 in ppp
+ipv6 ipv6cp-use-ipaddr
  1. 六、/etc/sysctl.conf
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.ppp0.accept_ra=2
  1. 是否配置
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 192.168.1.xxx netmask 255.255.255.0 broadcast 192.168.1.255
        inet6 fe80::feaa:14ff:fe41:xxxx prefixlen 64 scopeid 0x20<link>
        ether fc:aa:14:xx:xx:xx txqueuelen 1000 (Ethernet)
        RX packets 1104036 bytes 270179711 (270.1 MB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 975912 bytes 1012802190 (1.0 GB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
        inet 127.0.0.1 netmask 255.0.0.0
        inet6 ::1 prefixlen 128 scopeid 0x10<host>
        loop txqueuelen 1000 (Local Loopback)
        RX packets 39007 bytes 27010089 (27.0 MB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 39007 bytes 27010089 (27.0 MB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1492
        inet 114.xxx.xxx.xxx netmask 255.255.255.255 destination 168.95.98.254
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 fe80::xxxx:xxxx:xxxx:xxxx prefixlen 128 scopeid 0x20<link>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        inet6 2001:b011:14:410a:xxxx:xxxx:xxxx:xxxx prefixlen 64 scopeid 0x0<global>
        ppp txqueuelen 3 (Point-to-Point Protocol)
        RX packets 1004452 bytes 224455771 (224.4 MB)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 954499 bytes 990512298 (990.5 MB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

相关内容