OCR Raspberry Pi Getting Started Tutorials
18
Servers listen for client requests using a port. A port is like a door waiting for
someone to knock on it. When it receives a request from a client the server will
respond with the information. Each port has a number which determines the
type of data to be sent. Some ports are reserved so that when a client sends
a request for information, it always uses the same port number. For example
when you enter an address into your Raspberry Pi’s web browser, it will connect
to port 80 which is reserved for delivering web pages. The browser takes care of
which port number to use so that you don’t have to concern yourself with this.
You can view the following file which lists your network interfaces:
/etc/network/interfaces
A snippet of the file looks like this:
iface eth0 inet dhcp
The word iface is referring to an interface and eth0 is referring to the Ethernet
port. Eth0 is the only Ethernet interface on the Raspberry Pi. The rest of the line
uses something called DHCP (dynamic host configuration protocol) a protocol
used to configure network devices. DHCP is used to automatically obtain a
unique IP address which allows your Raspberry Pi to be connected to a network.
Basic Networking
7