Linux中DHCP主配置文件解析
2009-11-06 21:41
387 查看
从书上学来的,所以是转载了
[root@wbk ~]# cp -p /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf //默认DHCP主配置文件dhcpd.conf没有在/etc/下面,需要复制模板到/etc/下,可以使用find / -name dhcpd.conf.sample /etc/
[root@wbk ~]# cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 { //用户可以用subnet语句通知DHCP服务器,把服务器可以分配的IP地址范围限制在规定的子网内。Subnet语句包含了表示子网掩码的netmask
# --- default gateway
option routers 192.168.0.1; //设置网关和路由器的IP地址
option subnet-mask 255.255.255.0; //设置子网掩码
option nis-domain "domain.org";
option domain-name "domain.org"; //设置DNS域名
option domain-name-servers 192.168.1.1; //设置DNS服务器的IP地址(可多个)
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.0.128 192.168.0.254; //通过range语句,可以指定动态分配给库互动的IP地址范围。在range语句中需要知道地址段的首地址和尾地址(可设多个范围)
default-lease-time 21600; //指定客户端IP地址默认租用的时间长度是多少(以秒为单位)
max-lease-time 43200; //设置客户最长租用IP地址时间(以秒为单位)
# we want the nameserver to appear at a fixed address
host ns { //给某些主机绑定固定IP(可设置多个)
next-server marvin.redhat.com; //设置用于定义服务器从影到文件装副的主机名,一般不用(仅用于设置无盘工作站)
hardware ethernet 12:34:56:78:AB:CD; //需设置固定IP的网卡的MAC地址
fixed-address 207.175.42.254; //对指定的MAC地址分配IP地址
}
}
[root@wbk ~]# cp -p /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf //默认DHCP主配置文件dhcpd.conf没有在/etc/下面,需要复制模板到/etc/下,可以使用find / -name dhcpd.conf.sample /etc/
[root@wbk ~]# cat /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 { //用户可以用subnet语句通知DHCP服务器,把服务器可以分配的IP地址范围限制在规定的子网内。Subnet语句包含了表示子网掩码的netmask
# --- default gateway
option routers 192.168.0.1; //设置网关和路由器的IP地址
option subnet-mask 255.255.255.0; //设置子网掩码
option nis-domain "domain.org";
option domain-name "domain.org"; //设置DNS域名
option domain-name-servers 192.168.1.1; //设置DNS服务器的IP地址(可多个)
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.0.128 192.168.0.254; //通过range语句,可以指定动态分配给库互动的IP地址范围。在range语句中需要知道地址段的首地址和尾地址(可设多个范围)
default-lease-time 21600; //指定客户端IP地址默认租用的时间长度是多少(以秒为单位)
max-lease-time 43200; //设置客户最长租用IP地址时间(以秒为单位)
# we want the nameserver to appear at a fixed address
host ns { //给某些主机绑定固定IP(可设置多个)
next-server marvin.redhat.com; //设置用于定义服务器从影到文件装副的主机名,一般不用(仅用于设置无盘工作站)
hardware ethernet 12:34:56:78:AB:CD; //需设置固定IP的网卡的MAC地址
fixed-address 207.175.42.254; //对指定的MAC地址分配IP地址
}
}
相关文章推荐
- Linux网络接口配置文件ifcfg-eth0解析
- Linux下解析配置文件
- centos-dhcp配置文件参数解析
- linux下DHCP配置文件
- linux中DHCP服务配置文件/etc/dhcpd.conf详细说明
- Linux中重要配置文件解析
- linuxPAM认证配置文件解析
- Linux系统启动引导程序配置文件解析
- 【Linux运维-集群技术进阶】keepalived工作原理和配置文件解析
- Linux下DHCP服务器介绍:dhcpd.conf配置文件
- Linux网络接口配置文件ifcfg-eth0解析
- Linux下解析配置文件
- DHCP常用配置文件解析
- LINUX下解析配置文件(配合上篇使用)
- Linux http配置文件解析
- linux-redhat5-dhcp基本配置,配置文件详解
- linux 下apache配置文件参数深入解析
- Linux网络接口配置文件解析
- Linux网络接口配置文件ifcfg-eth0解析
- Linux网络接口配置文件解析