Cannot configure 'vcan' -type interfaces with netplan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
New
|
Undecided
|
Unassigned |
Bug Description
We need to use Virtual CAN interfaces for development work. Looks like this is not very straightforward to configure with Netplan, if possible at all?
First off, you need to load the 'vcan' kernel module, so add to /etc/modules:
vcan
Our current /etc/network/
# NOTE: '|| true' needed, otherwise 'ifup' will fail, due to "RTNETLINK: file exists" message
auto can0
iface can0 inet manual
pre-up /sbin/ip link add dev $IFACE type vcan || true
up /sbin/ip link set up $IFACE
auto can1
iface can1 inet manual
pre-up /sbin/ip link add dev $IFACE type vcan || true
up /sbin/ip link set up $IFACE
This is how you can bring up can* interfaces with ifupdown. For netplan there is no clear instructions how to achieve this.