LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   FC2 Overriding static if in favor of dhcp system set for static (https://www.linuxquestions.org/questions/linux-networking-3/fc2-overriding-static-if-in-favor-of-dhcp-system-set-for-static-231800/)

pkraus109 09-17-2004 10:34 AM

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

rioguia 09-17-2004 12:07 PM

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

pkraus109 09-17-2004 01:29 PM

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

michaelk 09-17-2004 01:49 PM

The only thing I might try would be to change
BOOTPROTO=none
to
BOOTPROTO=static

nitin_batta 09-17-2004 02:05 PM

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 :Pengy: ifconfig :Pengy: command and then check that if the ip gets reset after some time.

pkraus109 09-17-2004 02:37 PM

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. :)

michaelk 09-17-2004 03:15 PM

As root:
kill 1551

Now try the commands
ifdown eth0
ifup eth0

Check to see if dhclient starts again.

linux_newbie_23 09-18-2004 12:33 AM

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 ..."

pkraus109 09-21-2004 11:13 AM

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!!


All times are GMT -5. The time now is 07:23 AM.