You are not logged in.
This must be very simple but I haven't been able to figure it out. I'm trying to set up a server with a static IP address.
Settings from the datacenter:
216.126.195.248/29 - Network
216.126.195.249 - Gateway
216.126.195.250 - Server
216.126.195.251 ...216.126.195.254 - Free
216.126.195.255 - Broadcast
255.255.255.248 - Netmask
/etc/systemd/network/hostname.network:
[Match]
Name=enp0s25
[Network]
Address=216.126.195.248/29
Gateway=216.126.195.249
ip link:
1: lo: <LOOPBACK,UP<LOWER_UP>....
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 00:23:8b:57:d2:68 brd ff:ff:ff:ff:ff:ff
3: enp8s0: <NO-CARRIER,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000 link/ether 00:23:8b:57:d2:69 brd ff:ff:ff:ff:ff:ff
dmesg | grep enp:
...e1000e ... enp0s25: renamed from eth0
....e1000e .... enp8s0 renamed from eth1
....enp8s0: link is not ready
....enp0s25: link becomes ready
(Can't copy and paste from IP KVM; please forgive the shortening of the output.)
ping 8.8.8.8:
100% packet loss.
Last edited by rhodie (2015-09-23 02:24:18)
Offline
What is the output of these commands?
systemctl status systemd-networkd
ip addr show dev enp0s25
ip route
ping 216.126.195.249
You may also get more useful log info from something like
sudo journalctl -b | grep enp0s25
Offline
systemctl status systemd-networkd:
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: active (running) since ... 5min ago
Docs: man:systemd-networkd-service(8)
Main PID: 1526 (systemd-network)
Status: "Processing requests..."
CGroup: /system.slice/systemd-networkd.service
`-1526 /usr/lib/systemd/systemd-networkd`
Sep 22 20:23:18 hostname systemd[1]: Starting Network Service...
Sep 22 20:23:18 hostname systemd-networkd[1526]: Starting Network Service...
Sep 22 20:23:18 hostname systemd[1]: Started Network Service...
ip addr show dev enp0s25:
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:23:8b:57:d2:68 brd ff:ff:ff:ff:ff:ff
inet 216.126.195.248/29 brd 216.126.195.255 scope global enp0s25
valid_lft forever preferred_lft forever
inet6 fe80:bdc5:ab4e:25d8:d1e6/64 scope link
valid_lft forever preferred_lft forever
ip route:
default via 216.126.195.249 dev enp0s25 proto static
216.126.195.248/29 dev enp0s25 proto kernel scope link src 216.126.195.248
ping 216.126.195.249:
23 packets transmitted, 0 received, 100% packet loss, time 21999ms
journalctl -b | grep enp0s25
...kernel: e1000e 0000:00:19.0 enp0s25: renamed from eth0
....systemd-networkd[383]: enp0s25: Gained carrier
....kernel: e10003: enp0s25 NIC Link is Up 1000Mbps Full Duplex, Flow Control: Rx
....systemd-networkd[437]: enp0s25: Configured
* all output retyped because I can't figure out how to copy and paste from the KVM. Typos possible.
Last edited by rhodie (2015-09-23 01:20:21)
Offline
It appears that networkd is starting cleanly and properly applying the settings from the .network file. However, the host address being set is the "host all zeros" address, which is typically reserved to refer to the subnet and might not behave as a useable host address. Try an address from the free .251-.254 range. If it still does not work, check the configuration of the virtual network on the host.
Offline
Thank you! Your suggestion to try .251-.254 helped me figure it out. I changed
Address=216.126.195.248/29
to
Address=216.126.195.250
Address=216.126.195.251
Address=216.126.195.252
Address=216.126.195.253
Address=216.126.195.254
and now it's working. (man systed.network says "Specify this key [Address] more than once to configure several addresses.") I also found that I needed to add
DHCP=ipv4
(even though I'm not using DHCP) or systemd-networkd shuts down. Bug report about that: https://bugs.freedesktop.org/show_bug.cgi?id=90824
Offline