差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

下次修改
前次修改
tech:dnsmasq [2009/11/03 08:32] – 建立 jonathantech:dnsmasq [2012/10/13 23:33] (目前版本) jonathan
行 1: 行 1:
 +====== dnsmasq 輕型 dns/dhcpd 安裝設定 ======
 +===== - 安裝 dnsmasq =====
 +<code sh>
 +yum install dnsmasq
 +</code>
  
 +===== - 設定 dnsmasq =====
 +  * 預計 dhcp  設定目標:
 +    * 分配 ip 範圍是 192.168.11.101-192.168.11.150
 +    * 取得 ip 有效時間為 12 小時
 +    * 只接受 eth1 連入才能分配 IP
 +<code sh>
 +vi /etc/dnsmasq.conf
 +</code>
 +<file>
 +:
 +port=
 +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
 +:
 +</file>
 +<code sh>
 +service dnsmasq start
 +chkconfig dnsmasq on
 +</code>
 +
 +<note>
 +  * port= 表示關閉 DNS 功能, 這樣可以解決同主機啟用 bind 的問題
 +</note>
 +
 +===== 參考網頁 =====
 +  * http://cha.homeip.net/blog/archives/2007/03/_la_fonera_repe.html
 +
 +{{tag>dns dhcpd dnsmasq 安裝}}