[systemd-devel] networkd config for dummy0 interface
Matthias Schiffer
mschiffer at universe-factory.net
Tue Jul 1 23:31:41 PDT 2014
On 07/01/2014 01:58 PM, Tom Gundersen wrote:
> 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
I don't think it's always possible to set the address when an interface
is created; one example would be interfaces that aren't created
explicitly, but as a side effect (I'm thinking of things like the peer
side of a veth pair; batman-adv had similar behaviour until about 1 year
ago).
For such devices, udev rules are the only way to ensure link parameters
are set before udev tells the rest of the systems the device is ready.
Adding support for such devices in .link units would make things a lot
nicer.
An alternative would be adding support to the kernel for setting the
link parameters of all such devices at creation time. I have no idea if
this would be worth the effort, or even possible for all kinds of devices...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140702/2872efdf/attachment.sig>
More information about the systemd-devel
mailing list