Dhcp搭建

网友投稿 277 2022-11-13

Dhcp搭建

一.安装Dhcprpm -ivh /mnt/Packages/dhcp-4.2.5-58.el7.centos.x86_64.rpm

rpm -qc dhcp 查找配置文件/etc/dhcp/dhcpd.conf

二.修改配置文件cat /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example 看例子

vi /etc/dhcp/dhcpd.conf

subnet 192.168.80.0 netmask 255.255.255.0 {range 192.168.80.100 192.168.80.200;option routers 192.168.80.1;option domain-name-servers 2.2.2.2, 3.3.3.3;default-lease-time 600;max-lease-time 7200;

}

#host boss {

hardware ethernet 00:0C:29:53:A1:B1;

fixed-address 192.168.80.188;

#}

三. 启动 [root@test ~]# service dhcpd startRedirecting to /bin/systemctl start dhcpd.service

cat /var/log/message 查日志找错误

[root@test ~]# netstat -anpu | grep dhcp 查看67端口udp 0 0 0.0.0.0:67 0.0.0.0: 1233/dhcpdudp 0 0 0.0.0.0:51515 0.0.0.0: 1233/dhcpdudp6 0 0 :::25601 :::* 1233/dhcpd

[root@test ~]# service firewalld stop 停止防火墙Redirecting to /bin/systemctl stop firewalld.service

[root@test ~]# cat /var/lib/dhcpd/dhcpd.leases 查看租约信息

The format of this file is documented in the dhcpd.leases(5) manual page.

This lease file was written by isc-dhcp-4.2.5

server-duid "\000\001\000\001!\336\363\010\000\014)E\357\257";

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:SpringBoot实现整合微信支付方法详解
下一篇:一套完整的去中心化区块链应用平台Agate介绍
相关文章

 发表评论

暂时没有评论,来抢沙发吧~