By default PES will connect to your network via an Ethernet cable and will try to acquire a DHCP lease. Most broadband routers are configured to use DHCP by default so you should just be able to plug in an Ethernet cable into your Raspberry Pi and your router to get PES connected to the Internet.
In the bottom left hand corner of the PES GUI you should see the IP address that has been assigned to your Raspberry Pi by your router.
On the About screen under Settings if you see the IP address 127.0.0.1 then your Raspberry Pi has not been assigned an IP address.
If you use static IP addresses on your network then please proceed as follows.
Step 1 - Access the command line¶
Connect a keyboard and Ethernet cable to your Raspberry Pi and exit the PES GUI to access the command line.
Pressing the ESC key will always exit PES to the command line regardless of which screen you are viewing.
2 - Stop eth0 interface¶
We must stop the Ethernet interface before we can configure it:
sudo ip link set down eth0
Step 3 - Create sample configuration¶
Now create a network profile for eth0:
cd /etc/netctl sudo install -m640 examples/ethernet-static eth0
Step 4 - Apply your network settings¶
Now you need to edit
/etc/netctl/eth0 to include your static IP settings.
sudo nano /etc/netcl/eth0
If you have not used
nano before, use the arrow keys on your keyboard to move between lines.
You should be presented with the following:
Description='A basic static ethernet connection' Interface=eth0 Connection=ethernet IP=static Address=('192.168.1.23/24' '192.168.1.87/24') #Routes=('192.168.0.0/24 via 192.168.1.2') Gateway='192.168.1.1' DNS=('192.168.1.1') ## For IPv6 autoconfiguration #IP6=stateless ## For IPv6 static address configuration #IP6=static #Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96') #Routes6=('abcd::1234') #Gateway6='1234:0:123::abcd'
For most people you should only have to modify the values for Address, Gateway and DNS.
The Address parameter must be specified in CIDR format. This format allows the subnet mask to be inferred as well as the IP address. For example, if your subnet mask is 255.255.255.0 and your static IP address is 192.168.0.9 then you would set the Address parameter like so
Here is a completed network profile for my network for example using a static IP address:
Description='A basic static ethernet connection' Interface=eth0 Connection=ethernet IP=static Address=('192.168.0.9/24') #Routes=('192.168.0.0/24 via 192.168.1.2') Gateway='192.168.0.1' DNS=('18.104.22.168', '22.214.171.124') ## For IPv6 autoconfiguration #IP6=stateless ## For IPv6 static address configuration #IP6=static #Address6=('1234:5678:9abc:def::1/64' '1234:3456::123/96') #Routes6=('abcd::1234') #Gateway6='1234:0:123::abcd'
- The static IP address for my Raspberry Pi is 192.168.0.9
- The subnet mask is 255.255.255.0
- The default gateway is my router: 192.168.0.1
- The DNS parameter is set to use Google’s DNS servers
Now save the file and exit.
If you are using
nano then press
Ctrl + X followed by
Y to save and exit the program.
Step 5 - Start the interface¶
Bring up the eth0 interface:
sudo netctl start eth0
Providing you have entered the correct settings for your network in the previous step your Raspberry Pi should now connect to the network.
You can verify that it has connected by using the
ifconfig command, e.g.
[[email protected] netctl]$ ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.9 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::ba27:ebff:fee6:fd37 prefixlen 64 scopeid 0x20<link> ether b8:27:eb:e6:fd:37 txqueuelen 1000 (Ethernet) RX packets 4697 bytes 310403 (303.1 KiB) RX errors 0 dropped 2 overruns 0 frame 0 TX packets 1417 bytes 161822 (158.0 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
If your interface has not come up please try running
sudo netctl status eth0 to see what errors occurred when bringing up the interface.
Step 6 - Enable interface at boot time¶
To make the interface start at boot time run the following command:
sudo netctl enable eth0
If at any point you want to disable the wired network adapter at boot time, then run:
sudo netctl disable eth0
Step 7 - Start PES¶
Now to start the PES GUI again run:
Or alternatively, reboot: