QUESTION Switching from DHCP to static IP

Marcus Booth

New Member
Joined
Mar 14, 2015
Messages
1
Reaction score
0
Just did an install on Raspberry Pi 2 using WM's tutorial. Very cool, up and running now, works great. When I did the initial install I set DHCP. Now I need to change to a static IP. I tried to do the change through WEBMIN and that seemed to muff things up and made system unresponsive. I rewrote my image and got back up on DHCP. I went back and just changed the IP in WEBMIN after looking at a post, now it looks like I'm using both the assigned static IP and the DHCP address (status screen shows all green UP and 2 IP addresses). Can someone point me at a correct method to shift from DHCP to static?
Thanks for the help everyone. PIAF is just outstanding.
MB
 

jerrm

Guru
Joined
Sep 23, 2015
Messages
838
Reaction score
405
Edit /etc/network/interfaces
Change the section that looks like:
Code:
auto eth0
allow-hotplug eth0
iface eth0 inet manual

to:
Code:
auto eth0
iface eth0 inet static
  address 192.168.0.123
  netmask 255.255.255.0
  gateway 192.168.0.1
  dns-nameservers 192.168.0.1
  dns-search mylan

Replacing values as appropriate.
 
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