User avatar
BakaOsaka
Posts: 40
Joined: Tue Jun 12, 2012 11:30 am

Arch Linux Static IP issues

Sat Oct 06, 2012 5:13 pm

Hi all.
I have just installed Arch to my Pi's SD, and have been configuring it. I have network working through automatic assignment, but I want to give my Pi a static IP address so it's easier to ssh into and such.

I've edited my /etc/rc.conf to look like this:

Code: Select all

interface="eth0"
address="192.168.0.100"
netmask="255.255.255.0"
gateway="192.168.0.1"
hostname ="alarmpi"
However whenever I reboot my Pi it is automatically assigned an IP address.
Is there something I am doing wrong?
Thanks!

broo0ose
Posts: 318
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Arch Linux Static IP issues

Sat Oct 06, 2012 7:26 pm

yes, remove the quotes.

interface=eth0
address=192.168.0.2
netmask=255.255.255.0
broadcast=192.168.0.255
gateway=192.168.0.1

User avatar
BakaOsaka
Posts: 40
Joined: Tue Jun 12, 2012 11:30 am

Re: Arch Linux Static IP issues

Sat Oct 06, 2012 7:43 pm

Just tried that, sadly it still does nothing. Also worth noting that I forgot to include is I have the "network" daemon added. My IP is still dynamic, though.

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: Arch Linux Static IP issues

Sun Oct 07, 2012 7:54 am

Add this line:

Code: Select all

dns-nameservers 192.168.0.1
dns-nameservers line is required since ubuntu 12.04 came out.

User avatar
BakaOsaka
Posts: 40
Joined: Tue Jun 12, 2012 11:30 am

Re: Arch Linux Static IP issues

Sun Oct 07, 2012 10:29 am

I'm on Arch Linux. The nameservers are stored in /etc/resolv.conf I thought? So that wouldn't work?

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: Arch Linux Static IP issues

Sun Oct 07, 2012 2:34 pm

They used to be stored in resolv.conf in Ubuntu as well prior to 12.04 release.
Since 12.04, resolv.conf is overwritten after every reboot so you end up with an empty file so no static ip is possible.
By using the dns-nameservers, you will force the writing of nameserver in resol.conf.

User avatar
BakaOsaka
Posts: 40
Joined: Tue Jun 12, 2012 11:30 am

Re: Arch Linux Static IP issues

Sun Oct 07, 2012 4:49 pm

I just tried that, it still seems to not work sadly. Thanks anyway, though.

bvanderveen
Posts: 1
Joined: Thu Oct 11, 2012 11:27 pm

Re: Arch Linux Static IP issues

Thu Oct 11, 2012 11:30 pm

I wrote a blog post on how I set up my Arch Linux Raspberry Pi to get a static IP:

http://bvanderveen.com/a/rpi-booted-static-ip-ssh/

tomw889
Posts: 6
Joined: Fri Jan 18, 2013 4:07 am

Re: Arch Linux Static IP issues

Fri Jan 18, 2013 4:12 am

Here is a tutorial I wrote for installing and using the older initscripts rc.conf file.. pretty easy for beginners:

http://www.administeria.com/raspberry-p ... iguration/

Return to “Troubleshooting”