LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2008, 10:44 AM   #1
200mg
Member
 
Registered: Jul 2006
Posts: 85

Rep: Reputation: 15
? about static ip address


I just want to make sure this is a sufficient process for setting a static ip via cl.

In /etc/network/interfaces change:
Code:
iface eth0 inet dhcp
to

Code:
iface eth0 inet static
then add your desired ip, netmask, gway

then give a
Code:
ifdown
Code:
ifup

Code:
auto lo
iface lo inet loopback


iface eth0 inet static
address 192.168.217.248
netmask 255.255.255.0
gateway 192.168.217.1

auto eth0
 
Old 11-06-2008, 11:55 AM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
More or less correct. The only thing - you need to specify the interface with ifup/ifdown (or use '-a' for all).

However if you have NetworkManager installed (or something similar) you'd need to disable them first before doing the above.
 
Old 11-06-2008, 12:19 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
don't forget to set your DNS in /etc/resolv.conf

Code:
it-etch:/$ cat /etc/resolv.conf 

search yourdomain.com
nameserver 192.168.1.25
nameserver 192.168.1.24
Lack of DNS could hinder your browsing abilities a bit.
 
Old 11-06-2008, 02:12 PM   #4
200mg
Member
 
Registered: Jul 2006
Posts: 85

Original Poster
Rep: Reputation: 15
thanks for the replies
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set IP address to static from DHCP assigned address jborn Linux - Networking 4 02-02-2007 09:38 PM
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 04:35 AM
Static IP address mikz Slackware 4 11-28-2005 05:30 PM
Getting static IP address etc. chapzilla Linux - Newbie 2 06-16-2003 12:40 PM
Static IP Address bytebrowser Linux - Networking 14 06-16-2003 07:36 AM


All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration