Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-04-2005, 07:27 PM   #1
LQ Newbie
Registered: Jan 2005
Posts: 2

Rep: Reputation: 0
Post Static IP

How do I change my Linux box from DHCP to a static IP? I'm useing Debian with KDE.

Old 01-04-2005, 07:32 PM   #2
Gentoo Developer
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 58
I just went through this,how do you connect?What distro?What isp?Give us the numbers you have like;
ifconfig_eth0=( " netmask broadcast" )
routes_eth0=( "default gw" )

Last edited by comprookie2000; 01-04-2005 at 07:35 PM.
Old 01-04-2005, 10:15 PM   #3
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
What you're asking is very easy to do. The file that you need to edit is /etc/network/interfaces.

If you're currently set to accept a DHCP address, you should change the line that reads
iface eth0 inet dhcp
to read
iface eth0 inet static
and then add any of these lines as appropriate to your system:

address X.X.X.X
netmask Y.Y.Y.Y
network Z.Z.Z.Z
broadcast A.A.A.A
gateway B.B.B.B
If it is an internal network, and all you need is an IP, then I think you can get away with just an address. Most times you will need at least an address, gateway, and subnet to get out on the internet. The network and broadcast ear easy to figure out, they are usually the lowest and highest addresses in your subnet.

Once all that is changed to how you like it, do
ifdown eth0
and then follow with
ifup eth0
and you'll have the new address activated.


Last edited by JimBass; 01-04-2005 at 10:16 PM.
Old 01-05-2005, 04:48 PM   #4
LQ Newbie
Registered: Jan 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Very helpful. Works great. Thanks alot


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
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 10:51 AM
Is there any static ARP for static IP network? linux_lover2005 Linux - Networking 2 05-18-2005 12:01 PM
no static ip need help kwickcut Mandriva 1 12-07-2004 06:59 PM
Can't use static IP linuxistan Linux - Networking 5 10-17-2004 09:26 PM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:05 PM.

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