Difference between revisions of "Static IP Config"
From SingletonMillerWiki
Line 19: | Line 19: | ||
gateway 192.168.0.1 | gateway 192.168.0.1 | ||
</pre> | </pre> | ||
+ | |||
+ | Exit and save the file with CTRL-X followed by Y to confirm the changes. | ||
The gateway is the address for the router and may need to be adjusted. | The gateway is the address for the router and may need to be adjusted. |
Latest revision as of 04:42, 4 June 2012
Setting a static IP is useful to ensure that any DHCP activity on your network won't change the location of your RPi.
To do this we need to edit /etc/network/interfaces
sudo nano /etc/network/interfaces
replace the line iface eth0 inet dhcp
with
iface eth0 inet static address 192.168.0.20 netmask 255.255.255.0 gateway 192.168.0.1
Exit and save the file with CTRL-X followed by Y to confirm the changes.
The gateway is the address for the router and may need to be adjusted.