We have a gateway product running Ubuntu 20.04 LTS. It has two network interfaces (WAN/LAN) configured using systemd-networkd. We use multicast messages to communicate to thousands of IoT devices connected to the LAN. It is important these multicast messages do NOT go out on the WAN since it could inadvertently change the behavior of IoT devices that may be present on the WAN side.

To ensure multicast messages are routed only to the LAN, the LAN configuration includes the following:


Problem is the multicast route only gets loaded if the LAN interface has a CARRIER (cable plugged in). If there is no carrier, the multicast route is never loaded so multicast messages go out on the WAN. Most of the time, the LAN interface will have a cable plugged in, but this cannot be guaranteed (esp. during bring-up).

We've experimented with setting ConfigureWithoutCarrier=true on the LAN interface. This seems to ensure the multicast route is always loaded regardless of whether or not the cable is plugged in. But is there a better way to configure a multicast route to ensure multicast messages never go out on the WAN interface?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.