jtlns
Posts: 7
Joined: Tue Jun 11, 2013 7:42 am

Help with setting static IP address with June/2013 image

Fri Jun 14, 2013 11:59 am

Hi everybody,

I'm trying to give my Raspberry Pi (running the Arch image of June, 6th, 2013) a fixed IP address. I tried to look for tutorials in these forums and on the internet but all of them refer to files/commands that don't exist on my image. (I found some message mentioning since May 2013 things changed)

So, can anybody provide the steps (or some tips) to give my Pi a static IP address?

Many thanks!
Jan

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Help with setting static IP address with June/2013 image

Fri Jun 14, 2013 12:03 pm

Wifi or Ethernet??

Richard S.

jtlns
Posts: 7
Joined: Tue Jun 11, 2013 7:42 am

Re: Help with setting static IP address with June/2013 image

Fri Jun 14, 2013 12:07 pm

redhawk wrote:Wifi or Ethernet??
I'm sorry, forgot to mention. Ethernet in my case. (dhcp is working fine)

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Help with setting static IP address with June/2013 image

Fri Jun 14, 2013 4:35 pm

It should just work out of the box if you have a router. Are you wanting to assign the IP manually?

I haven't memorized the steps and locations, but you should be able to copy an example from /etc/netctl/examples to /etc/netctl/MYETHERNET and change the IPs listed manually. For static, I think the example file is /etc/netctl/examples/ethernet-static

Did my ethernet page turn up? Details there which should also fit the June image, although only last tested on May image but I believe the changes mentioned to /bin, /sbin, etc. should not affect netctl, just location of apps and commands that are not in the /etc directory.

http://sdjf.esmartdesign.com/raspberrypi/ethernet.html
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Help with setting static IP address with June/2013 image

Fri Jun 14, 2013 5:27 pm

Copy /etc/netctl/examples/ethernet-static to /etc/netctl/ethernet-static
Edit it
Delete /etc/netctl/ethernet-dhcp
systemctl reenable [email protected]

DrMag
Posts: 63
Joined: Sat Jun 01, 2013 7:59 pm

Re: Help with setting static IP address with June/2013 image

Sat Jun 15, 2013 3:05 am

The other option is to configure your router to issue the static IP. This way has an advantage that if you're disconnected for a long period of time and using other machines, the router won't reissue your IP to a different machine potentially causing an address conflict. If the router is configured to issue a static IP, dhcp will work as usual, but always pull up that address.

User avatar
MrSamNC
Posts: 4
Joined: Fri Jun 21, 2013 11:25 pm

Re: Help with setting static IP address with June/2013 image

Sat Jun 22, 2013 12:58 pm

DrMag wrote:The other option is to configure your router to issue the static IP. This way has an advantage that if you're disconnected for a long period of time and using other machines, the router won't reissue your IP to a different machine potentially causing an address conflict. If the router is configured to issue a static IP, dhcp will work as usual, but always pull up that address.
1+ this was very easy to setup on my end. Thanks DrMag!

shreyas_patel21
Posts: 1
Joined: Sun Jul 28, 2013 2:06 pm

Re: Help with setting static IP address with June/2013 image

Sun Jul 28, 2013 2:17 pm

From the command prompt, type:

sudo bash and press enter

nano /etc/network/interfaces and press enter

Change the following entry from:
iface eth0 inet dhcp

Change it to:
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255

Press CTRL and O at the same time to save

Press CTRL and X together to exit

Reboot

spartacus
Posts: 28
Joined: Tue Jan 01, 2013 5:06 am
Location: california

Re: Help with setting static IP address with June/2013 image

Sun Jul 28, 2013 4:45 pm

shreyas_patel21 wrote:From the command prompt, type:

sudo bash and press enter

nano /etc/network/interfaces and press enter
/etc/network/ doesn't exist. the network config is in /etc/netctl/

Return to “Arch”