[systemd-devel] how to automate undirected UDP broadcast route for linklocal addresses?
Bill Plunkett
bill at plunkware.com
Tue Jun 25 21:20:37 UTC 2024
FWIW, it appears that this is indeed possible via the
[Network]DefaultRouteOnDevice setting:
/usr/sbin# cat /etc/systemd/network/eth0.network.dhcp
[Match]
Name=eth0
KernelCommandLine=!nfsroot
[Network]
DHCP=ipv4
LinkLocalAddressing=ipv4
DefaultRouteOnDevice=true
[DHCP]
ClientIdentifier=mac
RouteMetric=10
On Mon, Jun 10, 2024 at 1:52 PM Bill Plunkett <bill at plunkware.com> wrote:
> I have a yocto-hardknott (systemd v247) embedded system using link local
> addressing. Undirected UDP broadcasts (i.e. dest ip = 255.255.255.255) are
> failing with a 'Network is unreachable' error. I've been able to fix this
> with the 'route add' command shown below, but would prefer to automate it
> with systemd. Any help is greatly appreciated.
>
> This command allows undirected broadcasts:
>
> route add -net 255.255.255.255 netmask 255.255.255.255 dev eth0
>
> systemd configuration:
>
> [Match]
> Name=eth0
> KernelCommandLine=!nfsroot
>
> [Network]
> DHCP=ipv4
> LinkLocalAddressing=ipv4
>
> [DHCP]
> ClientIdentifier=mac
> RouteMetric=10
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240625/d026aed4/attachment.htm>
More information about the systemd-devel
mailing list