LinuxQuestions.org
Help answer threads with 0 replies.
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 09-17-2004, 10:34 AM   #1
pkraus109
LQ Newbie
 
Registered: Mar 2004
Posts: 23

Rep: Reputation: 16
FC2 Overriding static if in favor of dhcp system set for static


I have a fc2 box that when I set it with a static IP it will maintain the address for about a couple minutes then it will be reset with the DHCP assigned address.

Nothing I can find in my configuration files has anything set for DHCP. Even the GUI network app shows that it’s supposed to be a static address.

Any help is appreciated.


Configuration files below…



[root@advserver sysconfig]#cat network
NETWORKING=yes
HOSTNAME=advserver.pel.com

[root@advserver devices]# cat ifcfg-eth0
# Intel Corp.|82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:C0:9F:17:0F:5A
ONBOOT=yes
TYPE=Ethernet
#DHCP_HOSTNAME=advserver.pel.com
DPADDR=192.168.254.203
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.254.9
IPV6INIT=no
 
Old 09-17-2004, 12:07 PM   #2
rioguia
Member
 
Registered: Jun 2002
Posts: 411

Rep: Reputation: 30
IPADDR=192.254.1.203 or ifcfg-eth0.dhcp?

questions:

1. have you tried commenting changing the line D PADDR=192.168.254.203 to I PADDR=192.168.254.203 (or is that a typo)?
It may be that you have mangled your file in attempting to convert it from dhcp to static ip. it should look something like:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:C0:9F:17:0F:5A
BROADCAST=192.168.254.255
NETWORK=192.168.254.0
IPADDR=192.254.1.203
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.254.9
IPV6INIT=no

2. do you have a file named /etc/sysconfig/network-scripts/ifcfg-eth0.dhcp (if so, rename it to something else)?

after either of the above issue the following commands and post back here the results of:

service network restart
mii-tool
netstat -nr
 
Old 09-17-2004, 01:29 PM   #3
pkraus109
LQ Newbie
 
Registered: Mar 2004
Posts: 23

Original Poster
Rep: Reputation: 16
Yes it was a typo is the output of the commands and the correct file. I can not do a service network restart because this is a production fileserver and my users would flog me

[root@advserver devices]# /sbin/mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok

[root@advserver devices]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.254.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.254.9 0.0.0.0 UG 0 0 0 eth0

[root@advserver devices]# cat ifcfg-eth0
# Intel Corp.|82540EM Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:C0:9F:17:0F:5A
ONBOOT=yes
TYPE=Ethernet
#DHCP_HOSTNAME=advserver.pel.com
IPADDR=192.168.254.203
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=yes
GATEWAY=192.168.254.9
IPV6INIT=no
 
Old 09-17-2004, 01:49 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
The only thing I might try would be to change
BOOTPROTO=none
to
BOOTPROTO=static
 
Old 09-17-2004, 02:05 PM   #5
nitin_batta
Member
 
Registered: Aug 2004
Location: India
Distribution: Redhat Enterprise Server 2.1
Posts: 96

Rep: Reputation: 15
Quote:
I have a fc2 box that when I set it with a static IP it will maintain the address for about a couple minutes then it will be reset with the DHCP assigned address.
Haven't encountered the this type of problem before.

Have u tried setting ur ip manually using the ifconfig command and then check that if the ip gets reset after some time.
 
Old 09-17-2004, 02:37 PM   #6
pkraus109
LQ Newbie
 
Registered: Mar 2004
Posts: 23

Original Poster
Rep: Reputation: 16
if i do a ps -aux | grep dhc i get this..

1551 ? S 0:20 /sbin/dhclient -1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid -cf /etc/dhclient-eth0.conf eth0

is it possible that the dhcp client is running and just keeps resseting my ip because its not even looking at the ethernet config file...

Can i stop this process ? will it fix this? Why is this running and how can I make sure that if this is the sollution that the service doesn't ressurect after a reboot.
 
Old 09-17-2004, 03:15 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
As root:
kill 1551

Now try the commands
ifdown eth0
ifup eth0

Check to see if dhclient starts again.
 
Old 09-18-2004, 12:33 AM   #8
linux_newbie_23
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Rep: Reputation: 0
I vote with michaelk. Change BOOTPROTO to
"static" and let us know if dhclient still starts up
after the "ifdown ..." followed by the "if up ..."
 
Old 09-21-2004, 11:13 AM   #9
pkraus109
LQ Newbie
 
Registered: Mar 2004
Posts: 23

Original Poster
Rep: Reputation: 16
That fixed me up. Killed dhclient static stayed and dhclient did not restart. I bounced my server over the weekend to make sure the process wouldn't ressurect on a reboot. Everything is perfect. Thanks!!
 
  


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
How do I set up Slackware 9.1 to use DHCP with a static DNS? h00chman Linux - Newbie 2 12-18-2012 09:30 AM
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
Cannot ping local system when pinging system is set for static IP SkipHuffman Linux - Networking 4 08-22-2005 11:56 AM
Eth0 set up for Static, obtaining DHCP address?! IndustrialGeek Linux - Networking 2 01-03-2005 12:39 AM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 07:32 AM

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

All times are GMT -5. The time now is 05:57 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