netplan does not support can bus interfaces

Bug #1938214 reported by Ricardo Delfin
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Wishlist
Unassigned

Bug Description

I've been planning to move my network setup from ifupdown to netplan, but it currently does not seem to support can interfaces, or at least I cannot find any documentation for it. As an example of the kind configuration I have on my /etc/network/interfaces file:

```
allow-hotplug can0
iface can0 can static
    bitrate 500000
    up /sbin/ip link set $IFACE down
    up /sbin/ifconfig $IFACE txqueuelen 20000
    up /sbin/ip link set $IFACE type can bitrate 500000 restart-ms 10
    up /sbin/ip link set $IFACE up
```

Revision history for this message
Lukas Märdian (slyon) wrote :

This is not currently supported by Netplan (as of 0.106). Do you know if NetworkManager and/or systemd-networkd already support configuration of CAN interfaces? Could you please link the relevant documentation?

Changed in netplan:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Ricardo Delfin (rdelfin) wrote :

Thanks for looking into it Lukas. Currently systemd-networkd do indeed support it. I can't find the documentation for how to use it, but I can find the PR that added support: https://github.com/systemd/systemd/pull/9185

I've also set it up using `/etc/network/interfaces` using instructions similar to the following: https://elinux.org/Bringing_CAN_interface_up
Or the following: https://wiki.rdu.im/_pages/Application-Notes/Software/can-bus-in-linux.html

Revision history for this message
Justin Cattle (jocado) wrote :

This is something we would also been keen to see supported.

The systemd networkd config required is of this nature:

cat /etc/systemd/network/80-can.network
[Match]
Name=can*

[Link]
RequiredForOnline=no

[CAN]
BitRate=500K
RestartSec=500ms

Cheers,
Just

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.