Hardware Reference
In-Depth Information
Called in this manner,
ifconfig
provides information on all the network ports it can find
(see Figure 4-2). For the standard Raspberry Pi Model B, there are two ports: the physical
Ethernet port on the right side of the board, and a virtual
loopback
interface that allows pro-
grams on the Pi to talk to each other.
Figure 4-2:
The output of
ifconfig on
a Raspberry Pi
Model B
The output of
ifconfig
is split into the following sections:
❍
Link encap—
he type of
encapsulation
used by the network, which on the Model B will
either read
Ethernet
for the physical network port or
Local Loopback
for the vir-
tual loopback adaptor.
❍
Hwaddr
—he
Media Access Control (MAC) address
of the network interface, written in
hexadecimal. This is unique for every device on the network, and each Pi has its own
MAC address, which is set at the factory.
❍
inet addr—
he
internet protocol (IP) address
of the network interface. This is how you
find the Pi on the network if you're using it to run a network-accessible service, such as
a web server or file server.