[systemd-devel] systemd-networkd: setting the MAC address for a .netdev unit?
Matthias Schiffer
mschiffer at universe-factory.net
Thu Apr 17 15:14:30 PDT 2014
On 04/17/2014 11:28 PM, Dave Reisner wrote:
> On Thu, Apr 17, 2014 at 11:02:11PM +0200, Matthias Schiffer wrote:
>> Hi,
>> I'd like to configure the MAC address of a bridge device statically (as
>> bridges tend to change their MAC address depending on the order the
>> ports are added on Linux otherwise), but there doesn't seem to be a way
>> to match for a bridge in a .link unit. This would be very useful for
>> macvlans as well.
>
> Link files can match bridges generally with Type=bridge or Driver=bridge
> in the [Match] section, or more specifically by just matching on name.
> In the [Link] section, MACAddressPolicy=persistent should give you
> persistent hw addresses in the general case, or you can use
> MACAddress=fe:ed:fa:ce:be:ef to set whatever you like for more specific
> matches.
>
> Does this not work for you?
Hmm, I thought I tried that before, but using
MACAddress=fe:ed:fa:ce:be:ef seems to work now. Please note that the
Name= match is not documented in the systemd.link manpage.
MACAddressPolicy=persistent doesn't seem to have an effect on bridge
devices though (with systemd 212), but I don't rely on that anyways.
>
>> Am I missing something? If not, it would be great if such a feature
>> could be added, either by providing a way to match for such netdevs in a
>> .link unit, or just by allowing a [Link] section in the .netdev unit
>> (which would be more concise in my opinion).
>>
>> Thanks,
>> Matthias
>>
>
>
>
>> _______________________________________________
>> systemd-devel mailing list
>> systemd-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140418/07f861ae/attachment.sig>
More information about the systemd-devel
mailing list