LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2006, 07:16 PM   #1
Simdude90015
Member
 
Registered: Jun 2004
Location: Pittsburgh, PA area
Distribution: Debian 3.1 (or variant... depends on which machine)
Posts: 72

Rep: Reputation: 15
Moving from DHCP to Static


I've just installed debian on a few older machines for my first attempt at a cluster. On one of the machines, the installer configured the ethernet interface using DHCP, but I want to set the IP address to something static (namely 192.168.0.41)

Also, there doesnt seem to be a /dev/eth0 file... or any /dev/eth* files at all... whats up with this?

Linux kernel version 2.4.27-2-386


Thanks for any help
-Jim ()
 
Old 08-03-2006, 05:43 AM   #2
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Rep: Reputation: 15
This thread should really be in Linux - Networking

- I use Ubuntu rather than Debian, but they are similar so I think that this should apply.


There are no /etc/eth* device files needed, therefore they are not created any more. If you want to see what interfaces are detected you can use
Code:
cat /proc/net/dev
The file with dhcp / static IP address information is in
/etc/network/interfaces

You will currently have an entry
Code:
iface eth0 inet dhcp
which should be replaced with
Code:
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
(replace the addresses / mask with your details).

You could remove the dhcp-client package, but it shouldn't do any harm leaving it there.

Other things you need to change are DNS entries which should be added to /etc/resolv.conf
e.g.
Code:
nameserver 192.168.1.1
Add entries for all your DNS servers.

Then restart your network using
Code:
/etc/init.d/networking restart
I think that's everything, if you have a single port.
 
Old 08-03-2006, 06:16 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Moved: This thread is more suitable in Linux Networking and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-03-2006, 08:50 PM   #4
Simdude90015
Member
 
Registered: Jun 2004
Location: Pittsburgh, PA area
Distribution: Debian 3.1 (or variant... depends on which machine)
Posts: 72

Original Poster
Rep: Reputation: 15
Thanks penguintutor!

And Yeah, After I submitted it, I found out that there was a networking section... sorry. But thanks for moving it!
 
  


Reply



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
Laptop moving around with wireless and static IP. Possible? Micro420 General 3 08-23-2005 11:11 AM
From DHCP to static IP. dave`2005 Slackware 3 08-22-2005 09:12 AM
Moving over from static to dhcp mrpc_cambodia Linux - General 4 12-02-2004 01:39 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DHCP to static IP ?? davepal Linux - Networking 1 04-21-2004 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:16 PM.

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
Open Source Consulting | Domain Registration