You are not logged in.

#1 2013-06-03 14:47:09

chord
Member
Registered: 2012-11-07
Posts: 121

[Solved] Network does not starts on every boot

Yet another problem on fresh arch...
Network service does not starts every time I booting my headless. For every 10 attempts service starts 5 or 6 times only.
Ping says: Networking unreachable.

systemctl status network:

network.service - Static IP Connectivity
   Loaded: loaded (/etc/systemd/system/network.service; enabled)
   Active: inactive (dead)

'systemctl start network' just hangs. In order to get it start I have to reboot the box hoping next boot service will start.
I am not using dhcp (if it makes a sence). Service was configured as described in wiki for static IP assigning.
The config itself:

[Unit]
Description=Static IP Connectivity
Wants=network.target
Before=network.target
BindsTo=sys-subsystem-net-devices-enp4s1.device
After=sys-subsystem-net-devices-enp4s1.device

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ip link set dev enp4s1 up
ExecStart=/sbin/ip addr add 192.168.1.5/24 dev enp4s1
ExecStart=/sbin/ip route add default via 192.168.1.1

ExecStop=/sbin/ip addr flush dev enp4s1
ExecStop=/sbin/ip link set dev enp4s1 down

[Install]
WantedBy=multi-user.target

What's wrong?

Thanks in advance for any help.

Last edited by chord (2013-06-03 17:04:55)

Offline

#2 2013-06-03 15:00:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,355

Re: [Solved] Network does not starts on every boot

I would take a close look through the journal and look for clues.  It might be that your network interface naming is non-deterministic.  Yes, I know that Arch is now supposed to have predictable file names; but I have seen some chatter on these boards about problems with some services, and the order in which they start, causing interfaces not to be renamed as expected.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2013-06-03 15:31:13

chord
Member
Registered: 2012-11-07
Posts: 121

Re: [Solved] Network does not starts on every boot

Thaks for your reply.
I got this interface name from ip addr,  how it should be named if 'enp4s1' is wrong?
journalctl is here: http://bpaste.net/show/104083/
I found only one string realted to this device name:

Jun 03 15:18:23 localhost systemd[1]: Expecting device sys-subsystem-net-devices-enp4s1.device...

Is there some other logs where it can be checked?

Offline

#4 2013-06-03 17:04:17

chord
Member
Registered: 2012-11-07
Posts: 121

Re: [Solved] Network does not starts on every boot

I disabled this stupid naming by adding 'net.ifnames=0' to kernel boot options and renamed my inteface to old good eth0 back.
Booted 10 times for checking - eth0 works just fine.

Offline

#5 2013-06-03 17:15:17

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,355

Re: [Solved] Network does not starts on every boot

Out of curiosity, would this thread have been applicable  ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2013-06-03 17:48:33

chord
Member
Registered: 2012-11-07
Posts: 121

Re: [Solved] Network does not starts on every boot

I do not know. I've seen this solution, but I was not sure this is pretty the same issue that I had. So I decided to add kernel option instead of other three ways that I found here:
http://www.freedesktop.org/wiki/Softwar … faceNames/

Offline

Board footer

Powered by FluxBB