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

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


Steffen Dettmer a écrit :
> 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?

The behaviour you describe does not happen on a standard Debian system.
I guess it is because the standard rules have the DRIVERS="?*"
condition. A "real" network interface has the (non-null) driver name in
its parent device and thus matches the rule, whereas a "virtual" VLAN
interface does not.

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

It does not matter : the other naming convention vlan<V> won't match the
rule and thus won't be renamed, which is the desired behaviour IIUC.

Reply to: