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

dnsmasq服务配置

时间:2019-05-23 16:07:58      阅读:650      评论:0      收藏:0      [点我收藏+]

标签:sdn   color   取ip地址   网卡绑定   ntp服务   错误   root   col   net   

一、安装dnsmasq服务
yum install -y dnsmasq

二、在dnsmasq服务中配置dhcp
vim /etc/dnsmasq.d/dnsmasq_dhcp.conf

#配置dhcp地址池,地址租期为12小时,为dhcp地址池设置red标记(set:red)
dhcp-range=set:red,192.168.0.50,192.168.0.150,255.255.255.0,12h

#IP地址保留配置
dhcp-host=11:22:33:44:55:66,192.168.0.60
#使用文件的方式配置地址保留获取IP地址会较慢
#dhcp-host.txt文件内容为:dhcp-host=11:22:33:44:55:66,192.168.0.60
#conf-file=/etc/dnsmasq.d/dhcp-host.txt

#本地网卡和无线网卡绑定IP地址为192.168.0.60
#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60

#为打red标记的地址池配置网关
dhcp-option=tag:red,3,192.168.0.254

#为打red标记的地址池配置dns地址
dhcp-option=tag:red,option:dns-server,223.5.5.5,221.12.1.227,221.12.33.227

#为打red标记的地址池配置ntp服务器地址
dhcp-option=tag:red,option:ntp-server,192.168.0.4,10.10.0.5

#dhcp地址分配文件,用来查看IP地址的分配情况,该文件自动生成
dhcp-leasefile=/var/lib/dnsmasq/dnsmasq.leases

三、在dnsmasq服务中配置dns服务
sdafasf

四、tftp-server服务配置
yum install tftp-server -y   #安装tftp-server服务
vim /etc/xinetd.d/tftp         #开户tftp服务

service tftp
{
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /var/lib/tftpboot -c
    disable         = no
    per_source      = 11
    cps             = 100 2
    flags           = IPv4
}

chown nobody.root tftpboot  #tftp上传文件默认使用nobody
chmod 755 tftpboot

参考链接:
        https://www.cnblogs.com/studio313/p/6278698.html
        https://blog.51cto.com/longlei/2065967
        https://blog.csdn.net/konga/article/details/8882010   #tftp-server常见错误

 

dnsmasq服务配置

标签:sdn   color   取ip地址   网卡绑定   ntp服务   错误   root   col   net   

原文地址:https://www.cnblogs.com/xwupiaomiao/p/10912122.html

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