WendyOS Docs

IPv6 Router Advertisements (radvd)

WendyOS runs radvd (Router Advertisement Daemon) on usb0 to signal IPv6 availability on the USB NCM interface. No DHCPv6 server is used.

IPv6 Router Advertisements (radvd)

WendyOS runs radvd (Router Advertisement Daemon) on usb0 to signal IPv6 availability on the USB NCM interface. No DHCPv6 server is used.

What radvd Does Here

Hosts self-assign a link-local address on any interface as soon as it comes up (RFC 4862 §5.3) — no Router Advertisement is required for that. In WendyOS, radvd's role is narrower: it sends periodic RAs with AdvDefaultLifetime 0 (the device is not a default router) to signal to the host that IPv6 is active on the NCM interface. This ensures platforms that delay IPv6 processing until an RA is received (notably macOS) bring up their fe80:: address promptly. The fe80::/64 prefix entry in the config with AdvAutonomous on is a no-op for SLAAC — RFC 4861 §5.5.3 excludes link-local prefixes from prefix information processing — but is kept for compatibility with strict radvd configurations.

Configuration

File: /etc/radvd.conf (source: recipes-connectivity/radvd/files/radvd.conf)

interface usb0 {
    AdvSendAdvert on;

    MinRtrAdvInterval 3;
    MaxRtrAdvInterval 10;

    AdvDefaultPreference low;

    # Do not advertise as default router
    AdvDefaultLifetime 0;

    # SLAAC, not DHCPv6
    AdvManagedFlag off;
    AdvOtherConfigFlag off;

    prefix fe80::/64 {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr on;
    };
};

Key settings explained:

SettingValueReason
AdvSendAdvert onEnable RA sending
MinRtrAdvInterval3 sFrequent RAs for fast host configuration after cable insert
MaxRtrAdvInterval10 sUpper bound; low to keep the host synchronized
AdvDefaultLifetime0The device is not an IPv6 default router
AdvDefaultPreferencelowDeprioritise in multi-router environments (e.g. macOS ICS)
AdvManagedFlag offSLAAC, no DHCPv6
AdvOtherConfigFlag offNo stateless DHCPv6 for DNS etc.
prefix fe80::/64AdvAutonomous onNo-op for SLAAC (link-local prefixes are excluded by RFC 4861 §5.5.3); kept for radvd config compatibility

systemd Service

The radvd.service generated by the radvd_%.bbappend recipe:

[Unit]
Description=IPv6 Router Advertisement Daemon
After=network-online.target gadget-setup.service
Wants=network-online.target
Requires=gadget-setup.service

[Service]
Type=forking
ExecStartPre=/bin/sh -c 'test -e /sys/class/net/usb0 || sleep 2'
ExecStart=/usr/sbin/radvd -C /etc/radvd.conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure

The ExecStartPre guard waits up to 2 additional seconds if usb0 does not yet exist; radvd may still fail if the interface is absent after that window. The service is auto-enabled in the WendyOS image.

The Yocto recipe adds kernel-module-ipv6 as a runtime dependency to ensure the IPv6 kernel module is available.

Kernel IPv6 Forwarding

The USB network performance tuning package (usb-network-tuning) sets IPv6 forwarding via sysctl:

net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.usb0.forwarding = 1

This is required for radvd to send RAs (radvd will not send RAs on an interface unless IPv6 forwarding is enabled on it).

Verifying IPv6

# On the device — check usb0 link-local address
ip -6 addr show usb0

# Check radvd is running
systemctl status radvd

# On the host — check that a link-local address appeared on the NCM interface
ip -6 addr show enxXXXXXXXXXXXX

# Ping the device from the host using link-local (zone ID required)
ping6 fe80::xxxx:xxxx:xxxx:xxxx%enxXXXXXXXXXXXX

# Ping the host from the device
ping6 fe80::xxxx:xxxx:xxxx:xxxx%usb0

Relationship to mDNS

Avahi uses both IPv4 and IPv6 (use-ipv4=yes, use-ipv6=yes). Once the host has a link-local address on the NCM interface (self-assigned at interface-up, confirmed promptly by the RA), Avahi on the device can resolve the device hostname via its fe80:: address as well as its IPv4 address. This provides a fallback if DHCP has not yet completed.

On this page