Windows Server 2012 DHCP 高可用性
DHCP伺服器能夠将一些網絡參數(IP,網關,DNS等)提供給用戶端。但是如果DHCP服務出現故障當機,則可能會導緻用戶端網絡連接配接中斷或無法自動擷取IP位址,是以配置DHCP的高可用就尤為重要。在Windows Server 2012 中提供了DHCP故障轉移功能,能確定DHCP服務的連續可用性。
一、DHCP伺服器安裝配置
1.環境介紹。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330076Jdtd.png" target="_blank"></a>
2.分别為Svr01和Svr02設定靜态IP。
3.為Svr01安裝DHCP服務。打開伺服器管理器,選擇“添加角色和功能”。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330077oX1d.png" target="_blank"></a>
4.如圖,保持預設,連續點選三次“下一步”.
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330080ch5s.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330083DaNS.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330087dY82.png" target="_blank"></a>
5.勾選“DHCP伺服器”,點選“添加功能”,最後點“下一步”。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330090iFSP.png" target="_blank"></a>
6.如圖,保持預設,連續點選兩次“下一步”,最後點選“安裝”
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703300956dPx.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330101esOi.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703301056TI6.png" target="_blank"></a>
7.等待安裝完成後,點選“完成DHCP配置”完成後續配置
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330112gVtp.png" target="_blank"></a>
8.點選“送出”,最後點選“關閉”。更據需要重新開機伺服器。
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703301155jw7.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330117s5ru.png" target="_blank"></a>
9.打開DHCP,右擊“IPv4”,選擇“建立作用域”
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330120dLjW.png" target="_blank"></a>
10.直接“下一步”,然後輸入作用域名稱。
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703301216m7H.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330124xv1C.png" target="_blank"></a>
11.輸入DHCP配置設定的IP位址範圍,
<a href="http://img1.51cto.com/attachment/201306/4/695063_137033012739TB.png" target="_blank"></a>
12.添加排除,這個根據實際需要,在該範圍内沒有需要排除的就直接“下一步”,租期預設即可;最後選擇“是,我想現在配置這些選項”,然後下一步。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330130RSqC.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_137033013320he.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330136FkkI.png" target="_blank"></a>
13.添加為用戶端配置設定的預設網關以及DNS伺服器。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330139Dhm6.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330142cc5g.png" target="_blank"></a>
14.如果企業中有wins伺服器,在此添加,沒有就直接“下一步”;然後選擇“是,我想現在激活此作用域”,最後點選“完成”。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330144h8oy.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703301470paR.png" target="_blank"></a>
至此DHCP伺服器的安裝完成,已經可以為用戶端提供服務了。
二、DHCP故障轉移配置
1.DHCP故障轉移要求
軟體要求:DHCP 故障轉移需要兩台運作 Windows Server 2012 的 DHCP 伺服器。
伺服器數量:DHCP 故障轉移不支援兩台以上的 DHCP 伺服器。故障轉移關系,始終隻包含兩台 DHCP 伺服器。
2.在Svr02上安裝DHCP服務,安裝方法同Svr01的步驟3~8,不再重複。Svr02隻需安裝DHCP即可,無需配置作用域。
3.在Svr01上右擊“IPv4”,選擇“配置故障轉移”。
<a href="http://img1.51cto.com/attachment/201306/4/695063_137033014938YZ.png" target="_blank"></a>
4.根據實際情況選擇需要配置故障轉移的作用域,點選“下一步”。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330151eHN1.png" target="_blank"></a>
5.輸入夥伴伺服器的計算機名或IP位址,然後"下一步”.
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330154uEPL.png" target="_blank"></a>
6.選擇故障轉移模式,我這裡選擇“負載平衡”,由于是實驗環境,負載平衡百分比保持預設,各50%。
負載平衡:在預設的負載共享模式部署中,兩台伺服器同時為特定子網中的用戶端提供 IP 位址和選項服務。用戶端請求在兩台伺服器之間進行負載平衡和共享。
當具有故障轉移關系的兩台伺服器都位于相同的實體站點時,最适合部署負載共享運作模式。這兩台伺服器将基于管理者配置的負載配置設定比例,響應 DHCP 用戶端的請求。
熱備用模式:在熱備用模式中,兩台 DHCP 伺服器以故障轉移的關系運作。在該模式中,活動伺服器負責為作用域或子網中所有用戶端租用 IP 位址和配置資訊。如果主伺服器變得不可用,則輔助伺服器繼續為用戶端提供服務。伺服器在子網範圍内充當主伺服器或輔助伺服器。例如,一台在給定子網中充當主伺服器角色的伺服器,可能在另一個子網中是輔助伺服器。
當中央辦公室或資料中心伺服器為遠端站點的伺服器充當備份伺服器時,最适合部署熱備用運作模式。此時,該伺服器對 DHCP 用戶端來說是本地伺服器。
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703301578MOz.png" target="_blank"></a>
7.點選“完成”,完成故障轉移配置。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330160vYhH.png" target="_blank"></a>
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330166XEvi.png" target="_blank"></a>
8.在Svr02上重新整理DHCP配置,檢視作用域已同步完成。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330183ZA3A.png" target="_blank"></a>
9.在DHCP用戶端 ipconfig /all 可以看到,為該用戶端提供服務是192.168.20.10,也就是Svr01。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330184HkID.png" target="_blank"></a>
10.示範故障轉移,現在關閉Svr01。
<a href="http://img1.51cto.com/attachment/201306/4/695063_13703301883JBL.png" target="_blank"></a>
11.在用戶端依次運作ipconfig /release , ipconfig /renew , ipconfig /all。可以看到現在的DHCP伺服器是192.168.20.11,也是Svr02,說明故障轉移已經切換過來了。
<a href="http://img1.51cto.com/attachment/201306/4/695063_1370330191nkiE.png" target="_blank"></a>
本文轉自 bilinyee部落格,原文連結: http://blog.51cto.com/ericfu/1627977 如需轉載請自行聯系原作者