CentOSでDHCPのIPアドレスを再取得する

2011年6月15日

DHCPでIPアドレスを取得していて、再取得させたい場合

dhclientコマンドを使用する

まずは現在のIPアドレスを解放する

[root@localhost ~]# dhclient -r
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/--:--:--:--:--:--
Sending on   LPF/eth0/--:--:--:--:--:--
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.10.254 port 67

次に取得処理を実行する

[root@localhost ~]# dhclient
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/--:--:--:--:--:--
Sending on   LPF/eth0/--:--:--:--:--:--
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPOFFER from 192.168.10.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.10.254
bound to 192.168.10.128 -- renewal in 838 seconds.

a

a

a

a

CentOSCentOS,dhclient,DHCP

Posted by GENDOSU