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 |
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 |
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 |
The only thing I might try would be to change
BOOTPROTO=none to BOOTPROTO=static |
Quote:
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. |
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. :) |
As root:
kill 1551 Now try the commands ifdown eth0 ifup eth0 Check to see if dhclient starts again. |
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 ..." |
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. |