I copied the example from 
http://www.freedesktop.org/software/systemd/man/systemd.link.html.

Here is the full example:

[Match]
MACAddress=12:34:56:78:9a:bc
Driver=brcmsmac
Path=pci-0000:02:00.0-*
Type=wlan
Virtualization=no
Host=my-laptop
Architecture=x86-64

[Link]
Name=wireless0
MTUBytes=1450
BitsPerSecond=10M
WakeOnLan=magic
MACAddress=cb:a9:87:65:43:21


> ...still appears to be matching by MAC? Or am I misunderstanding, and
> the [Link] section doesn't control which name is assigned to which
> interface

In this example we have two "MACAdress" lines. The first line (in the 
[Match] section) is for matching the interface by MAC. The second line 
(in the [Link] section) is for altering the MAC of the interface (MAC 
spoofing).

> That's not exactly the question I was asking, but maybe I'm missing something.

Sorry, my fault. I think the easiest solution would be to have no 
"Name=" line in the config file. Did I get it right now?

> With the config file you have above, and a
> static IP set, does systemd issue a SIOCSIFNAME ioctl against a socket FD?  If
> so, what string is in the ifr_newname char array?

Actually I don't know how systemd is accomplishing this task (I would 
have to read the sources first). But I guess that if_newname = 
"wireless0" (if systemd uses SIOCSIFNAME ioctl).

> And either way, what "ip addr add v.w.x.y/z dev XXXXXX" would systemd run to
> add the fixed IP to the interface?  (Or if it adds the address itself via
> netlink, then (a) why doesn't it use standard tools to do configuration, (b)
> does it actually support multiple addresses per interface like ip does, and
> (c) what name does it dereference to an ifindex for the ifa_index arg to the
> netlink message that it sends to add the address?)

I can't give an answer for (a) and (c). But I can say that systemd 
supports multiple adresses per interface. The description of the 
"Address=" line says:

"This option may be specified more than once."
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to