LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 11: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, 01: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, 02: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, 02:49 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,142

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
The only thing I might try would be to change
BOOTPROTO=none
to
BOOTPROTO=static
 
Old 09-17-2004, 03: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, 03: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, 04:15 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,142

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
As root:
kill 1551

Now try the commands
ifdown eth0
ifup eth0

Check to see if dhclient starts again.
 
Old 09-18-2004, 01: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, 12:13 PM   #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


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
How do I set up Slackware 9.1 to use DHCP with a static DNS? h00chman Linux - Newbie 2 12-18-2012 10:30 AM
Howto Assign Multiple Static Public IP Addresses under SBC's PPPoE Static Ip system o trekgraham Linux - Networking 8 04-17-2007 11:51 AM
Cannot ping local system when pinging system is set for static IP SkipHuffman Linux - Networking 4 08-22-2005 12:56 PM
Eth0 set up for Static, obtaining DHCP address?! IndustrialGeek Linux - Networking 2 01-03-2005 01:39 AM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 08:32 AM


All times are GMT -5. The time now is 02:34 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration