dnsmasq 輕型 dns/dhcpd 安裝設定

1 安裝 dnsmasq

yum install dnsmasq

2 設定 dnsmasq

  • 預計 dhcp 設定目標:
    • 分配 ip 範圍是 192.168.11.101-192.168.11.150
    • 取得 ip 有效時間為 12 小時
    • 只接受 eth1 連入才能分配 IP
vi /etc/dnsmasq.conf
:
dhcp-leasefile=/tmp/dnsmasq.leases
interface=eth1
dhcp-range=192.168.11.101,192.168.11.500,12h
dhcp-option=1,255.255.255.0 #subnet mask
dhcp-option=28,192.168.11.255 #broadcast
dhcp-option=3,192.168.11.250 #default gateway
dhcp-option=6,192.168.11.251 #DNS
:
service dnsmasq start
chkconfig dnsmasq on

參考網頁

 
回到頁頂
tech/dnsmasq.txt (3243) · 上一次變更: 2009-11-03 08:58 由 jonathan
 
 
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0