Solved

How To Change IP from Dynamic to STATIC using GUI and Command Line on Ubuntu 10.04?

Posted on 2012-04-04
2
512 Views
Last Modified: 2012-04-05
How can I change to STATIC IP address using GUI and Command Line on Ubuntu 10.04 ?
0
Comment
Question by:mshamsan
2 Comments
 
LVL 9

Accepted Solution

by:
Ashok Dewan earned 300 total points
ID: 37809551
To change IP address via command line type the below :-

to set that ip   :- ifconfig eth0 192.168.1.5/24
to set the default gateway :  route add eth0 default gw 192.168.1.1
to set the DNS servers :-  echo nameserver "dns ip address" > /etc/resolve.conf

or to set via GUI the check the following link :-
http://www.youtube.com/watch?v=2_ifSRJhtQU
0
 
LVL 27

Assisted Solution

by:serialband
serialband earned 200 total points
ID: 37814262
Those instructions do set the address, but it won't survive a reboot.  You need to edit /etc/network/interfaces and change out the dhcp entry there.  Then restart networking.

sudo vi /etc/network/interfaces

# The primary network interface

auto eth0
 iface eth0 inet static
 address 192.168.1.100
 gateway 192.168.1.1
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.255

Open in new window


sudo /etc/init.d/networking restart
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now