Setup Stage 2 – Network Configuration

Now that you have an SD configure with the base system, we need to configure the network so that we have a static ip address and unique name for each pi.

When the pi boots by default it will grab a dynamic ip address via dhcp and have the default hostname of raspberrypi, but we are going to have 5 Pi’s on our network so each needs its own name, plus we want to ensure that each Pi always boots with the same ip address.

First we edit the network configuration file

sudo vi /etc/network/interfaces

Which will look something like this

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

The network card is called eth0, and we need to change it from dhcp to static ip address. Edit the file, so it looks like use. You can use whatever ip address that works for your network. For this super computer I am going to use 192.168.1.200 – 192.168.1.205 for the Pi’s

auto lo

iface lo inet loopback
iface eth0 inet static
    address 192.168.1.201
    netmask 255.255.255.0
    gateway 192.168.1.254

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

We will set the other 4 Pi’s as do the individual per Pi configuration later

Next we need to edit the hostname file so that each Pi has a unique name

sudo vi /etc/hostname

Replace raspberrypi with unique name, for the first device I’ll use pislave1, and the configure 3 as pislave2, pislave3 and pislave4 and also have a pilaster which will control the 4 slaves

 

Your email address will not be published. Required fields are marked *