, ,

I have been trying to set a static IP using the Ethernet until John pointed out that I should buy a router to get a private network. In fact, ain’t I already using a router with my WiFi dongle? Hahaha! Oh my how silly am I. :p Thanks John!

So instead of configuring a static IP for eth0, I should instead do it for wlan as such:

sudo nano /etc/network/interfaces
auto lo
iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0

iface wlan0 inet static
address #static IP that I chose

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

To get the IP address range, type ifconfig, to get gateway address, type route.

To choose a static IP that is free and not in use, i use my laptop cmd to ping to the address. For example, I knew that my dhcp IP address was, so i ping that from my laptop and there is reply indicating that it is in use. Then I chose another number, 109, and ping it. When it replies “Destination host unreachable”, I know it is not in use.

Next up, save the RaspberryPi config for PuTTY and FTP! 🙂 Then I shall set up the LAMP web server.