DanielAdolfsson / ndppd

NDP Proxy Daemon
GNU General Public License v3.0
339 stars 102 forks source link

autowire for downstream interface? #84

Open nischu opened 6 months ago

nischu commented 6 months ago

Hello

I am trying to share eth1's /64 prefix with devices on usb0 using the following configuration. I set the same prefix I received on eth1 via ra to usb0 and started radvd.

proxy eth1 {
        autowire yes
        promiscuous yes

        rule 2a00:20:72c2:7519::/64 {
                iface usb0

                autovia yes
        }
}

The downstream device's RA gets successfully proxied upstream via ndppd, but no communication is possible:

What prevents this from working is that the route to the device on usb0 is missing and the kernel sends its NDP messages to eth1, which of course ends up being unreachable.

It suddenly starts working when I manually add a route to the downstream device on usb0: ip -6 ro add 2a00:20:72c2:7519:4905:4d3b:fc79:913c dev usb0

What am I missing? Isn't this the purpose of autowire yes? Or does that only work for upstream RAs?

I have installed Version: 0.2.5-6 from the Debian repositories.

Thanks in advance!

# ip -6 ro sh
2a00:20:72c2:7519::/64 dev eth1 proto ra metric 100 pref medium
2a00:20:72c2:7519::/64 dev usb0 proto kernel metric 256 pref medium
fe80::/64 dev usb0 proto kernel metric 256 pref medium
fe80::/64 dev eth1 proto kernel metric 1024 pref medium
default via fe80::3c6d:89ff:fe76:ffff dev eth1 proto ra metric 100 pref medium
# ifconfig
eth1: flags=4675<UP,BROADCAST,RUNNING,ALLMULTI,MULTICAST>  mtu 1500
        inet 172.20.10.3  netmask 255.255.255.240  broadcast 172.20.10.15
        inet6 fe80::ef0e:82aa:8ec1:71e7  prefixlen 64  scopeid 0x20<link>
        inet6 2a00:20:72c2:7519:cb30:a8b5:d413:98cd  prefixlen 64  scopeid 0x0<global>
        ether 3e:6d:89:67:ff:ff  txqueuelen 1000  (Ethernet)
        RX packets 334220  bytes 423277537 (403.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 214044  bytes 153386942 (146.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.196.1  netmask 255.255.255.0  broadcast 192.168.196.255
        inet6 2a00:20:72c2:7519::1  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::4e9:54ff:fe03:ffff  prefixlen 64  scopeid 0x20<link>
        ether 06:e9:54:03:ff:ff  txqueuelen 1000  (Ethernet)
        RX packets 210250  bytes 150427688 (143.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 288128  bytes 359974711 (343.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
domosekai commented 6 months ago

Debian package is based on the last release back in 2016 which did not include the autowire feature.

SpareSimian commented 6 months ago

Sorry for the noob question, but what is autowire in this context? Googling just turns up something to do with something called Spring. It doesn't look relevant. I'm about to deploy a new gateway with Debian and this sounds like something I need to know about.

domosekai commented 6 months ago

ndppd is essentially an "automatic" ndp proxy that relays NS and NA between interfaces. When used in a router, it's not enough as you need to handle the routing table as well. That part is called autowire and was initially part of a Google project ndprbrd, until getting merged in #30 .

SpareSimian commented 6 months ago

So we need a new release tag to trigger the distros to bundle this support. What gates that?