CentOS 5.4 下配置DHCP服务器全过程(2)

linux客户端:
修改ifcfg-eth0的文件,将BOOTPROTO选项改为DHCP,自动获取。
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29:D1:8D:D2
ONBOOT=dhcp
重新启动网络服务
[root@localhost ~]# service network restart
通过ifconfig命令可以看到已经获取到了IP地址

eth0      Link encap:Ethernet  HWaddr 00:0C:29:D1:8D:D2                inet addr:192.168.1.101 Bcast:192.168.1.1  Mask:255.255.255.0              inet6 addr: fe80::20c:29ff:fed1:8dd2/64 Scope:Link              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1              RX packets:2093 errors:2 dropped:0 overruns:0 frame:0              TX packets:634 errors:0 dropped:0 overruns:0 carrier:0              collisions:0 txqueuelen:1000               RX bytes:184237 (179.9 KiB)  TX bytes:73399 (71.6 KiB)              Interrupt:169 Base address:0x2000        lo        Link encap:Local Loopback                inet addr:127.0.0.1  Mask:255.0.0.0              inet6 addr: ::1/128 Scope:Host              UP LOOPBACK RUNNING  MTU:16436  Metric:1              RX packets:1129 errors:0 dropped:0 overruns:0 frame:0              TX packets:1129 errors:0 dropped:0 overruns:0 carrier:0              collisions:0 txqueuelen:0               RX bytes:2006336 (1.9 MiB)  TX bytes:2006336 (1.9 MiB)   

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://127.0.0.1/wyyssy.html