Advertisement
lifeboy

LTSP dnsmasq config

Apr 26th, 2013
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 5.80 KB | None | 0 0
  1. $ cat /etc/dnsmasq.d/ltsp.conf
  2.  
  3. # Don't function as a DNS server:
  4. port=0
  5.  
  6. # Log lots of extra information about DHCP transactions.
  7. log-dhcp
  8.  
  9. # Dnsmasq can also function as a TFTP server. You may uninstall
  10. # tftpd-hpa if you like, and uncomment the next line:
  11. #enable-tftp
  12.  
  13. # Set the root directory for files available via FTP.
  14. tftp-root=/var/lib/tftpboot
  15.  
  16. # The boot filename.
  17. dhcp-boot=/ltsp/i386/pxelinux.0
  18.  
  19. # rootpath option, for NFS
  20. dhcp-option=17,/opt/ltsp/i386
  21.  
  22. # kill multicast
  23. dhcp-option=vendor:PXEClient,6,2b
  24.  
  25. # Disable re-use of the DHCP servername and filename fields as extra
  26. # option space. That's to avoid confusing some old or broken DHCP clients.
  27. dhcp-no-override
  28.  
  29. # PXE menu
  30. pxe-prompt="Press F8 for boot menu", 3
  31.  
  32. # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
  33. # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
  34. pxe-service=X86PC, "Boot from network", /ltsp/i386/pxelinux
  35.  
  36. # A boot service type of 0 is special, and will abort the
  37. # net boot procedure and continue booting from local media.
  38. pxe-service=X86PC, "Boot from local hard disk", 0
  39.  
  40. # If an integer boot service type, rather than a basename is given, then the
  41. # PXE client will search for a suitable boot service for that type on the
  42. # network. This search may be done by multicast or broadcast, or direct to a
  43. # server if its IP address is provided.
  44. #pxe-service=x86PC, "Install windows from RIS server", 1
  45.  
  46. # This range(s) is for the public interface, where dnsmasq functions
  47. # as a proxy DHCP server providing boot information but no IP leases.
  48. # Any ip in the subnet will do, so you may just put your server NIC ip here.
  49. #dhcp-range=192.168.1.3,proxy
  50.  
  51. # This range(s) is for the private network on 2-NIC servers,
  52. # where dnsmasq functions as a normal DHCP server, providing IP leases.
  53. dhcp-range=172.16.0.20,172.16.0.50,12h
  54.  
  55. # For static client IPs, and only for the private subnets,
  56. # you may put entries like this:
  57. #dhcp-host=00:20:e0:3b:13:af,10.160.31.111,client111,infinite
  58.  
  59. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  60. $ cat /etc/dnsmasq.conf
  61.  
  62. interface=eth1
  63.  
  64. # Set this (and domain: see below) if you want to have a domain
  65. # automatically added to simple names in a hosts-file.
  66. expand-hosts
  67.  
  68. domain=foodmed.co.za
  69.  
  70. # Override the default route supplied by dnsmasq, which assumes the
  71. # router is the same machine as the one running dnsmasq.
  72. #dhcp-option=3,1.2.3.4
  73.  
  74. # Do the same thing, but using the option name
  75. dhcp-option=option:router,172.16.0.1
  76.  
  77. # Set the DHCP server to authoritative mode. In this mode it will barge in
  78. # and take over the lease for any client which broadcasts on the network,
  79. # whether it has a record of the lease or not. This avoids long timeouts
  80. # when a machine wakes up on a new network. DO NOT enable this if there's
  81. # the slightest chance that you might end up accidentally configuring a DHCP
  82. # server for your campus/company accidentally. The ISC server uses
  83. # the same option, and this URL provides more information:
  84. # http://www.isc.org/files/auth.html
  85. dhcp-authoritative
  86.  
  87. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  88. $ netstat -tunap | grep dnsmasq
  89.  
  90. udp        0      0 0.0.0.0:4011            0.0.0.0:*                           26609/dnsmasq  
  91. udp        0      0 0.0.0.0:67              0.0.0.0:*                           26609/dnsmasq  
  92.  
  93. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  94. $ grep "dnsmasq" /var/log/syslog
  95.  
  96. Apr 26 11:33:13 Ashton dnsmasq[26329]: started, version 2.59 DNS disabled
  97. Apr 26 11:33:13 Ashton dnsmasq[26329]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN
  98. Apr 26 11:33:13 Ashton dnsmasq-dhcp[26329]: DHCP, IP range 172.16.0.20 -- 172.16.0.50, lease time 12h
  99. Apr 26 11:33:13 Ashton dnsmasq-dhcp[26329]: DHCP, proxy on subnet 192.168.1.3
  100. Apr 26 11:53:41 Ashton dnsmasq[26329]: exiting on receipt of SIGTERM
  101. Apr 26 11:53:43 Ashton dnsmasq[26609]: started, version 2.59 DNS disabled
  102. Apr 26 11:53:43 Ashton dnsmasq[26609]: compile time options: IPv6 GNU-getopt DBus i18n DHCP TFTP conntrack IDN
  103. Apr 26 11:53:43 Ashton dnsmasq-dhcp[26609]: DHCP, IP range 172.16.0.20 -- 172.16.0.50, lease time 12h
  104.  
  105. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  106.  
  107. Then suddenly, while I was away, I see this happened as logged in syslog
  108.  
  109. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 available DHCP range: 172.16.0.20 -- 172.16.0.50
  110. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 DHCPREQUEST(eth1) 172.16.0.23 3c:4a:92:8b:c6:60
  111. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 tags: eth1
  112. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 DHCPACK(eth1) 172.16.0.23 3c:4a:92:8b:c6:60
  113. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 requested options: 1:netmask, 3:router, 4, 23:default-ttl, 67:bootfile-name
  114. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 bootfile name: /ltsp/i386/pxelinux.0
  115. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 next server: 172.16.0.1
  116. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  1 option: 53:message-type  05
  117. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option: 54:server-identifier  172.16.0.1
  118. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option: 51:lease-time  00:00:a8:c0
  119. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option: 58:T1  00:00:4d:ce
  120. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option: 59:T2  00:00:8d:16
  121. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option:  1:netmask  255.255.255.0
  122. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option: 28:broadcast  172.16.0.255
  123. Apr 26 14:29:24 Ashton dnsmasq-dhcp[26609]: 1791609039 sent size:  4 option:  3:router  172.16.0.1
  124. 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