LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Network Changes from Static to DHCP (https://www.linuxquestions.org/questions/linux-networking-3/network-changes-from-static-to-dhcp-332387/)

RemusX2 06-10-2005 11:44 PM

Network Changes from Static to DHCP
 
After a system crash happened, my connection changes from a Static IP to one obtained DHCP. I have the DHCP server set for anything above 1.105 and 1.100 - 1.104 are set up statically with a couple machines in the house. Now about once a day my connection will drop and then it will pick back up with 1.105 as my IP. According to Network-Setup it's still set as Static and within ifcfg-eth0 it has the IP set and isn't configured for DHCP. It isn't too big of a deal unless I'm downloading something large but it would be nice to fix.

Thanks

Brandon Bell

peaceofcrap2001 06-11-2005 05:01 PM

I don't quite understand your question. Do you want your machine to be static or dynamic?

Peaceofcrap2001

comprookie2000 06-11-2005 05:09 PM

try this
Code:

#cd /etc/sysconfig/network-scripts
ls

You should have ifcfg-eth0 and ifcfg-eth1 if you have 2 cards;
What do they say something like;
Code:

          DEVICE=eth0
          IPADDR=208.164.186.1
          NETMASK=255.255.255.0
          NETWORK=208.164.186.0
          BROADCAST=208.164.186.255
          ONBOOT=yes
          BOOTPROTO=none
          USERCTL=no

or for dhcp
BOOTPROTO=dhcp

RemusX2 06-11-2005 11:33 PM

I would like the machine to be Static, which it was before a system crash.

IPV6INIT=no
ONBOOT=yes
USERCTL=no
PEERDNS=yes
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:0e:a6:2b:75:05
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.1.100
GATEWAY=192.168.1.1

Is what the ifcfg-eth0 states. But, mysteriously about every 12 hours my connection will drop and be picked up with the 192.168.1.105 address which I have set up in the router to be the starting range for DHCP; making 192.168.1.100 - 192.168.1.104 reserved for Static IPs. Sorry for the confusing post last night... I was kind of in a hurry.

eflester 06-14-2005 07:16 PM

I have a similar problem. The ifcfg-eth0 script doesn't seem to be the source of it, as I have it set for BOOTPROTO=none. The elusive dhclient is, however, running, and I am having a hard time trying to find out where/how to turn it off. I did do this, though:

ps ax | grep dhclient

which yielded 2 pids for /sbin/dhclient. So I issued a kill for each of these pids and now it's off.

But what, oh what, makes it turn on? Or off?

This is on an experimental server, not terribly important, but a mystery indeed. It's a headless box so I only communicate with it via ssh or Webmin.

If you or anyone else can shed some light on this, I'd be grateful. I have set it to its static IP several times, only to come back the next day to see it back to a DHCP-assigned address.

eflester 06-15-2005 01:15 PM

An update: it's now the next day. Since I "killed" the dhclient processes as noted above, the address has stayed at the static value that I assigned it.
But I'd still like to know, where is the on-off button(s) for this daemon??? In FC3, that is.


All times are GMT -5. The time now is 07:18 PM.