Linux如何配置DHCP?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux如何配置DHCP?相关的知识,希望对你有一定的参考价值。
计算机
参考技术A 安装:yum install -y dhcp.x86_64
或者rpm -ivh dhcp.x86_64
配置DHCP:
[root@test ~]# rpm -q dhcp
dhcp-4.1.1-30.P1.el6.x86_64
[root@test ~]# rpm -qc dhcp |grep conf
/etc/dhcp/dhcpd.conf
/etc/dhcp/dhcpd6.conf
/etc/sysconfig/dhcpd
/etc/sysconfig/dhcpd6
/etc/sysconfig/dhcrelay
[root@test ~]# vim /etc/dhcp/dhcpd.conf
修改为下面参数:
subnet 192.168.45.0 netmask 255.255.255.0
range 192.168.45.101 192.168.45.200;
option domain-name-servers 192.168.0.1;
option domain-name "ncie.org";
option routers 192.168.45.254;
option broadcast-address 192.168.45.255;
default-lease-time 720;
max-lease-time 2160;
开启服务
service dhcpd start
以上是关于Linux如何配置DHCP?的主要内容,如果未能解决你的问题,请参考以下文章