Configure IP Address Manually on Ubuntu 12x 14x 16x

To configure IP Address Manually (Static) you need to open edit /etc/network/interfaces

nano /etc/network/interfaces

You will find default configuration

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

From above configure file we know that our interface name is eth0 and configured as dhcp

Below is an example of a static IP configuration on a system with only one Ethernet interface (eth0) and 192.168.1.10/24 for the IP address.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4

Leave a Reply

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