Cannot configure 'vcan' -type interfaces with netplan

Bug #1861703 reported by Lassi Väätämöinen
8
This bug affects 1 person
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/interfaces looks like this:

# 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.

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.