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

Re: Predictable Network Interface Names



Greg Wooledge <greg@wooledge.org> wrote:

> unicorn:~$ cat /etc/systemd/network/10-lan0.link 
> [Match]
> MACAddress=18:60:24:77:5c:ec

> [Link]
> Name=lan0

Careful with that one. If you use VLANs then you suddenly get multiple
interface with the same MAC and strange things will happen, because it
matches for all of them.

The failure-proof way of doing this is by adding "Type=ether" to the
Match clause, which will only match the physical interfaces and not the
subinterfaces. (Which will be of Type=vlan.):

,----
| [Match]
| MACAddress=18:60:24:77:5c:ec
| Type=ether
|
| [Link]
| Name=lan0
`----

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: