next up previous contents
Next: SAMBA Up: Dnsmasq server Previous: Dnsmasq DNS 架設   Contents

Dnsmasq DHCP 架設

  1. Dnsmasq DHCP 設定在 /etc/dnsmasq.conf。
    [root@dywnb ~]# grep dhcp /etc/dnsmasq.conf
    #no-dhcp-interface=
    #dhcp-range=192.168.0.50,192.168.0.150,12h
    #dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
    #dhcp-range=red,192.168.0.50,192.168.0.150
    #dhcp-host=11:22:33:44:55:66,192.168.0.60
    #dhcp-host=11:22:33:44:55:66,fred
    #dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
    #dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60
    #dhcp-host=bert,192.168.0.70,infinite
    #dhcp-host=id:01:02:02:04,192.168.0.60
    #dhcp-host=id:marjorie,192.168.0.60
    #dhcp-host=judge
    #dhcp-host=11:22:33:44:55:66,ignore
    #dhcp-host=11:22:33:44:55:66,id:*
    #dhcp-host=11:22:33:44:55:66,net:red
    #dhcp-host=11:22:33:*:*:*,net:red
    # Ignore any clients which are specified in dhcp-host lines
    #dhcp-ignore=#known
    #dhcp-vendorclass=red,Linux
    #dhcp-userclass=red,accounts
    #dhcp-mac=red,00:60:8C:*:*:*
    # been given as --dhcp-host options. Useful if you keep
    # run "dnsmasq --help dhcp" to get a list.
    # any dhcp-options. If you use Windows clients and Samba, there
    #dhcp-option=3,1.2.3.4
    #dhcp-option=option:router,1.2.3.4
    #dhcp-option=3
    #dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5
    #dhcp-option=42,0.0.0.0
    #dhcp-option=40,welly
    #dhcp-option=23,50
    #dhcp-option=27,1
    #dhcp-option=128,e4:45:74:68:00:00
    #dhcp-option=129,NIC=eepro100
    # (see dhcp-range for the declaration of the "red" network)
    #dhcp-option = net:red, option:ntp-server, 192.168.1.1
    # for the ISC dhcpcd in
    #dhcp-option=19,0           # option ip-forwarding off
    #dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
    #dhcp-option=45,0.0.0.0     # netbios datagram distribution server
    #dhcp-option=46,8           # netbios node type
    #dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com
    #dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8
    #dhcp-option=vendor:PXEClient,1,0.0.0.0
    #dhcp-option=vendor:MSFT,2,1i
    #dhcp-option=vendor:Etherboot,60,"Etherboot"
    # to use dhcp-option-force here. 
    #dhcp-option-force=208,f1:00:74:7e
    #dhcp-option-force=209,configs/common
    #dhcp-option-force=210,/tftpboot/pxelinux/files/
    #dhcp-option-force=211,30i
    #dhcp-boot=pxelinux.0
    # load. The dhcp-match sets the gpxe tag for requests from gPXE.
    #dhcp-match=gpxe,175 # gPXE sends a 175 option.
    #dhcp-boot=net:#gpxe,undionly.kpxe
    #dhcp-boot=mybootimage
    #dhcp-option=encap:175, 1, 5b         # priority code
    #dhcp-option=encap:175, 176, 1b       # no-proxydhcp 
    #dhcp-option=encap:175, 177, string   # bus-id 
    #dhcp-option=encap:175, 189, 1b       # BIOS drive code
    #dhcp-option=encap:175, 190, user     # iSCSI username
    #dhcp-option=encap:175, 191, pass     # iSCSI password
    #dhcp-match=peecees, option:client-arch, 0 #x86-32
    #dhcp-match=itanics, option:client-arch, 2 #IA64
    #dhcp-match=hammers, option:client-arch, 6 #x86-64
    #dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 
    # alternative to dhcp-boot.
    #dhcp-boot=net:red,pxelinux.red-net
    # An example of dhcp-boot with an external TFTP server: the name and IP
    #dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
    #dhcp-lease-max=150
    #dhcp-leasefile=/var/lib/dnsmasq/dnsmasq.leases
    # http://www.isc.org/index.pl?/sw/dhcp/authoritative.php
    #dhcp-authoritative
    #dhcp-script=/bin/echo
    #log-dhcp
    


2018-01-11