SUGGESTIONS Static IP on Incredible Pi

boilermanc

New Member
Joined
Jul 7, 2011
Messages
29
Reaction score
2
Running the latest build of Incredible Pi and not finding instructions on how to set a static ip. Any help would be much appreciated!

thanks!
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
Is this is a Pi only issue, or you just you don't know how to do it at all?

On regular PIAF I always use Webmin but there are ways to do it via the command line. A Google for "pbxinaflash fixed ip" should get you started.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
864
Reaction score
144
Since the Pi distribution being used is Debian-based, setting a fixed IP is different from the way CentOS does it. This assumes you want to set a static IP for interface eth0.

First, make a back-up of /etc/network/interfaces. Then open it and change iface eth0 inet dhcp to iface eth0 inet static. Add the following below that entry:

Code:
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.100 8.8.8.8 (local DNS and Google DNS)
dns-search mydomain.lan

Of course, you'll need to use network addressing suitable for your network. Don't just plug these numbers in above and expect it to work.
 

boilermanc

New Member
Joined
Jul 7, 2011
Messages
29
Reaction score
2
Hey Les, I have used netconfig in the past but that has been removed as I understand. I would use Webmin but am not finding it in the Pi build. Any idea how install/access? I figured it would already be in there but not able to get to it. Port 9001 is open.

thanks!
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
I am not familiar with the Pi. A google for 'raspberry pi webmin install' seems to throw up some interesting links.

One link I tried looks simple - http://goraspberry.com/pi/webmin-on-your-raspberry

I wonder why it is omitted from the initial build. As a non-Linux person, I would be lost without webmin.
 

boilermanc

New Member
Joined
Jul 7, 2011
Messages
29
Reaction score
2
Yeah! Ok, Les, used the directions you posted from this link: http://goraspberry.com/pi/webmin-on-your-raspberry and made it happen! Posted the short of it here in case someone needs this. The webmin file is updated from time to time but the basic instructions should stay the same.

Install Webmin
mkdir webmin
cd webmin
gunzip webmin-1.580.tar.gz
tar xf webmin-1.580.tar
cd webmin-1.580
sudo ./setup.sh /usr/local/webmin
Now just enter http://192.168.1.2:10000 in a browser. (Your Pi’s address might be different).
 
Joined
May 22, 2013
Messages
301
Reaction score
44
Ideally you want to avoid static ID addresses and use a reserved address instead. A reserved address still means it has the same address but importantly you can still have DHCP allocate an address if your network goes down and you cannot access it on another network which doesn't support your settings.
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
109
Ideally you want to avoid static ID addresses and use a reserved address instead. A reserved address still means it has the same address but importantly you can still have DHCP allocate an address if your network goes down and you cannot access it on another network which doesn't support your settings.

You certainly may be correct in your reasoning, but you didn't provide further details on what you mean, exactly. If "your network goes down", how does "another network" gain access, and why would a static IP vs a reserved IP make a difference?

Like I said, you may be right, but I'm confused... or, I need to let the coffee kick in!
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
why would a static IP vs a reserved IP make a difference?
A static IP is fixed on your system. If you have to move your system (with fixed ip 10.27.27.245) to an other location which uses a different subnet (192.168.0.x) then your system will not be accessible.

If you leave it with DHCP set then it will pick up an ip in the 192.16.0.x range and you can access it from there.

By a reserved IP what is meant is that the system is left with a DHCP setting but on the network router an IP is reserved for that specific system by referencing its MAC id and assigning a specific IP to it. As long as the system is connected to that network it will have a fixed IP but if it is moved to an other network then it will receive a new IP based on the DHCP server of that network.

Sort of best of both worlds.

The down side is that if you change your router and forget to reserve the IP then a new IP will be issued and all your phones will fail to register ...
 

MGD4me

Guru
Joined
Feb 3, 2009
Messages
505
Reaction score
109
Yes, I'm aware of the above, but I think you missed part of the question I posed earlier:

If "your network goes down", how does "another network" gain access, and why would a static IP vs a reserved IP make a difference?

With a reserved address used in the original network, yes you can now physically plug your PBX server to "another" network and receive an arbitrarily handed-out DHCP address. There would be "work" involved to determine what that address would be, and you still have to point all the phones to the new IP allocation, no? Plus, if the phones were on the failed original network... well, you see how it may not be quite as simple as stated in post #8.

I've always used fixed IP addresses myselft, but I'm also curious what other's best practices are, hence the questions.
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
Yes I agree with you that for a PBX a fixed IP of some sort is really a must - either fixed or reserved. Which you choose should depend on the likelihood of the system being moved to a 'foreign' site. If it will never be moved then used a fixed IP as a router change will be more likely within the lifetime of the whole set up.

If there is a likelihood of a move then with a fixed IP you could have a serious problem accessing the system, if you did not think ahead (or did not have the opportunity) to change the fixed IP to something suitable.

It has actually happened to me and I had to dig out an old router/switch, connect it to my laptop, change the subnet to the match the pbx, connect the pbx and then I could connect to the pbx.

All things considered, for most people a pbx is unlikely to be mobile so a fixed IP is probably to be preferred.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Actually a reserved dynamic IP is always the preferred solution because you never get locked out of your system. :boat:
 

LesD

Member
Joined
Nov 8, 2009
Messages
408
Reaction score
15
Actually a reserved dynamic IP is always the preferred solution because you never get locked out of your system. :boat:

Based on pure logic, I have to agree with you 100%. But in real life it may still be prudent to fix the IP.

If it is my own system that I may mess around with then it is a nice safety net to know that as long as I can determine the current IP, I can access the system.

However, if I install a system at a client, the most likely change that will happen there over the years is that the router gets changed. It should all be planned, documented and executed by a competent technician, but in practice this rarely happens. Even if the person knows about port forwarding etc, they are likely to miss or not understand the significance of the reserved IP.

All phones then stop working.
We could discuss this till the cows come home - let us say we are both right. Is that what you were hinting at with the :boat:? (a new one on me).
 

andres

New Member
Joined
May 27, 2013
Messages
5
Reaction score
0
Hi. I cannot set a static address and my router does not support DHCP reserved address.
I do set the static IP and can log into the raspberry from web, but I cannot get out to Internet.
Do you have any ideas ?

Thanks

Andres
 

Hyksos

Guru
Joined
May 28, 2011
Messages
474
Reaction score
70
Hi. I cannot set a static address and my router does not support DHCP reserved address.
I do set the static IP and can log into the raspberry from web, but I cannot get out to Internet.
Do you have any ideas ?

Thanks

Andres

Yes, Your PI like any system, needs a gateway and DNS servers, not only an IP. Your DHCP was supplying all that. You only setup the IP, hence your PI doesn't have valid gateway and dns servers.
 

DamienPBX

New Member
Joined
Aug 20, 2016
Messages
4
Reaction score
0
Can you set a static IP on the latest release via the GUI or would it still need to take place via command line? Im not used to the nano editor everyone mentions . My PBX works! just need to change the phones to the PBX ip each time the router restarts which is frustrating. I have other unrelated issues now(NAT), so Im finally trying to sort this out
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
Can you set a static IP on the latest release via the GUI or would it still need to take place via command line? Im not used to the nano editor everyone mentions . My PBX works! just need to change the phones to the PBX ip each time the router restarts which is frustrating. I have other unrelated issues now(NAT), so Im finally trying to sort this out
First. the above method s no longer the "sanctioned" method for Raspbian Jessie, see this link (I won't comment on the wisdom of this change). Replace the tutorial line "sudo vi /etc/dhcpcd.conf" with simply "nano /etc/dhcpcd.conf"

The best method is probably to set up the static ip by creating an address reservation for your Pi on the router. Most routers support this, but there is no way to tell you exactly how, router interfaces vary too much to hazard a guess.

If you must set it on the Pi, the only way is to edit the config files manually. Nano should be installed by default. Once started, Ctrl-X exits, follow the prompts at the bottom of the screen to save or discard your changes.

There is no way to properly admin a server without some basic command line skills. Take the time get over the initial hurdle and it will be rewarded.
 

DamienPBX

New Member
Joined
Aug 20, 2016
Messages
4
Reaction score
0
First. the above method s no longer the "sanctioned" method for Raspbian Jessie, see this link (I won't comment on the wisdom of this change). Replace the tutorial line "sudo vi /etc/dhcpcd.conf" with simply "nano /etc/dhcpcd.conf"

The best method is probably to set up the static ip by creating an address reservation for your Pi on the router. Most routers support this, but there is no way to tell you exactly how, router interfaces vary too much to hazard a guess.

If you must set it on the Pi, the only way is to edit the config files manually. Nano should be installed by default. Once started, Ctrl-X exits, follow the prompts at the bottom of the screen to save or discard your changes.

There is no way to properly admin a server without some basic command line skills. Take the time get over the initial hurdle and it will be rewarded.

jerrm, Thank you very much for this info! That clarifies things a lot more.

I managed to do DHCP reserved ip configuration for the incrediblePI on my router.

I'll get acquainted with the nano editor to enable myself to tackle the next set of tasks!
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top