You are not logged in.
Hello:
I want to use systemd-netword to setup my network.
Normally I use
dhcpcd eht0
to setup get my ip.
I thought that systemd-networkd is used to do that automatically. Here is my configuration file:
cat /etc/systemd/network/eth0.network
[Match]
Name=eth0
Host=localhost
[Network]
DHCPv4=true
DNS=14.25.36.9
DNS=41.52.63.8
DNS=47.58.60.7
[Address]
Address=1234:1234:1234:1234/64
[Route]
Gateway=fe80::1
If systemd-networkd is not used for this, then what is it used for?
Also, I need to setup a static ip for my Linode machine:
https://library.linode.com/networking/configuring-static-ip-interfaces#sph_id2
But i want to use networkd-systemd instead.
How do I achieve setting up a static ip using systemd-networkd? Is it this way:
https://wiki.archlinux.org/index.php/Systemd-networkd#Static_IP_network
or do I need to do something like this:
https://wiki.archlinux.org/index.php/Network_configuration#Persistent_configuration_on_boot_using_systemd_and_udev_rules
Thanks in advance for your kind help and time.
Last edited by jenia (2014-07-16 16:27:21)
Offline
I'm not sure about systemd-networkd, but there is a much simpler way of doing this. First, determine your network device using
# ip link
Let's say it turns out to be enp101s0
Then you enable and start dhcpd as follows
# systemctl enable dhcpcd@enp101s0.service
# systemctl start dhcpcd@enp101s0.service
Please mark your subject with [SOLVED] if this answered your question.
Last edited by pgoetz (2014-07-16 15:42:14)
Offline
Not sure where you got
[Network]
DHCPv4=true
from, but it's wrong. As per systemd.network(5), you need
DHCP=both|none|v4|v6
That man page also covers static addresses.
Offline