Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In my CentOS, i need to run dhclient -v command at every time i start/reboot the server. How to make this permanent please?

share|improve this question

migrated from stackoverflow.com Apr 5 '13 at 4:41

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 3 down vote accepted

In CentOS, put the following into /etc/sysconfig/network-scripts/ifcfg-ethX:

DEVICE=ethX
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=XX:XX:XX:XX:XX:XX

Of course change ethX to your interface name (eth0, eth1 or similar).

Similarly, change HWADDR to yours interface MAC address. You can see it by looking at the output of ifconfig -a command (the part after HWaddr keyword).

share|improve this answer
    
Oh yes it worked! Thank! –  夏期劇場 Apr 4 '13 at 9:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.