[CentOS] Getting DHCP Via CLI

Matt Hyclak hyclak at math.ohiou.edu
Sat Mar 11 16:47:35 UTC 2006

On Sun, Mar 12, 2006 at 01:23:37AM +0900, Mark Sargent enlightened us:
> I'm wanting to tell my centos box to get a dynamic ip via cli. I know I 
> can do "ifconfig eth0 up", or "ifconfig eth0 netmask 
>", but, how do I tell it to send the dhcp broadcast 
> to the DHCP server? Cheers.

For a one-time-use, dhclient ethX should do it.

Permanently, edit /etc/sysconfig/network-scripts/ifcfg-ethX.


Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263

More information about the CentOS mailing list