• dnsmasq 做 DHCP 服务器


    /etc/dnsmasq.conf 
    #DNS服务器的地址,就是我的热点的地址 
    listen-address=192.168.1.1 
    #设置DHCP分配的地址范围和时间 
    dhcp-range=192.168.1.10,192.168.1.20,1h 
    #设定网关的地址,当然还是我热点的地址 
    dhcp-option=3,192.168.1.1 
    #重头戏来了,设定DNS服务器,可悲之前怎么也找不到设定的办法。。。还说是要使用DNS中继。。然后就呵呵了 
    dhcp-option=option:dns-server,114.114.114.114,8.8.4.4

    然后 
    /etc/init.d/dnsmasq start 
    启动DHCP服务器

    参考:http://blog.csdn.net/one_six_mix/article/details/53245288

    实例配置文件:

    # DNS
    strict-order
    cache-size=1500
    conf-dir=/etc/dnsmasq.d
    # DHCP
    dhcp-option=3,172.16.1.1
    dhcp-lease-max=200
    dhcp-leasefile=/var/lib/dnsmasq/dnsmasq.leases
    interface=enp3s0
    dhcp-range=172.16.1.10,172.16.1.100,12h

    给网卡为  enp3s0的网卡口自动分配ip地址,ip 区间   172.16.1.10,172.16.1.100

  • 相关阅读:
    为zabbix穿上一件漂亮的外衣
    CentOS7 Ceph分布式集群部署
    SSH 免秘钥登录
    zabbix监控Tomcat/JVM 实例性能
    zabbix 监控 IPMI
    2装饰者模式
    1代理模式
    3单例模式
    2抽象工厂模式
    1工厂模式
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/6796037.html
Copyright © 2020-2023  润新知