Posts: 78
Joined: Mon Jan 14, 2013 12:11 pm

Static IP

Wed Jan 23, 2013 3:35 pm

Hi all,

I will soon have a number of Raspie's and as my DHCP router assigns IP addresses it becomes a bit of a pain.
So my question is....

Is it best (how do I) assign a static IP per Raspie that it maintains after a boot or is there a way to 'name" each raspie (I guess like DNS) so I can access it via a name rather than IP (or have some lookup procedure to convert name to IP).

I wish to have the raspie's communicate with each other and exchange data so a constant method i.e. fixed ip or fixed name would make it simpler.

Any help/suggestions appreciated

User avatar
Posts: 2
Joined: Wed Jan 23, 2013 3:08 pm
Location: Rochester, MN
Contact: Website

Re: Static IP

Wed Jan 23, 2013 3:53 pm

Most recent routers let you assign an IP address based on the device MAC address. I have a couple of Pi's set up that way (just give them an IP outside the DHCP range you normally use).

Posts: 411
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA

Re: Static IP

Wed Jan 23, 2013 4:04 pm

How you assign a static IP is dependent on the OS you're running. Are you running Raspbian, Arch, Fedora, RISC OS, or FreeBSD?

One way around it might be to configure your router to always assign the same dhcp ip address by MAC address. My son likes to run a minecraft server on his laptop. I can't give him a static IP on his laptop, as he will take it out of the house, and it won't work. So I tell the router to always give his laptop a certain IP address. Whenever his laptop reque4sts a new IP, it always gets the same one, and I can setup the router rules for his server in my router.

Edit: BobStrog and I are saying the same thing. When I started my reply, he hadn't posted his yet. I wasn't being redundant on purpose. :D
There are 10 types of people in this world. Those that understand binary, and those that don't.

Posts: 78
Joined: Mon Jan 14, 2013 12:11 pm

Re: Static IP

Wed Jan 23, 2013 4:21 pm

Thanks all,

So you are saying my router should intheory allow giving out a static ip address based on the devices MAC?
I currently got it working manually by editing /etc/network/interfaces ; but this method sounds better!

Thanks guys! :P

Posts: 78
Joined: Mon Jan 14, 2013 12:11 pm

Re: Static IP

Wed Jan 23, 2013 4:27 pm

Yep!; with router works a treat :-)))


Return to “Networking and servers”