We help IT Professionals succeed at work.

RH7.2 dhcp

slok
slok asked
on
My dhcp setting seems to be not getting the dynamic IP address from the cable service provider.

I suspect that it could be dhcp is not started etc.

What I did when I boot up every time is

1. logon as root
2. /sbin/dhcpcd -k eth0
3. /sbin/dhcpcd eth0

and voila, I get the IP address and can access Internet.

however, after every reboot, I need to do those steps again. any idea how can I solve that
ie. ensure that I get IP address from service provider when I boot up without manual intervention.

thanks
Comment
Watch Question

Commented:
Check the file '/etc/sysconfig/network-scripts/ifcfg-eth0' for two lines. One line will start with 'ONBOOT=' and should be followed with 'yes'. The other line starts with 'BOOTPROTO=' and it should say 'dhcp'. After making these changes execute the command '/etc/init.d/network restart'. (Or just reboot)

For more info on these network configuration file you can look at '/usr/share/doc/initscripts-<version number>/sysconfig.txt'

Explore More ContentExplore courses, solutions, and other research materials related to this topic.