[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: persistent-net.rules for fixed ethX names and VLANs



On Thu, Nov 14, 2013 at 4:36 PM, Steffen Dettmer
<steffen.dettmer@gmail.com> wrote:
> I have persistent-net.rules in form:
>
>   SUBSYSTEM=="net", KERNEL=="eth*" ACTION=="add",
>     ATTR{address}=="40:d8:55:09:43:0f", NAME="eth3"
>
> How to use fixed ethX device names and VLAN devices at the same time?

I found a workaround that seems to solve my issue. At the end of
persistent net rules or a "higher" file I added:

  # Avoid renaming of VLAN interfaces:
  SUBSYSTEM=="net", KERNEL=="eth*.*" ACTION=="add", NAME="$kernel"

Of course this only works as long as following the naming
convention to call the VLAN interface "eth<X>.<V>" with <V> being
the number of the VLAN tag, for example "eth3.77".

NB: interestingly, according to the documentation [1], "%r"
should be the same as "$kernel", but here "%r" does not work.
When using NAME="prefix%r" the interface is renamed
accordingly. Seems to be a bug?

Regards,
Steffen


[1] http://www.freedesktop.org/software/systemd/man/udev.html


Reply to: