Sebastian Plotz wrote:
> Am 14.04.2014 21:52, schrieb Bruce Dubbs:
>> I've thought about it, but my experience with systemd is limited. Do
>> you have specific instructions I can test with LFS? -- Bruce
>
> Ok, I'll try to give a starting point.
>
> 1.) First of all we need to create a .link file (for example
> 15-eth0.link) in /usr/lib/systemd/network:
>
> [Match]
> MACAddress=12:34:56:78:9a:bc
>
> [Link]
> Name=eth0
>
> This assignes the name eth0 to the interface with the MAC address
> 12:34:56:78:9a:bc. The file name is important: if there would be a
> second file (for example 10-eth1.link) with "Name=eth1"instead of
> "Name=eth0" the interface would get the name eth1.

Interesting.  Do you know what happens if there is a udev rule that 
creates eth0?  Is this .link file needed?  I can test that so it's 
somewhat of a rhetorical question.


> 2.) The second step would be to create .network files (for example
> 10-eth0-static.network) in /usr/lib/systemd/network. These files are
> read by systemd-networkd. This service is started by default in
> multi-user.target
> (http://www.phoronix.com/scan.php?page=news_item&px=MTYxMTI). Otherwise
> the service can be enabled with
>
> systemctl start systemd-networkd
>
> I took the example configuration from the LFS book:
>
> [Match]
> Name=eth0
>
> [Network]
> Address=192.168.1.2/24
> Gateway=192.168.1.1
>
>
> This configuration assigns the ip address and the gateway to the
> interface eth0. It is also possible to use DHCP and other things (see
> http://www.freedesktop.org/software/systemd/man/systemd.network.html).
>
> I hope this helps a bit. I'm open to discuss further details.

If I understand correctly, systemd has built in dhcp too.  E.g.

[Match]
Name=eth0

[Network]
DHCP=true


I'll experiment a little, but probably not until Wednesday.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to