[Linux教程]linux下DHCP服务实例解析


我们知道dhcp 就是动态ip 地址分配服务拉!在一个网络中,如果电脑不是很 多的情况下,我们一般都是手动给每个电脑分配ip地址等一些网络的设定。如果一个网络中有上百台电脑,我们也要一台台跑去设定他们的ip 地址 ,那样我想人都会设置的头昏 还得上串下跳的到处跑。本人的公司是小公司 只有10几台电脑,我很懒所以用linux配置了dhcp动态分配ip地址的服务!
一般来说我们在安装linux时如果选了everything,那么你的dhcp也就有了。真好啊~!但是你想要它 能够正常工作起来 ,那还得你自己动动手。
DHCPd后台程序总是读取配置文件/etc/dhcpd.conf, 下面给出一我主机上的DHCP配置文件的例子:
ddns-update-style interim;
ignore client-updates;

subnet 192.168.25.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.25.15;
option subnet-mask 255.255.255.0;

# option nis-domain "uc88.domain";
option domain-name "uc88.domain";
option domain-name-servers 202.96.128.68,192.168.25.15;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

range dynamic-bootp 192.168.25.100 192.168.25.254;
default-lease-time 259200;
max-lease-time 518400;

# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.RedHat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
  • 1
  • 2
  • 下一页
【内容导航】
第1页:[Linux教程]linux下DHCP服务实例解析 第2页:[Linux教程]linux下DHCP服务实例解析

相关内容