1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. If you had a PIAF Forum account in the vBulletin days, log in with your old credentials. Otherwise, sign up again and we'll get you back in business as soon as we can.
  3. A serious FreePBX vulnerability has been reported. Update your Framework Module immediately. Click here for details.

SUGGESTIONS Static IP on Incredible Pi

Discussion in 'Help' started by boilermanc, Jun 4, 2013.

  1. boilermanc New Member

    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!
  2. LesD Member

    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.
  3. randy7376 Guru

    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.
  4. boilermanc New Member

    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!
  5. boilermanc New Member

    Hey Randy, thanks, I will give that a shot.
  6. LesD Member

    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.
  7. boilermanc New Member

    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).
    liku likes this.
  8. 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.
  9. MGD4me Guru

    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!
  10. lgaetz Pundit

    If a device is configured via DHCP then you can plug it into any subnet with a DHCP server and it will be accessible via the LAN. If it is configured for static, you will probably have to plug a monitor and keyboard in to make it usable (or if that is not an option, factory reset)

    That said, there are very good reasons to set a Static IP on important devices such as a PBX and other servers. There is always a possibility of DHCP disruption on your LAN such as the DHCP server going down or a stray device providing a competing DHCP service. I could (and actually did) bring my office LAN to its knees by plugging a router into a LAN drop. The static IP devices didn't even notice.
    Last edited by lgaetz, Jun 10, 2013
  11. LesD Member

    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 ...
  12. MGD4me Guru

    Yes, I'm aware of the above, but I think you missed part of the question I posed earlier:

    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.
  13. LesD Member

    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.
  14. wardmundy Nerd Uno

    Actually a reserved dynamic IP is always the preferred solution because you never get locked out of your system. :boat:
  15. LesD Member

    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).
  16. andres New Member

    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
  17. Hyksos Guru

    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.

Share This Page