Day 6 Setting a static IP address

This is a quick easy one.

Setting an static ip address is very simple.

All you need to do is make a small configuration change to your ‘interfaces’ file found in /etc/network/

But first things first. Make a copy of your ‘interfaces’ file with a different name.

Presuming that you followed the earlier example of altering your ‘interfaces’ file all you need to do is copy the iface default inet static section entering your local network details where indicated.

e.g.

auto lo

auto wlan0

iface eth0 inet dhcp

allow-hotplug wlan0

iface wlan0 inet manual

wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet static

address [insert your address here] e.g.      192.168.100.2

netmask [insert your netmask here]  e.g.  255.255.255.0

gateway [insert your gateway here] e.g.     192.168.100.1

 

remember to save your file and reboot.

Leave a comment