Forum
Merhaba arkadaşlar
HP swicth ler ve Windows Server 2008 R2 üzerinde kurulu NPS ile kurulu kablolu 802.1x yapımız mevcut. Kullanıcılar kimlik doğrulamadan geçerken 30 saniye bekliyorlar bu normal mi. Aynı portta MACox yüklü makine 5-6 saniye de doğrulamadan geçip IP alırken .Windows makineler 25-30 saniye bekliyor sebebi ne olabilir. ? bir fikri olan var mı ?
Sertifikayı doğrulama süresi bence. Windows Domain yapılı bir ortam değil mi? test için sorun yaşayan PC de aşağıdaki adımları olacak şekilde client a yükleyip dener misiniz?
1) run dan MMC yi çalıştırın sonra File dan "Add and remove snap" i secin. Açılan ekranda Certificates ı tıklayın ve local cumputer secerek tamamlayın.
2) Sonra sertifikanızı "trusted root certification" ve Intermediate altına ekleyin
Sorun düzelmez ise Client ların işletim sistemi ne? Aşağıdaki komutları bir vbs dosya oluşturun sonra bu vbs scripti bir kereliğine run as administrator ile açılan komut satırında wscript ile çalıştırın
VBS Scripts:
Main
If Err.Number <> 0 Then
WScript.Echo "Error: " & CStr(Err.Number) & " " & Err.Description
End if
Sub Main()
Dim strComputer
Dim strConfigFile
Dim bExport
set oArgs=wscript.arguments
If oArgs.Count < 2 Then
Usage()
WScript.Quit()
End If
If oArgs.Count = 3 Then
strComputer = oArgs.item(2)
Else
strComputer = "."
End If
strConfigFile = oArgs.item(1)
strComputerName = oArgs.item(1)
If Len(oArgs.item(0)) <> 2 Then
Usage()
End If
IOoption = Mid(oArgs.item(0), 2, 1)
If IOoption = "E" or IOoption = "e" Then
ExportConfig strConfigFile, strComputer
ElseIf IOoption = "I" or IOoption = "i" Then
ImportConfig strConfigFile, strComputer
End If
End Sub
Function GetWiredInterfaceList(strComputer)
' The internal array stores the adapter information by using the following structure:
' COL1 COL2 COL3 COL4 COL5
' ROW1 <nWiredInterfaces> - - - -
' ROW2 <GUID 1> Intf1 description "WIRED"
' ROW3 <GUID 2>
' ...
' ...
' ROWn '..................................................................................
Dim InterfaceTable
Dim InterfaceTableTemp
Dim nWiredInterfaces
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colAdapterInterfaces = objWMIService.ExecQuery ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
If colAdapterInterfaces.Count = 0 Then
Wscript.Echo "No valid IP interfaces!!!"
WScript.Quit
Else
ReDim InterfaceTableTemp(colAdapterInterfaces.Count, 5)
End If
n = 0
WScript.echo
nWiredInterfaces = 0
For Each objAdapter In colAdapterInterfaces
' The script builds the interface table here for all the available adapter interfaces.
' Note: The script ignores wireless interfaces while it builds this table.
IF IsWiredInterface(objAdapter.Description, strComputer) = TRUE Then
InterfaceTableTemp(n, 0) = objAdapter.SettingId
InterfaceTableTemp(n, 1) = objAdapter.Description
InterfaceTableTemp(n, 2) = "WIRED"
nWiredInterfaces = nWiredInterfaces+1
n = n+1
End IF
Next
If nWiredInterfaces = 0 Then
WScript.Echo "Error: No Wired interface present!"
WScript.Quit
End If
ReDim InterfaceTable(nWiredInterfaces, 5)
For i = 0 To (nWiredInterfaces-1)
For j = 0 To 5
InterfaceTable(i, j) = InterfaceTableTemp(i, j)
Next
Next
GetWiredInterfaceList = InterfaceTable
End Function
Public Function IsWiredInterface(strInterfaceDesc, strComputer)
On Error resume Next
Dim bRetVal
Dim SWbemLocator
Dim SWbemServices
Dim objWbemObjectSet
Dim sProperty
IsWiredInterface = TRUE
Err.Clear
Set SWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set SWbemServices = SWbemLocator.ConnectServer(strComputer, "root\WMI")
Set objWbemObjectSet = SWbemServices.ExecQuery("Select * From MSNdis_PhysicalMediumType", "WQL", wbemFlagReturnWhenComplete )
If Err.Number <> 0 Then
' WScript.Echo "Error: " & CStr(Err.Number) & " " & Err.Description
Err.Clear
Exit Function
End if
' Make sure that the interface is a wired interface.
For Each sProperty in objWbemObjectSet
If StrComp(strInterfaceDesc, sProperty.InstanceName) = 0 Then
If (sProperty.NdisPhysicalMediumType) > 0 Then
' The script ignores the following media types:
' 1. NdisPhysicalMediumWirelessLan
' 2. NdisPhysicalMediumCableModem
' 3. NdisPhysicalMediumPhoneLine
' 4. NdisPhysicalMediumPowerLine
' 5. NdisPhysicalMediumDSL
' 6. NdisPhysicalMediumFibreChannel
' 7. NdisPhysicalMedium1394
' 8. NdisPhysicalMediumWirelessWan
IsWiredInterface = FALSE
Exit Function
End If
End If
Next
End Function
Function ExportConfig(strConfigFile, strComputer)
Dim WiredInterfaceList
Dim nWiredInterface
Dim strSourceInterfaceGUID
Dim iSourceInterfaceIndex
WiredInterfaceList = GetWiredInterfaceList(strComputer)
nWiredInterface = UBound(WiredInterfaceList)
If nWiredInterface > 1 Then
WScript.Echo "Please select one of the listed Wired Adapter Interface(s):"
WScript.Echo "==========================================================="
WScript.Echo
For i=0 to nWiredInterface-1
WScript.Echo (i+1) & ". " & _
WiredInterfaceList(i, 1) & _
". " & "GUID: " _
& WiredInterfaceList(i, 0)
Next
Dim Input
Input = ""
WScript.Echo
Do While Not WScript.StdIn.AtEndOfLine
Input = Input & WScript.StdIn.Read(1)
Loop
WScript.StdIn.ReadLine()
If (Int(Input) > nWiredInterface) OR (Int(Input) <= 0) Then
Wscript.Echo " Invalid Interface Index"
Wscript.Quit
Else
iSourceInterfaceIndex = Int(Input) - 1
End If
Elseif nWiredInterface Then
' There is only one wired interface present.
iSourceInterfaceIndex = 0
End If
WScript.Echo "The following Adapter Interface configuration will be exported:"
WScript.Echo "==============================================================="
WScript.Echo
WScript.Echo "Description: " & WiredInterfaceList(iSourceInterfaceIndex, 1)
WScript.Echo "GUID: " & WiredInterfaceList(iSourceInterfaceIndex, 0)
WScript.Echo "Export Config File: " & strConfigFile
WScript.Echo
WScript.Echo "Press ENTER to continue..."
Do While Not WScript.StdIn.AtEndOfLine
Input = Input & WScript.StdIn.Read(1)
Loop
ExportInterfaceConfig WiredInterfaceList(iSourceInterfaceIndex, 0), strConfigFile, strComputer
WScript.Echo "Successfully exported configuration to '" & strConfigFile & "'."
End Function
Function ExportInterfaceConfig(strInterfaveGUID, strConfigFile, strComputer)
Dim strByte
Dim strHexBlobtoCfgFile
Dim binBlob
const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "SOFTWARE\Microsoft\EAPOL\Parameters\Interfaces\" & strInterfaveGUID
strValueName = "1"
Set oReg=GetObject( "winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
oReg.GetBinaryValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, binBlob
If IsArray(binBlob) Then
path = strConfigFile
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(path, True)
For i=0 to Ubound(binBlob)
strByte = Hex(binBlob(i))
If Len(strByte) = 1 Then
strByte = "0" & strByte
End If
strByte = strByte & ","
strHexBlobtoCfgFile = strHexBlobtoCfgFile & strByte
Next
a.WriteLine(strHexBlobtoCfgFile)
a.Close
Else
WSCript.Echo
WScript.Echo "No configuration present for the selected IP interface. Please configure security settings using Windows Advanced Network UI and run this script again."
WScript.Quit
End If
ExportInterfaceConfig = TRUE
End Function
Function ImportConfig(strConfigFile, strComputer)
Dim WiredInterfaceList
Dim nWiredInterface
Dim strSourceInterfaceGUID
Dim iSourceInterfaceIndex
WiredInterfaceList = GetWiredInterfaceList(strComputer)
nWiredInterface = UBound(WiredInterfaceList)
WScript.Echo "Available Wired Adapter Interface(s):"
WScript.Echo "===================================="
WScript.Echo
For i=0 to nWiredInterface-1
WScript.Echo (i+1) & ". " & _
WiredInterfaceList(i, 1) & _
". " & "GUID: " _
& WiredInterfaceList(i, 0)
Next
WScript.Echo
WScript.Echo "Network configuration from '" & strConfigFile & _
"' will be applied on the above listed adapter interfaces(s)..."
' The script examines all the available interfaces to apply the configuration settings.
For i=0 to nWiredInterface-1
ImportInterfaceConfig WiredInterfaceList(i, 0), strConfigFile, strComputer
Next
WScript.Echo "Successfully applied configuration from '" & strConfigFile & "' on all the available Wired Interface(s)."
End Function
Private Function HexStringToIntArray(HexString)
Dim ByteArray
Dim TokenStringArray
Redim ByteArray(Len(HexString)/3)
Redim TokenStringArray(Len(HexString)/3)
TokenStringArray = Split(HexString, ",")
For i=0 to (Ubound(TokenStringArray)-1)
ByteArray(i) = CByte("&H" & TokenStringArray(i))
Next
HexStringToIntArray = ByteArray
End Function
Function ImportInterfaceConfig(strInterfaceGUID, configFile, strComputer)
Dim strHexBlobFromCfgFile
Const ForReading = 1
Dim intHexStrArray
Dim RegPath
const HKEY_LOCAL_MACHINE = &H80000002
strKeyPath = "SOFTWARE\Microsoft\EAPOL\Parameters\Interfaces\" & strInterfaceGUID
strValueName = "1"
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.FileExists(configFile) = False Then
WScript.Echo "Error: Network configuration file " & configFile & " does not exist. Please provide proper configuration file"
WScript.Quit
End If
Set a = fs.OpenTextFile(configFile, 1)
strHexBlobFromCfgFile = a.ReadLine
intHexStrArray = HexStringToIntArray(strHexBlobFromCfgFile)
WriteNetCfgToReg intHexStrArray, strKeyPath, strValueName, strComputer
End Function
Function WriteNetCfgToReg(ByVal ByteArray, RegPath, RegValName, StrComputer)
Dim ByteArrayToReg
Dim ReceivedVals
ReceivedVals = UBound(ByteArray)
If (ReceivedVals <= 0) Then
WScript.Echo "WriteNetCfgToReg: Improper Config Datareceived"
WSCript.Quit
End If
ByteArrayToReg = _
Array(&HFF, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, _
&H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &H00, &HFF)
Redim Preserve ByteArrayToReg(UBound(ByteArray)-1)
For i=0 to Ubound(ByteArray)-1
If CByte(ByteArray(i))>255 Then
WScript.Echo "WriteNetCfgToReg: Config Data Over Flow"
WSCript.Quit
End If
ByteArrayToReg(i) = CByte(ByteArray(i))
Next
const HKEY_LOCAL_MACHINE = &H80000002
Set oReg=GetObject( "winmgmts:{impersonationLevel=impersonate}!\\" & StrComputer & "\root\default:StdRegProv")
oReg.CreateKey HKEY_LOCAL_MACHINE, RegPath
oReg.SetBinaryValue HKEY_LOCAL_MACHINE, RegPath, RegValName, ByteArrayToReg
End Function
Function Usage()
WScript.Echo "Usage:"
WScript.Echo "CScript WiredNetCfgIO.vbs /e /i <ConfigFile>"
WScript.Echo " /e - Exports the wired Network Interface configuration"
WScript.Echo " /i - Imports the wired Network Interface configuration"
WScript.Echo " <ConfigFile> - A valid windows file name. This script will perform read/write operations depending on /e /i options"
End Function