Connect your Pi to the internet

Wired Ethernet connection

Consumer routers are usually configured to issue an IP address to your devices via DHCP as soon as they are connected. This means that in most cases, connecting your Pi to the internet via a wired Ethernet connection is as simple as connecting your Raspberry Pi to your internet router/switch with a standard Ethernet cable.

Raspberry Pi connected to a switch

Troubleshooting an Ethernet connection

Should you run into an issue on a wired Ethernet connection you should test the connection on your PC/laptop first. If your PC can get an internet connection on a wired Ethernet cable, typically the Pi can too.

Possible issues may include:

A damaged Ethernet cable. This is pretty rare but it can happen.

DHCP may be turned off on your router and because of that your device is not being issued an IP address. Most consumer routers have DHCP enabled by default, so if it is disabled it's quite likely that you have a special networking setup that you are aware of which may require a static address be assigned to your Pi.

If you're connecting through a USB-to-Ethernet adapter instead of default Ethernet port you might run into driver issues if your USB device is not natively supported in your chosen operating system. You may wish to try using the standard Pi Ethernet port first to establish if the issue is general, or is specific to the particular USB device you are using.

A router or general internet fault. If you can't get any internet access via your router (including to your PC/laptop), you may need to replace the router and/or raise the issue with your ISP. They will probably ask the typical quesiton 'have you power cycled it?', so it's worth giving that a shot too.

Wireless connection

At the time of writing, only Raspberry Pi 3 devices have built in Wifi. For older devices, The WiPy USB Wireless module is available from the Raspberry Pi Store.

Raspberry Pi using WiFi module

WiPy on Raspberry Pi version 1 devices

In some very early Raspberry Pi devices (model 1), the power supply was in some cases insufficient to properly power the WiPy device and brownouts and dropped connections would result. We recommend you use at least a Raspberry Pi version 2 if you require a WiFi connection to your Pi.

Check your network is visible and in range

Open a terminal emulator and type in the command below to get a list of networks visible to your Pi:

Test your connection

You can try to 'ping google.com' to check that your internet connection is working. If this fails, either google.com is broken or your internet connection isn't working, needless to say the latter is more likely. :)

The command below will send 5 packet to google and return connection statistics.