Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat /etc/dnsmasq.d/ltsp.conf
- # Don't function as a DNS server:
- port=0
- # Log lots of extra information about DHCP transactions.
- log-dhcp
- # Dnsmasq can also function as a TFTP server. You may uninstall
- # tftpd-hpa if you like, and uncomment the next line:
- #enable-tftp
- # Set the root directory for files available via FTP.
- tftp-root=/var/lib/tftpboot
- # The boot filename.
- dhcp-boot=/ltsp/i386/pxelinux.0
- # rootpath option, for NFS
- dhcp-option=17,/opt/ltsp/i386
- # kill multicast
- dhcp-option=vendor:PXEClient,6,2b
- # Disable re-use of the DHCP servername and filename fields as extra
- # option space. That's to avoid confusing some old or broken DHCP clients.
- dhcp-no-override
- # PXE menu
- pxe-prompt="Press F8 for boot menu", 3
- # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
- # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
- pxe-service=X86PC, "Boot from network", /ltsp/i386/pxelinux
- # A boot service type of 0 is special, and will abort the
- # net boot procedure and continue booting from local media.
- pxe-service=X86PC, "Boot from local hard disk", 0
- # If an integer boot service type, rather than a basename is given, then the
- # PXE client will search for a suitable boot service for that type on the
- # network. This search may be done by multicast or broadcast, or direct to a
- # server if its IP address is provided.
- #pxe-service=x86PC, "Install windows from RIS server", 1
- # This range(s) is for the public interface, where dnsmasq functions
- # as a proxy DHCP server providing boot information but no IP leases.
- # Any ip in the subnet will do, so you may just put your server NIC ip here.
- #dhcp-range=192.168.1.3,proxy
- # This range(s) is for the private network on 2-NIC servers,
- # where dnsmasq functions as a normal DHCP server, providing IP leases.
- dhcp-range=172.16.0.20,172.16.0.50,12h
- # For static client IPs, and only for the private subnets,
- # you may put entries like this:
- #dhcp-host=00:20:e0:3b:13:af,10.160.31.111,client111,infinite
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- $ cat /etc/dnsmasq.conf
- interface=eth1
- # Set this (and domain: see below) if you want to have a domain
- # automatically added to simple names in a hosts-file.
- expand-hosts
- domain=foodmed.co.za
- # Override the default route supplied by dnsmasq, which assumes the
- # router is the same machine as the one running dnsmasq.
- #dhcp-option=3,1.2.3.4
- # Do the same thing, but using the option name
- dhcp-option=option:router,172.16.0.1
- # Set the DHCP server to authoritative mode. In this mode it will barge in
- # and take over the lease for any client which broadcasts on the network,
- # whether it has a record of the lease or not. This avoids long timeouts
- # when a machine wakes up on a new network. DO NOT enable this if there's
- # the slightest chance that you might end up accidentally configuring a DHCP
- # server for your campus/company accidentally. The ISC server uses
- # the same option, and this URL provides more information:
- # http://www.isc.org/files/auth.html
- dhcp-authoritative
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- $ netstat -tunap | grep dnsmasq
- udp 0 0 0.0.0.0:4011 0.0.0.0:* 26609/dnsmasq
- udp 0 0 0.0.0.0:67 0.0.0.0:* 26609/dnsmasq
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- $ grep "dnsmasq" /var/log/syslog
- Apr 26 11:33:13 Ashton dnsmasq[26329]: started, version 2.59 DNS disabled
- Apr 26 11:33:13 Ashton dnsmasq[26329]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN
- Apr 26 11:33:13 Ashton dnsmasq-dhcp[26329]: DHCP, IP range 172.16.0.20 -- 172.16.0.50, lease time 12h
- Apr 26 11:33:13 Ashton dnsmasq-dhcp[26329]: DHCP, proxy on subnet 192.168.1.3
- Apr 26 11:53:41 Ashton dnsmasq[26329]: exiting on receipt of SIGTERM
- Apr 26 11:53:43 Ashton dnsmasq[26609]: started, version 2.59 DNS disabled
- Apr 26 11:53:43 Ashton dnsmasq[26609]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN
- Apr 26 11:53:43 Ashton dnsmasq-dhcp[26609]: DHCP, IP range 172.16.0.20 -- 172.16.0.50, lease time 12h
- >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
- Then suddenly, while I was away, I see this happened as logged in syslog
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 available DHCP range: 172.16.0.20 -- 172.16.0.50
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 DHCPREQUEST(eth1) 172.16.0.23 3c:4a:92:8b:c6:60
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 tags: eth1
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 DHCPACK(eth1) 172.16.0.23 3c:4a:92:8b:c6:60
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 requested options: 1:netmask, 3:router, 4, 23:default-ttl, 67:bootfile-name
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 bootfile name: /ltsp/i386/pxelinux.0
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 next server: 172.16.0.1
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 1 option: 53:message-type 05
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 54:server-identifier 172.16.0.1
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 51:lease-time 00:00:a8:c0
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 58:T1 00:00:4d:ce
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 59:T2 00:00:8d:16
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 1:netmask 255.255.255.0
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 28:broadcast 172.16.0.255
- Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size: 4 option: 3:router 172.16.0.1
- Apr 26 14:29:24 Ashton in.tftpd[26768]: RRQ from 172.16.0.23 filename /ltsp/i386/pxelinux.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement