如何搭建DHCP服务器

 时间:2026-02-16 12:50:00

1、要是没有现成的Linux系统的话可以用虚拟机安装一个,参考文章:http://jingyan.baidu.com/article/49711c61460c78fa451b7c5e.html。

仅仅看第二步以后的内容即可。

2、rpm -qa |grep -i dhcp, 检查DHCP有没有安装

3、如果没有安装的话,在网络上下载,或者从安装光盘里面找到dhcp安装包,进行安装

rpm -ivh dhcp-3.0pl1-23.i386.rpm。

4、修改 /etc/dhcpd.conf 文件,这里的next server后面的ip就是你这台Linux的IP[一定要一样,请把下面的ip修改成您需要的ip]. 

文件内容如下:

ddns-update-style interim;

ignore client-updates;

allow booting;

allow bootp;

default-lease-time 172800;

class "pxeclients" {

  match ifsubstring(option vendor-class-identifier,0,9)="PXEClient";

  next-server 192.168.1.250; # set the next server. PXE client will try to connect the nextserver for bootstrap.

  filename"linux-install/pxelinux.0"; # set the bootstrap

}

subnet 192.168.1.0 netmask 255.255.255.0 { # set IPrange

  optionbroadcast-address 192.168.1.255;

  optionrouters 192.168.1.250;

  optionsubnet-mask 255.255.255.0;

  range192.168.1.1 192.168.1.249;

 default-lease-time 86400; #how long the configuration will be kept for thisPXE client.

}

5、修改完成以后重启DHCP服务,service dhcpd restart.

可以用 service dhcpd status查看当前dhcp服务的状态。

  • jquery如何给网页的title赋值
  • Windows server 2008如何查看计算机使用情况
  • eclipse通过svn更新代码报错解决方法
  • CMD删除目录和目录中的文件
  • 职场新手如何使用PLSQL操作ORACLE数据库?
  • 热门搜索
    安卓手机怎么截屏 怎么折爱心 胃反酸怎么办 海尔油烟机怎么样 星座怎么算 qq邮箱怎么写 怎么清理c盘 身份证扫描件怎么弄 学历和学位怎么填 自行车变速器怎么调