wide-dhcpv6 无法启动,因为它使用了不存在的接口

wide-dhcpv6 无法启动,因为它使用了不存在的接口

我尝试重新启动 wide-dhcpv6,并在 journalctl 中收到此信息

Feb 03 12:09:49 router sudo[1285]: ciaran : TTY=pts/0 ; PWD=/home/ciaran ; USER=root ; COMMAND=/bin/systemctl restart wide-dhcpv6-client
Feb 03 12:09:49 router sudo[1285]: pam_unix(sudo:session): session opened for user root by ciaran(uid=0)
Feb 03 12:09:49 router systemd[1]: Stopped LSB: Start/Stop WIDE DHCPv6 client.
-- Subject: Unit wide-dhcpv6-client.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit wide-dhcpv6-client.service has finished shutting down.
Feb 03 12:09:49 router systemd[1]: Starting LSB: Start/Stop WIDE DHCPv6 client...
-- Subject: Unit wide-dhcpv6-client.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit wide-dhcpv6-client.service has begun starting up.
Feb 03 12:09:49 router wide-dhcpv6-client[1288]:  * Starting WIDE DHCPv6 client dhcp6c
Feb 03 12:09:49 router dhcp6c[1293]: ifreset: invalid interface(enp0s31f6): No such device
Feb 03 12:09:49 router dhcp6c[1293]: main: failed to initialize enp0s31f6
Feb 03 12:09:51 router wide-dhcpv6-client[1288]:    ...fail!
Feb 03 12:09:51 router systemd[1]: wide-dhcpv6-client.service: Control process exited, code=exited status=1
Feb 03 12:09:51 router systemd[1]: Failed to start LSB: Start/Stop WIDE DHCPv6 client.
-- Subject: Unit wide-dhcpv6-client.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit wide-dhcpv6-client.service has failed.
--
-- The result is failed.
Feb 03 12:09:51 router systemd[1]: wide-dhcpv6-client.service: Unit entered failed state.
Feb 03 12:09:51 router systemd[1]: wide-dhcpv6-client.service: Failed with result 'exit-code'.

它试图使用我的配置文件中的一个接口,但我重命名了它并替换了配置中的名称

ciaran@router:/etc/wide-dhcpv6$ cat dhcp6c.conf
##
## This is/etc/wide-dhcpv6/dhcp6c.conf
##
## Replace the existing configuration with this one.

# Send a PD request on the external facing interface
# send ia-pd says ask for a prefix
# the script is run when the prefix is acquired
interface wan0 {
 send ia-pd 2;
 script "/etc/wide-dhcpv6/dhcp6c-script";
};

# Upon receiving a prefix use the
# information to set the internal facing interface
id-assoc pd 2 {
 prefix-interface wlan0 {
  ifid 1;
  sla-id 1;
  sla-len 0;
 };
};

## End of config.

知道它为什么尝试使用错误的界面吗?

答案1

/etc/defauls 中有一个文件,用于设置请求前缀的地址

ciaran@router:/etc/default$ cat wide-dhcpv6-client
# Defaults for dhcpv6 client initscript
# Used by /etc/init.d/wide-dhcpv6-client

# Interfaces on which the client should send DHCPv6 requests and listen to
# answers. If empty, the client is deactivated.
INTERFACES="enp0s31f6"

# Verbose level for syslog. Default is 0 (0: minimal; 1: info; 2: debug)
#VERBOSE=0

在我将其改为 wan0 之后,它就起作用了

相关内容