Operation Manual

Don’t be tempted to go for a gigabit-class adapter, which will be referred to as a 10/100/1000 USB Ethernet adapter. Standard USB ports, as used on the
Raspberry Pi, can’t cope with the speed of a gigabit Ethernet connection, and you’ll see no benefit to the more expensive adapter.
Wired Networking
To get your Raspberry Pi on the network, youll need to connect an RJ45 Ethernet patch cable between the Pi and a switch,
router or hub. If you dont have a router or hub, you can get your desktop or laptop talking to the Pi by connecting the two
directly together with a patch cable.
Usually, connecting two network clients together in this way requires a special cable, known as a crossover cable. In a crossover
cable, the receive and transmit pairs are swapped so that the two devices are prevented from talking over each othera task
usually handled by a network switch or hub.
The Raspberry Pi is cleverer than that, however. The RJ45 port on the side of the Pi (see Figure 1-7) includes a feature known
as auto-MDI, which allows it to reconfigure itself automatically. As a result, you can use any RJ45 cablecrossover or notto
connect the Pi to the network, and it will adjust its configuration accordingly.
Figure 1-7: The Raspberry Pi Model Bs Ethernet port
If you do connect the Pi directly to a PC or laptop, you wont be able to connect out onto the Internet by default. To do so,
youll need to configure your PC to bridge the wired Ethernet port and another (typically wireless) connection. Doing so is
outside the scope of this book, but if you are completely unable to connect the Pi to the Internet in any other way, you can try
searching your operating systems help file forbridge network to find more guidance.
With a cable connected, the Pi will automatically receive the details it needs to access the Internet when it loads its operating
system through the Dynamic Host Configuration Protocol (DHCP). This assigns the Pi an Internet Protocol (IP) address on your
network, and tells it the gateway it needs to use to access the Internet (typically the IP address of your router or modem).
For some networks, there is no DHCP server to provide the Pi with an IP address. When connected to such a network, the Pi
will need manual configuration. Youll learn more about this in Chapter 4, “Network Configuration.
Wireless Networking
Current Raspberry Pi models dont feature any form of wireless network capability onboard, butas with adding wired Ethernet
to the Model Aits possible to add Wi-Fi support to any Pi using a USB wireless adapter (see Figure 1-8).