service dhcpd start //启动DHCP服务
service dhcpd stop //关闭DHCP服务
service dhcpd restart //重启DHCP服务
在指定网络接口上启动 DHCP 服务器
修改/etc/sysconfig/dhcpd文件:
1
DHCPDAGRS=eth0 //在eth0网卡上启动DHCP
查看 DHCP 客户机地址的租约信息
/var/lib/dhcpd/dhcpd.leases文件中保存了客户机地址的租约信息
1 2 3 4
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.1.1-P1 ... "/var/lib/dhcpd/dhcpd.leases" 3L, 128C
从 ROM 或 PROM 启动免除了对机电设备(物理驱动器)的依赖,同时提高了可靠性及避免了驱动器读取错误.利用当今的内存技术,从 ROM 或 PROM 能够很快地启动.PXE 也能够用于从网络启动计算机.
PXE 原理
客户端电脑开机后,如果 BIOS(Basic Input Output System 的缩略语,直译过来就是“基本输入输出系统”.它的全称应该是 ROM-BIOS,意思是只读存储器基本输入输出系统.其实,它是一组固化到计算机内主板上一个 ROM 芯片上的程序,它保存着计算机最重要的基本输入输出的程序、系统设置信息、开机上电自检程序和系统启动自举程序.)设置从网络启动,那么网卡中的 PXE Boot ROM 获得控制权之前先做自我测试,然后发送一个动态获得 IP 地址的广播包(请求 FIND 帧)到网络上.
DHCP 服务器在收到该广播包后,发送给客户端分配 IP 地址的 DHCP 回应包.内容包括客户端的 IP 地址,TFTP 服务器的 IP 地址(DHCP 服务器的 066 选项),预设通讯通道,及开机启动文件(DHCP 服务器的 067 选项).该文件应该是一种由 PXE 启动规范规定的固定格式的可执行文件,类似于 Windows XP 正常启动时显示多重启动菜单之前的启动代码.
######################################################################### # CentOS-Base.repo # # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # #
[base] name=CentOS-6 - Base - 163.com baseurl=http://mirrors.163.com/centos/6/os/$basearch/ #mirrorlist=http://mirrorlist.centos.org/?release=6&arch=$basearch&repo=os gpgcheck=1 gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6