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 03-29-2004, 08:05 AM   #1
jimbo
LQ Newbie
 
Registered: Feb 2004
Distribution: RH9
Posts: 10

Rep: Reputation: 0
Change DHCP to Static in RH9


I am attempting to run NFS on my home lan. It would seem that converting to static IP addresses on each local machine would be easier than trying to resolve the address the router doles out. It is a D Link DWL 615+.

Is this a good plan? If so, how do I implent it?
 
Old 03-29-2004, 11:59 AM   #2
skel
Member
 
Registered: Jan 2004
Distribution: Slackware 10 ; Gentoo ; OpenBSD 3.6
Posts: 101

Rep: Reputation: 15
it is not a bad idea.

in RH9, edit the scripts in /etc/syconfig/network-scripts

so you can change the file /etc/sysconfig/network-scripts to look something like:
Code:
DEVICE=eth0
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0
GATEWAY=yyy.yyy.yyy.yyy
ONBOOT=yes
where xxx.xxx.xxx.xxx is the ip address that you want your machine to have
and yyy.yyy.yyy.yyy is the ip of your router
(do this for both machines)

since you get the dns server info through dhcp, you will have to add the dns server addresses to /etc/resolv.conf

after you make the changes you can just reboot or do (as root from a commandline)
Code:
ifdown eth0; ifup eth0
 
Old 03-29-2004, 12:08 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If you are running servers such as apache, nfs or a database, it's better to use a static address on the server.
 
Old 03-29-2004, 03:48 PM   #4
skel
Member
 
Registered: Jan 2004
Distribution: Slackware 10 ; Gentoo ; OpenBSD 3.6
Posts: 101

Rep: Reputation: 15
one more thing, make sure that you don't assign a static ip that is in the range of dhcp addresses that your router leases out.
 
Old 03-29-2004, 08:10 PM   #5
jimbo
LQ Newbie
 
Registered: Feb 2004
Distribution: RH9
Posts: 10

Original Poster
Rep: Reputation: 0
Very good thanks. It sounds like I can leave DHCP enabled on the router for my kids windows machines, is that so?
 
Old 03-30-2004, 08:13 AM   #6
skel
Member
 
Registered: Jan 2004
Distribution: Slackware 10 ; Gentoo ; OpenBSD 3.6
Posts: 101

Rep: Reputation: 15
leaving dhcp enabled shouldn't cause a problem (unless it is trying to give out an ip that a static machine is using)
 
Old 03-30-2004, 07:33 PM   #7
jimbo
LQ Newbie
 
Registered: Feb 2004
Distribution: RH9
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for your help.
 
  


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
From DHCP to static IP. dave`2005 Slackware 3 08-22-2005 09:12 AM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 07:32 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
RH9 / DHCP Doesn't Work / Static Does mfriedkin Linux - Wireless Networking 1 02-06-2004 02:18 PM
DHCP or Static Culbert Linux - Networking 1 03-14-2003 07:42 PM

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

All times are GMT -5. The time now is 05:50 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
Open Source Consulting | Domain Registration