I recently bought a Raspberry Pi 2B and was setting it up. I was told to make the IP static by changing the line
iface eth0 inet dhcp
However, the IP config file did not contain the word dhcp
anywhere. It looked something like this
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
Then I changed it to this:
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet static
address 192.168.1.121
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.2.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
I tried to change manual
to static
, but nothing worked. Can someone please tell me what to do?