Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PLEASE, I need some DHCP help!!!!

Status
Not open for further replies.

devostyle

MIS
Jan 27, 2001
21
0
0
US
I have a server running Redhat 7. I used to have a static IP on cable, but my ISP(@home) decided to switch over to DHCP(those bastards). Anyway, I have been trying to setup my external interface(eth0) to use DHCP instead of a static IP. The problem is that there must be something wrong with my configuration of the /etc/sysconfig/network-scripts/ifcfg-eth0 file because everytime I try to bring up that interface with "./ifup eth0" this is what I get:

Determining IP information for eth0.... Operation Failed.

Here is my configuration for eth0:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
HOSTNAME=xxxxxx #hostname givin by ISP

By the way, I have read all the How-To docs and my setup is basically setup along the same lines as what is metioned in the docs and it still does not work. I checked my system and dhcpcd(dhcp client) is installed and running fine. The eth0 interface was working fine when it was static. Please Help me if you can. Any Help is appreciated. Thanks.....
 
devostyle, have you had any luck with @home's (actually now Comcast High Speed Internet) DHCP setup?? I have been having the same problems as you noted. I too have Comcast cable internet and can't seem to get the darn dhcpcd daemon to work! I'm running a Mandrake 8.1 install. I've read in the linuxdoc.org HOW-TO's that you need to pass it the -h option for your hostname, but I talked to the Support folks and now Comcast doesn't need a hostname (or so they say).
 
Hi,







The default dhcp client for redhat is now 'pump' rather than dhcpcd. So you could try installing the pump rpm and see if that makes a difference --> ftp://rpmfind.net/linux/redhat/7.1/en/os/i386/RedHat/RPMS/pump-0.8.11-1.i386.rpm







Just download & install as root with :







rpm -Uvh pump*.rpm







The actual script that does the interface initialisation is called /etc/sysconfig/network-scripts/ifup and looking at that its got the following :







if [ -x /sbin/pump ] && /sbin/pump ${PUMPARGS} -i ${DEVICE} ; then



echo $" done."



elif [ -x /sbin/dhcpcd ] && /sbin/dhcpcd ${DHCPCDARGS} ${DEVICE} ; then



echo $" done."



else







so it tries to call pump first and then tries dhcpcd if pumps not there - so I would have thought it should work with either .

Looking thru that script reminds me of another possible problem - if you have the redhat ipchains-based firewall active it detects that and opens UDP port 53 for dns (needed for dhcp) but otherwise does nothing. So, if you have iptables active you might like to check that UDP port 53 is allowed on the eth0 interface.

Other than that, as long as you use the redhat scripts to start/restart the network it should work unless that ISP has something strange going on...

/etc/rc.d/init.d/network restart

(restart all network interfaces as per ifcfg-xxxx control files in /etc/sysconfig/network-scripts)

Hope this helps

 
ifincham, last night I tried getting dhcp to work with pump, dhcpcd, dhcpxd AND dhclient and none of them worked. I have tried passing hostnames, passing MAC addresses, etc. to no avail. Upon researching the syslog, it appears that all the clients are sending the DHCPREQUEST and not receiving any DHCPOFFERs from the server. I do have iptables installed (I chose the HIGH security option when doing the Mandrake install), but I have not yet done anything with them so I'm not sure how they work (therefore I wouldn't know how to open or close a port as of yet). However, I did run iptables -F to flush all rules before attempting to get a dhcp client to work which would theoretically open all ports, correct?
 
Hi,

Yes it would flush the rules but you might still have a problem if the default policy was set to DENY. To completly open it out you'd have to also do :

/sbin/iptables -P INPUT ACCEPT
/sbin/iptables -P FORWARD ACCEPT
/sbin/iptables -P OUTPUT ACCEPT

To see what the active rules are just do :

/sbin/iptables -L

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top