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

How to trigger IPv6 router solicitation on bridge slave port entering RUNNING state?

· 52CE 我爱测

I have a small Linux system that runs a bridge br0 between its wired eth0 and wireless (AP mode) wlan0 network interfaces. For br0 I have enabled IPv6 (stateless) autoconfiguration; this is actually handled by dhcpcd . Please not…

问题原文

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

I have a small Linux system that runs a bridge br0 between its wired eth0 and wireless (AP mode) wlan0 network interfaces.

For br0 I have enabled IPv6 (stateless) autoconfiguration; this is actually handled by dhcpcd. Please note that dhcpcd is configured to do stateless autoconfiguration, no stateful DHCPv6 anywhere to be seen.

As my system is kind of a diagnostics tool for IPv6, I switch it on a regular basis between different IPv6 networks (subnets): pull the cable at the switch, plug it into another port.

The problem with this setup now is: eth0 is a slave interface to the bridge br0. When I plug in the cable into eth0 (and the switch) this now does not trigger any IPv6 router solicitations. The reason seems to be that br0 never sees any transitions to or from RUNNING with the exception when it is initially brought up. Restarting br0 is not an option.

How can I configure br0 or eth0 to initiate IPv6 router solicitations when eth0 enters RUNNING state, that is, when I plug in an Ethernet cable (on both ends, of course)?

已采纳解答

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

The only "solution", or rather hack, I've found so far is to enable SLAAC on the eth0 bridge port network interface, using /etc/network/interfaces. For this, add:

iface eth0 inet6 auto

Since this uses /etc/network/interface, it will configure the Linux kernel. Please note that I'm not using dhcpcd here and thus dhcpcd needs to be told to keep it fingers off eth0; this is necessary for bridge port network interfaces anyway. So, /etc/dhcpcd.conf has to contain:

denyinterfaces eth0

In this configuration the Linux kernel will automatically issue RS router solicitations when eth0 comes online ("carrier"). And this is what is needed. The resulting RA router advertisements are (also) multicast, thus also autoconfiguring the bridge interface br0 as intended. That eth0 also gets autoconfigured is just a byproduct.

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

资料来源与适用范围

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

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

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