اول اینکه نمیتونی تو DNS درصد بدی که مثلا فلان درصد از یک ip استفاده کنن و فلان درصد از یک ip دیگه .
دوم اگه failover میخوای میتونی از یک اسکریپت (vbs.) زمان بندی شده استفاده کنی که دو تا ip سرور رو چک کنه و در صورت در دسترس بودن یا نبودن آنها رکورد اونا رو در dns حذف و یا اضافه کنه :
کد:
call check
Function Reachable(strComputer)
' On Error Resume Next
Dim wmiQuery, objWMIService, objPing, objStatus
wmiQuery = "Select * From Win32_PingStatus Where Address = '" & strComputer & "'"
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set objPing = objWMIService.ExecQuery(wmiQuery)
For Each objStatus in objPing
If IsNull(objStatus.StatusCode) Or objStatus.Statuscode<>0 Then
Reachable = False 'if computer is unreacable, return false
Else
Reachable = True 'if computer is reachable, return true
End If
Next
End Function
Sub Run(ByVal sFile)
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run Chr(34) & sFile & Chr(34), 1, false
Set shell = Nothing
End Sub
sub check
If not Reachable("192.168.20.100") Then
run "dnscmd 127.0.0.1 /recorddelete test.com Alipour A 192.168.20.100"
else
run "dnscmd 127.0.0.1 /recordadd test.com Alipour A 192.168.20.100"
End If
end sub
If not Reachable("192.168.20.200") Then
run "dnscmd 127.0.0.1 /recorddelete test.com Alipour A 192.168.20.200"
else
run "dnscmd 127.0.0.1 /recordadd test.com Alipour A 192.168.20.200"
End If
end sub
سوم اینکه میتونی تنظیمات DNS Client Cache رو روی کلاینت ها دستکاری کنی :
How to Disable Client-Side DNS Caching in Windows XP and Windows Server 2003