Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with short name resolution on a parent/child domain

Status
Not open for further replies.

supraTT

IS-IT--Management
Dec 17, 2001
13
US
Ok, So here is a brief layout of what i have



^
^^^ Parent domain
^^^^^ AWG (contains all wins and dns)
/\ /\
ARS AMO
Child Domin Child Domain
DNS points to AWG DNS points to AWG
/
AR-EML10
Workstation
Points to AWG for NS


ok from any machine in the parent domain if i type ping ar-eml10 i get host not found. BUT its listed in the wins directory and in the DNS (although in a sub domain for ARS) if i ping its fqdn, ar-eml10.ars.awg.com it works.

any pointers??



 
You need to add the subdomain dns suffixes to the dns suffixes list on the hosts in the parent domain. By default it just appends the top-level suffix "awg.com" onto any host-only queries. If you add suffixes to the suffix list for the ARS subdomain, the resolver on a client in the parent domain will try adding 'awg.com' and then 'ars.awg.com' to the host-only name before giving up.

You could add the suffix to the hosts in the parent domain via a script if you wanted. The suffixes are stored here in the registry:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters - SearchList

or if you want to change it via WMI, use this ugly script (from MS site) that I tweaked a bit to read a list of hostnames from a text file and cycle through them.
Code:
'=========================================================================
' NAME: <SetDHCPSuffixes.vbs>
'
' Original Author: Peter Costantini
' Editor: Dave Shackelford
' DATE  : 3/05/2007
'
' COMMENT: This script cycles through a list of computers
' in a local text file (list them in a single column) and
' uses WMI to set the DNS suffixes.
'
'==========================================================================


Const ForReading = 1
Txtfile = "c:\hostlist.txt"
arrNewDNSSuffixSearchOrder = Array("domainA.net", "sub.domainB.local", "domainB.local")

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextfile = objFSO.OpenTextFile (Txtfile, ForReading)

Do Until objTextfile.AtEndofStream
  strComputer = objTextFile.Readline
 
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
 
For Each objNicConfig In colNicConfigs
  strDNSHostName = objNicConfig.DNSHostName
Next
WScript.Echo VbCrLf & "DNS Host Name: " & strDNSHostName
 
For Each objNicConfig In colNicConfigs
  WScript.Echo VbCrLf & _
   "  Network Adapter " & objNicConfig.Index & VbCrLf & _
   "    " & objNicConfig.Description & VbCrLf & _
   "    DNS Domain Suffix Search Order - Before:"
  If Not IsNull(objNicConfig.DNSDomainSuffixSearchOrder) Then
    For Each strDNSSuffix In objNicConfig.DNSDomainSuffixSearchOrder
      WScript.Echo "      " & strDNSSuffix
    Next
  End If
Next
 
WScript.Echo VbCrLf & String(80, "-")
 
Set objNetworkSettings = _
 objWMIService.Get("Win32_NetworkAdapterConfiguration")
intSetSuffixes = _
 objNetworkSettings.SetDNSSuffixSearchOrder(arrNewDNSSuffixSearchOrder)
If intSetSuffixes = 0 Then
  WScript.Echo VbCrLf & "Replaced DNS domain suffix search order list."
ElseIf intSetSuffixes = 1 Then
  WScript.Echo VbCrLf & "Replaced DNS domain suffix search order list." & _
   VbCrLf & "    Must reboot."
Else
  WScript.Echo VbCrLf & "Unable to replace DNS domain suffix " & _
   "search order list."
End If
 
WScript.Echo VbCrLf & String(80, "-")
 
Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each objNicConfig In colNicConfigs
  WScript.Echo VbCrLf & _
   "  Network Adapter " & objNicConfig.Index & VbCrLf & _
   "    " & objNicConfig.Description & VbCrLf & _
   "    DNS Domain Suffix Search Order - After:"
  If Not IsNull(objNicConfig.DNSDomainSuffixSearchOrder) Then
    For Each strDNSSuffix In objNicConfig.DNSDomainSuffixSearchOrder
      WScript.Echo "      " & strDNSSuffix
    Next
  End If
Next
Loop

Hope that helps you out.

ShackDaddy
Shackelford Consulting
 
That was exactly what i needed! thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top