Kaikz
Posts: 8
Joined: Thu Aug 29, 2013 3:59 am

Static IP network config fails to load

Thu Aug 29, 2013 4:04 am

I'm using the 22/7 Arch Arm build found on the downloads page here and I've got everything else I want working, besides my static IP network config.

This is the config I have:

Code: Select all

[[email protected] netctl]# cat staticip
Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.2.7/24')
Gateway='192.168.2.1'
DNS=('8.8.8.8', '202.180.64.10', '202.180.64.11')
And this is the error I have:

Code: Select all

[[email protected] ~]# netctl status staticip
[email protected] - A basic static ethernet connection
   Loaded: loaded (/etc/systemd/system/[email protected]; enabled)
   Active: failed (Result: exit-code) since Thu 1970-01-01 00:00:14 UTC; 43 years 7 months ago
     Docs: man:netctl.profile(5)
  Process: 118 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
Instead of loading this config at boot, it just gets a dynamic IP from the DHCP server. I don't have options in my router config to allocate an IP according to MAC address either.

Thanks.

drgeoff
Posts: 9206
Joined: Wed Jan 25, 2012 6:39 pm

Re: Static IP network config fails to load

Thu Aug 29, 2013 6:50 am

Remove the commas, leaving only spaces, between the addresses in the DNS list.

Kaikz
Posts: 8
Joined: Thu Aug 29, 2013 3:59 am

Re: Static IP network config fails to load

Thu Aug 29, 2013 7:13 am

drgeoff wrote:Remove the commas, leaving only spaces, between the addresses in the DNS list.
Just did that and I get a similar error and it still boots into a dynamic IP, not the IP specified in the config.


Kaikz
Posts: 8
Joined: Thu Aug 29, 2013 3:59 am

Re: Static IP network config fails to load

Thu Aug 29, 2013 7:36 am

http://www.raspberrypi.org/phpBB3/viewt ... 59#p358659

There is no netcfg and/or /etc/network.d/. Nothing in that thread helps with netctl.

drgeoff
Posts: 9206
Joined: Wed Jan 25, 2012 6:39 pm

Re: Static IP network config fails to load

Thu Aug 29, 2013 8:09 am

What are the current contents of the file 'staticip' ?

User avatar
RaTTuS
Posts: 10228
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Static IP network config fails to load

Thu Aug 29, 2013 8:22 am

probably bets to try the arch forum
but
Address=('192.168.2.7/24')
Gateway='192.168.2.1'
DNS=('8.8.8.8', '202.180.64.10', '202.180.64.11')
looks completely wrong to me
Address=('192.168.2.7)
Gateway='192.168.2.1'
DNS=('8.8.8.8' '202.180.64.10' '202.180.64.11')
may be better
but IMO seriously set it to dhcp and have your router set a static address this makes the RPi more portable
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Kaikz
Posts: 8
Joined: Thu Aug 29, 2013 3:59 am

Re: Static IP network config fails to load

Thu Aug 29, 2013 8:30 am

RaTTuS wrote:probably bets to try the arch forum
but
Address=('192.168.2.7/24')
Gateway='192.168.2.1'
DNS=('8.8.8.8', '202.180.64.10', '202.180.64.11')
looks completely wrong to me
Address=('192.168.2.7)
Gateway='192.168.2.1'
DNS=('8.8.8.8' '202.180.64.10' '202.180.64.11')
may be better
but IMO seriously set it to dhcp and have your router set a static address this makes the RPi more portable
I've tried removing the /24 and removing the commas, still doesn't work. I've already said my router doesn't have options for that.
drgeoff wrote:What are the current contents of the file 'staticip' ?
It's in the OP, but I'll repeat it here with changes mentioned.

Code: Select all

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.2.7')
#Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.2.1'
DNS=('8.8.8.8' '202.180.64.10' '202.180.64.11')

surfatwork
Posts: 62
Joined: Mon May 06, 2013 8:26 am

Re: Static IP network config fails to load

Fri Aug 30, 2013 8:41 pm

Check if your interface is actually named eth0 with

Code: Select all

ls /sys/class/net 
Arch, actually systemd/udev, changed the interface naming convention recently. For example, the ethernet interface on my Arch laptop is enp0s25

Kaikz
Posts: 8
Joined: Thu Aug 29, 2013 3:59 am

Re: Static IP network config fails to load

Fri Aug 30, 2013 11:28 pm

surfatwork wrote:Check if your interface is actually named eth0 with

Code: Select all

ls /sys/class/net 
Arch, actually systemd/udev, changed the interface naming convention recently. For example, the ethernet interface on my Arch laptop is enp0s25

Code: Select all

[[email protected] ~]# ls /sys/class/net
eth0  ifb0  ifb1  lo
It wouldn't be ifb0 considering there's only one ethernet port, would it? I'm not sure what lo means either.

surfatwork
Posts: 62
Joined: Mon May 06, 2013 8:26 am

Re: Static IP network config fails to load

Sun Sep 01, 2013 12:13 am

Your ethernet interface is eth0. lo is the loopback interface.
Do you have any other config files in /etc/netctl for eth0?
Do you have [email protected] enabled? check with

Code: Select all

 # systemctl status [email protected] 
If yes, then stop it with

Code: Select all

 # systemctl stop [email protected] 
Run

Code: Select all

 # netctl stop-all
Edit your staticip file and remove the () around the address. It should read Address='192.168.1.23/24'
Then run

Code: Select all

# systemctl start [email protected]
See if eth0 gets assigned the static IP.

Return to “Arch”