Raspberry Pi A User Manual page 92

Hide thumbs Also See for Raspberry Pi A:
Table of Contents

Advertisement

76
P A R T I
C O N N E C T I N G T H E B O A R D
If you need to return to automatic settings via DHCP, you need to edit the
file
interfaces
again and delete the
,
and
settings. Replace
with
address
netmask
gateway
static
dhcp
at the end of the
line, and then restart the networking service again.
iface
Setting a manual IP address isn't quite enough to get your Pi connected to the outside world.
Computers on modern networks have both a numerical address identifier—known as an IP
address—and a hostname or domain name. It's this latter, friendly name that allows you
simply to type
into your browser, instead of trying to remember
www.raspberrypi.org
.
93.93.128.176
A system called a Domain Name Service (DNS) server is responsible for looking up the friendly
names you supply and converting them into the numbers required to access the system. It
operates much like an automated telephone directory. Before you'll be able to access Internet-
connected systems via their domain names, you'll need to tell the Pi which DNS servers to use.
The list of DNS servers, known as nameservers in Linux parlance, is stored in
/etc/resolv.
. When the system gets its details through DHCP, this file is automatically filled in; but
conf
when you set an address manually, you need to provide the addresses of the nameservers on
your network. Normally, this would be the address of your router as found in the
gateway
line from the
file (described earlier in this chapter).
interfaces
To set the nameservers, open the file with
by typing the following command at the
nano
terminal:
sudo nano /etc/resolv.conf
Add each nameserver on a separate line, prefaced with
and a space. As an
nameserver
example, the
configuration for a network that uses Google's publicly accessi-
resolv.conf
ble nameservers to resolve domain names would appear like this:
nameserver 8.8.8.8
nameserver 8.8.4.4
You'll notice that the nameserver addresses need to be supplied as IP addresses, rather than
domain names. If you provided domain names instead, the Pi would enter an infinite loop of
trying to find a nameserver to ask how it can find the nameservers.
Save the file by pressing CTRL + O, and then quit
by pressing CTRL + X. Restart the
nano
networking interface by typing the following:
sudo /etc/init.d/networking restart

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Raspberry Pi Raspberry Pi A

This manual is also suitable for:

Raspberry pi b

Table of Contents