码迷,mamicode.com
首页 > 其他好文 > 详细

DHCP

时间:2020-01-11 00:03:39      阅读:74      评论:0      收藏:0      [点我收藏+]

标签:ddns   oca   etc   iptables   dhcpd   roo   iptable   dns   range   

 

[root@localhost ~]# yum install dhcp
[root@localhost ~]# vim /etc/dhcp/dhcpd.conf
ddns-update-style none;
ignore client-updates;
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.50 192.168.10.100;
option subnet-mask 255.255.255.0;
option routers 192.168.10.10;
option domain-name-servers 192.168.10.10;
default-lease-time 21600;
max-lease-time 43200;
}

 

[root@localhost ~]# systemctl restart dhcpd
[root@localhost ~]# systemctl enable dhcpd
ln -s /usr/lib/systemd/system/dhcpd.service /etc/systemd/system/multi-user.target.wants/dhcpd.service
[root@localhost ~]# systemctl status dhcpd
Active: active (running) since Tue 2019-11-26 11:47:32 CST; 12s ago


[root@localhost
~]# iptables -F [root@localhost ~]# service iptables save iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]

绑定dhcp

[root@localhost ~]# cat /var/log/messages
Aug 13 20:14:13 localhost dhcpd: DHCPACK on 192.168.10.50 to 00:0c:29:e3:37:19 (Linuxprobe-PC) via eno16777728
[root@localhost ~]# vim /etc/dhcp/dhcpd.conf
host boss {
        hardware ethernet 00:0c:29:e3:37:19;
        fixed-address 192.168.10.88;
}
host ding {
        hardware ethernet 00:0c:29:1d:84:69;
        fixed-address 192.168.10.99;
}
[root@localhost ~]# systemctl restart dhcpd

 

DHCP

标签:ddns   oca   etc   iptables   dhcpd   roo   iptable   dns   range   

原文地址:https://www.cnblogs.com/dinghailong128/p/12178396.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!