[systemd-devel] networkd config for dummy0 interface
Tom Gundersen
teg at jklm.no
Tue Jul 1 04:58:39 PDT 2014
On Mon, Jun 30, 2014 at 11:47 PM, Matthias Schiffer
<mschiffer at universe-factory.net> wrote:
> On 06/24/2014 12:25 PM, Tom Gundersen wrote:
>> On Tue, Jun 24, 2014 at 12:14 PM, Vasiliy Tolstov <v.tolstov at selfip.ru> wrote:
>>> Hi. I have very strange task:
>>
>> Not tested, but I would start with trying:
>>
>>> 1) Nedd modprobe dummy
>>
>> Use modules-load.d
>>
>>> 2) Assign specific mac address to it
>>
>> Possibly use .link files, or check if it is possible to spcify this as
>> module options (didn't check).
>>
>>> 3) Bring up it
>>> 4) Assign specific address to it
>>
>> Use a regular .network file... Should wokr.
>>
>> HTH,
>>
>> Tom
>
> I'm not sure if this has changed recently, but I think it is not
> possible to use .link files to configure virtual network devices as
> there is _nothing_ to match on.
Indeed.
> As I mentioned in another discussion (regarding bridge MAC addresses),
> I've added the following udev rule as a workaround, which allows
> matching for virtual device names using the Path= match (I need this for
> a batman-adv device, I guess there are tons of other device types which
> are similar):
>
> ENV{DEVPATH}=="/devices/virtual/net/*", ENV{ID_PATH}=="",
> ENV{ID_PATH}="virtual-$kernel"
>
> I think we really need a name match for virtual devices which have
> neither a persistent MAC address nor a device path to match on in .link
> units. It might be called VirtualName= and only work for devices that
> don't have a path so people don't try to use it when a Path= match would
> be more appropriate...
Once the kernel learns to distinguish real names from the ethX names,
then this may make some sense, but I still don't really like the idea
as people could still be renaming the links, and then it would get
really confusing what name to use...
I think a better solution is to set the properties on the virtual
devices you want when you create them. We already do this for mac
addresses (in git at least), but other properties could be added too
as needed.
Cheers,
Tom
More information about the systemd-devel
mailing list