This is a discussion on DHCP to static IP - is this OK? within the Linux Networking forums, part of the Linux Forums category; I have a Redhat 7.2 box that is set up for dynamic addressing (DHCP client). This is working fine. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have a Redhat 7.2 box that is set up for dynamic addressing (DHCP client).
This is working fine. I also have a script that is run at boot time to manually set the IP to some fixed address via ifconfig (don't ask). This works fine. My question is, is this OK (having dhcpd running and then fixing the IP vie ifconfig)? Reason I ask is that occasionally the network plays dumb (no ping, telnet, ftp, nothing). Is it possible and under what situation could/would DHCP "reset" the IP to something other that what I set it to a boot time with ifconfig? Since I use fixed IP addressing I should probably disable DHCP but that's for another day. Thanks, Bob |
|
|||
|
On Sat, 05 Jul 2003 15:21:40 +0000, Bob O'Connor wrote:
> I have a Redhat 7.2 box that is set up for dynamic addressing (DHCP client). > This is working fine. I also have a script that is run at boot time to > manually set the IP to some fixed address via ifconfig (don't ask). This > works fine. > > My question is, is this OK (having dhcpd running and then fixing the IP vie > ifconfig)? Reason I ask is that occasionally the network plays dumb (no > ping, telnet, ftp, nothing). Is it possible and under what situation > could/would DHCP "reset" the IP to something other that what I set it to a > boot time with ifconfig? DHCP leases run out after a time, and the dhcpd client daemon gets a new lease. It then resets the IP for that interface, along with a host of other stuff like /etc/resolf.conf for DNS resolution. Why not just 'chkconfig off dhcpd' or whatever the dhcp client is? --Dondo |
|
|||
|
Bob O'Connor wrote:
> > I have a Redhat 7.2 box that is set up for dynamic addressing (DHCP client). > This is working fine. I also have a script that is run at boot time to > manually set the IP to some fixed address via ifconfig (don't ask). Why not? Without knowing *why* you are doing something so strange it is hard to suggest how to do it properly. Presumably you have a reason. > This works fine. But then you go on to say that it doesn't. > My question is, is this OK (having dhcpd running and then fixing the IP vie > ifconfig)? Do you mean dhcpd? That is the DHCP server. The client is probably dhcpcd or possibly dhclient. No, it is not OK. If you are using a locally specified address you should not be running a DHCP client. > Reason I ask is that occasionally the network plays dumb (no > ping, telnet, ftp, nothing). Is it possible and under what situation > could/would DHCP "reset" the IP to something other that what I set it to a > boot time with ifconfig? Yes, if the lease expires and it has to get another. This is probably what is causing the problem. > Since I use fixed IP addressing I should probably disable DHCP but that's > for another day. You should. Alternatively, configure the DHCP server to always give you the address you require (sometimes referred to as a "reservation"). If you are not in control of the DHCP server, don't your network admins get upset by your doing this? Regards, Ian |
|
|||
|
Bob O'Connor <nospam@nospam.com> schrieb > I have a Redhat 7.2 box that is set up for dynamic addressing (DHCP client). > This is working fine. I also have a script that is run at boot time to > manually set the IP to some fixed address via ifconfig (don't ask). This > works fine. > > My question is, is this OK (having dhcpd running and then fixing the IP vie > ifconfig)? Reason I ask is that occasionally the network plays dumb (no > ping, telnet, ftp, nothing). Is it possible and under what situation > could/would DHCP "reset" the IP to something other that what I set it to a > boot time with ifconfig? > > Since I use fixed IP addressing I should probably disable DHCP but that's > for another day. > You must always ensure that an IP address is only given to one machine only. If two different machines have the same ip address, any third machine talking to them gets confused and then the two machines will also get confused (think of phoning a telephone number and having two people responding at the same time). Your administration must check that e.g. - manually set addressses are in the range 192.168.0.1-127 - dhcpd given addresses are in the range 192.168.0.128-253 - reserve 192.168.0.254 for troubleshooting - any manually set address is not already in use. Perhaps your network problems are due to the fact two machines use the same ip address at the same time. If a problem occurs, you could: - note the ip address used by the machine which is having problems - set the ip address to an address that is guaranteed to be free - try to ping the ip address that was used by the machine which is having problems if a machine responds (might take a little bit of time until packets start to flow again), this ip address was used by two machines at the same time, which is a severe no-go. HTH Martin PS: You can have sort of fixed ip addressing even with DHCP if you associate MAC numbers with IP addresses. |