当前位置: 欧洲杯竞猜 > 计算机知识 > 正文

DHCP服务器安装指南,Linux下DHCP配置命令

时间:2019-07-31 12:46来源:计算机知识
建/etc/dhcpd.conf 文件   ddns-update-style interim; #ignore client-updates; CentOS 5.5DHCP服务器安装指南: CentOS 5.5 DHCP服务器安装指南: subnet 192.168.0.0 netmask 255.255.254.0 { 1.一直用yum -y dhcp安装好dhcprpm软

建/etc/dhcpd.conf 文件
 
ddns-update-style interim;
#ignore client-updates;

CentOS 5.5 DHCP服务器安装指南:

CentOS 5.5 DHCP服务器安装指南:

subnet 192.168.0.0 netmask 255.255.254.0 {

1.一直用yum -y dhcp安装好dhcp rpm软件包。也得以到

1.直接用yum -y dhcp安装好dhcp rpm软件包。也能够到

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

2.安装好之后正是拷贝配置文件dhcpd.conf文件,在/usr/share/doc/dhcp-3.0/dhcpd.conf.example 把这么些样本文件拷重新命名拷贝到 /etc/dhcpd.conf就能够

2.设置好现在正是拷贝配置文件dhcpd.conf文件,在/usr/share/doc/dhcp-3.0/dhcpd.conf.example 把那么些样本文件拷重新命名拷贝到 /etc/dhcpd.conf就能够

#        option nis-domain               "staff.baihe.com";
#        option domain-name              "staff.baihe.com";
#        option domain-name-servers      192.168.0.2, 202.106.0.20;
        option domain-name-servers      218.30.26.68,202.106.0.20;

3.vi /etc/dhcpd.conf 内容如下这几个是本身一度修改好的,只要修改那么些文件就能够。

3.vi /etc/dhcpd.conf 内容如下这几个是小编早已修改好的,只要修改那些文件就能够。

        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;

下载dhcpd.conf for CentOS 5.5

下载dhcpd.conf for CentOS 5.5

        range dynamic-bootp 192.168.0.20 192.168.0.254;
        default-lease-time 21600;
        max-lease-time 43200;

ddns-update-style interim;
ignore client-updates;

ddns-update-style interim;
ignore client-updates;

图片 1

subnet 192.168.10.0 netmask 255.255.255.0 {    //subnet一个子网中的客户端,动态地钦定ip地址,则在此subnet申明中,必须包涵一组ip地址范围。

subnet 192.168.10.0 netmask 255.255.255.0 { //subnet一个子网中的客户端,动态地钦点ip地址,则在此subnet注脚中,必须包括一组ip地址范围。

# --- default gateway
 option routers   192.168.10.15; //网关地址
 option subnet-mask  255.255.255.0;//子网掩码

# --- default gateway
option routers 192.168.10.15; //网关地址
option subnet-mask 255.255.255.0;//子网掩码

 option nis-domain  "my.lk.org";
 option domain-name  "my.lk.org";
 option domain-name-servers 202.101.172.35; //dns ip地址

option nis-domain "my.lk.org";
option domain-name "my.lk.org";
option domain-name-servers 202.101.172.35; //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;

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). Dont change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

 range dynamic-bootp 192.168.10.128 192.168.10.254; //地址池pool范围地址
 default-lease-time 21600;//私下认可的ip租用时间定时单位为秒

range dynamic-bootp 192.168.10.128 192.168.10.254; //地址池pool范围地址
default-lease-time 21600;//默许的ip租用时间按期单位为秒

 max-lease-time 43200;//ip租用最长的期限单位为秒

max-lease-time 43200;//ip租用最长的时间限制单位为秒

 # we want the nameserver to appear at a fixed address //用来绑定服务器的mac物理地址。
 host ns {
  next-server stationx.example.com;  
  hardware ethernet 00:0C:29:7E:7F:86;
  fixed-address 192.168.10.223;
 }
}

# we want the nameserver to appear at a fixed address //用来绑定服务器的mac物理地址。
host ns {
next-server stationx.example.com;
hardware ethernet 00:0C:29:7E:7F:86;
fixed-address 192.168.10.223;
}
}

4.service dhcpd start 就可以运营,假使想开机运行能够ntsysv 服务中间接选举用dhcpd星号就能够。

4.service dhcpd start 就可以运维,假使想开机运行能够ntsysv 服务当中采用dhcpd星号就能够。

布署文件也能够写成以下形式:

陈设文件也可以写成以下格局:

#//192.168.10.*
subnet 192.168.10.0 netmask 255.255.255.0 {
option routers 192.168.10.15; 网关
option subnet-mask 255.255.255.0; //子网掩码
option broadcast-address 192.168.10.255; //广播地址
option domain-name-servers
202.101.172.xx,202.101.172.4.xx
range dynamic-bootp 192.168.10.20 192.168.10.150; //地址池范围
default-lease-time 21600;
max-lease-time 43200;
}

#//192.168.10.*
subnet 192.168.10.0 netmask 255.255.255.0 {
option routers 192.168.10.15; 网关
option subnet-mask 255.255.255.0; //子网掩码
option broadcast-address 192.168.10.255; //广播地址
option domain-name-servers
202.101.172.xx,202.101.172.4.xx
range dynamic-bootp 192.168.10.20 192.168.10.150; //地址池范围
default-lease-time 21600;
max-lease-time 43200;
}  

图片 2

5.5 DHCP服务器安装指南: 1.一贯用yum -y dhcp安装好dhcp rpm软件包。也足以到 2.装置好未来就是拷贝配置文件dh...

编辑:计算机知识 本文来源:DHCP服务器安装指南,Linux下DHCP配置命令

关键词: 欧洲杯竞猜