大网数据广告活动
服务器运维问答

dhcpcd ipv6 excessive adding/removing route in log

· 52CE 我爱测

This correlates with router advertising. For now, I removed ipv6rs from the config and added the route manually. Is there a better way to eliminate the excessive log? Apr 22 16:53:39 prince dhcpcd[2358]: eth1: adding default rout…

问题原文

原帖链接 · niry · CC BY-SA 3.0

This correlates with router advertising. For now, I removed ipv6rs from the config and added the route manually. Is there a better way to eliminate the excessive log?

Apr 22 16:53:39 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:39 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:42 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:42 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:45 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:45 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:49 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:49 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:53 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:53 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:56 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:53:56 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:00 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:00 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:04 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:04 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:07 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:07 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:10 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:10 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:13 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:13 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:16 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:16 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:20 prince dhcpcd[2358]: eth1: adding default route via fe80::201:5cff:fe63:c046
Apr 22 16:54:20 prince dhcpcd[2358]: eth1: removing default route via fe80::201:5cff:fe63:c046

And here is the current config:

hostname
duid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
noipv6rs
interface eth1
#  ipv6rs
#  ipv6ra_own_default
  iaid 1
  ia_pd 1/::/64 eth2/0/64

已采纳解答

原帖链接 · niry · CC BY-SA 3.0

When dhcpcd is being stopped, it will not clear routes added by itself, as expected. However, once dhcpcd is restarted and dhcp is acquired, it will try to add routes again and will remove it's own route because of duplicate, but still mark the route as not added.

The solution, until this behavior is fixed, is to monitor the log for adding/removing and then remove the route it is trying to add. In the above case:

sudo ip -6 route del default via fe80::201:5cff:fe63:c046 dev eth1

Once done, dhcpcd will add the route back and be quiet.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-04-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。