NDP Proxy
跳转到导航
跳转到搜索
手动配置
以下示例中,br0 是下游接口,wlan0 是上游接口。$ip 是要给下游设备用的 IP,$gwip 是上游接口上的同网段的新 IP。
sysctl net.ipv6.conf.all.proxy_ndp=1
ip a add $gwip dev br0
ip -6 route add $ip src $gwip dev br0 [table xxx]
ip -6 neigh add proxy $ip dev wlan0
要使 $ip 能够访问网关上 wlan0 的同网段地址,需要在 $ip 上删除本地路由:
ip -6 r del ... dev eth0
如果设置了相关的 ip rule,要记得将来回 $ip 的报文都路由到 br0 设备上:
ip -6 ru add to $ip lookup xxx