Hardware Reference
In-Depth Information
Note
Be sure to get approval and an Ip address assigned to prevent network conflicts.
/etc/network/interfaces
As supplied by the standard Raspbian image, the /etc/network/interfaces file looks
like this:
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow−hotplug wlan0
iface wlan0 inet manual
wpa−roam/etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
$
The wired Ethernet interface (Model B) is named eth0 . The line starting with
iface eth0 indicates that your network interface eth0 is using DHCP. If this is what
you want, leave it as is.
Changing to Static IP
If you haven't booted up your Raspberry Pi with the network cable plugged in, now is
a good time to do that. This may save you time later, when we review the name server
settings.
Next, before you start changing it, save a backup of the /etc/network/interfaces
file in case you want to change it back:
$ sudo −i
# cd /etc/network
# cp interfaces interfaces.bak
Next, edit the line in /etc/network/interfaces that begins with iface eth0 so that
it reads like the following:
iface eth0 inet static
address 192.168.0.177
gateway 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
 
 
Search WWH ::




Custom Search