[Samba] samba-tool dns serverinfo

Günter Kukkukk linux at kukkukk.com
Wed Nov 12 15:58:09 MST 2014


Am 12.11.2014 um 23:24 schrieb Rowland Penny:
> On 12/11/14 22:10, Günter Kukkukk wrote:
>> Am 12.11.2014 um 21:41 schrieb Günter Kukkukk:
>>> Am 12.11.2014 um 21:25 schrieb Rowland Penny:
>>>> On 12/11/14 20:19, Günter Kukkukk wrote:
>>>>> Am 12.11.2014 um 20:53 schrieb Donaldson Jeff:
>>>>>> Good Afternoon,
>>>>>>
>>>>>>
>>>>>> I successfully joined an Ubuntu 14.04 server with Samba 4.1.9 to my existing domain. I want this server to become my Master, but before I attempt
>>>>>> to seize roles, I have been double and triple checking all of the configuration files and DNS entries. I noticed that this server's dns serverinfo
>>>>>> differs from the other three servers. For it's aipServerAddrs and aipListenAddrs, it shows the broadcast address of 255.255.255.255. If I view the
>>>>>> properties in DNS Manager, it shows that it is listening on that address. How do I go about getting it to listen on the localhost again? Here is a
>>>>>> copy of my serverinfo.... Any help is appreciated.
>>>>>>
>>>>>>
>>>>>>     dwVersion                     : 0xece0205
>>>>>>     fBootMethod                 : DNS_BOOT_METHOD_DIRECTORY
>>>>>>     fAdminConfigured          : FALSE
>>>>>>     fAllowUpdate                 : TRUE
>>>>>>     fDsAvailable                  : TRUE
>>>>>>     pszServerName             : PDC01.domain.local
>>>>>>     pszDsContainer             : CN=MicrosoftDNS,DC=DomainDnsZones,DC=domain,DC=local
>>>>>>     aipServerAddrs              : ['255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)']
>>>>>>     aipListenAddrs               : ['255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)']
>>>>>>     aipForwarders                : []
>>>>>>     dwLogLevel                   : 0
>>>>>>     dwDebugLevel               : 0
>>>>>>     dwForwardTimeout         : 3
>>>>>>     dwRpcPrototol                : 0x5
>>>>>>     dwNameCheckFlag         : DNS_ALLOW_MULTIBYTE_NAMES
>>>>>>     cAddressAnswerLimit      : 0
>>>>>>     dwRecursionRetry           : 3
>>>>>>     dwRecursionTimeout       : 8
>>>>>>     dwMaxCacheTtl              : 86400
>>>>>>     dwDsPollingInterval         : 180
>>>>>>     dwScavengingInterval        : 0
>>>>>>     dwDefaultRefreshInterval    : 168
>>>>>>     dwDefaultNoRefreshInterval  : 168
>>>>>>     fAutoReverseZones           : FALSE
>>>>>>     fAutoCacheUpdate            : FALSE
>>>>>>     fRecurseAfterForwarding     : FALSE
>>>>>>     fForwardDelegations         : TRUE
>>>>>>     fNoRecursion                : FALSE
>>>>>>     fSecureResponses            : FALSE
>>>>>>     fRoundRobin                 : TRUE
>>>>>>     fLocalNetPriority           : FALSE
>>>>>>     fBindSecondaries            : FALSE
>>>>>>     fWriteAuthorityNs           : FALSE
>>>>>>     fStrictFileParsing          : FALSE
>>>>>>     fLooseWildcarding           : FALSE
>>>>>>     fDefaultAgingState          : FALSE
>>>>>>     dwRpcStructureVersion       : 0x2
>>>>>>     aipLogFilter                : []
>>>>>>     pwszLogFilePath             : None
>>>>>>     pszDomainName               : domain.local
>>>>>>     pszForestName               : domain.local
>>>>>>     pszDomainDirectoryPartition : DC=DomainDnsZones,DC=domain,DC=local
>>>>>>     pszForestDirectoryPartition : DC=ForestDnsZones,DC=domain,DC=local
>>>>>>     dwLocalNetPriorityNetMask   : 0xff
>>>>>>     dwLastScavengeTime          : 0
>>>>>>     dwEventLogLevel             : 4
>>>>>>     dwLogFileMaxSize            : 0
>>>>>>     dwDsForestVersion           : 2
>>>>>>     dwDsDomainVersion           : 2
>>>>>>     dwDsDsaVersion              : 4
>>>>>>     fReadOnlyDC                 : FALSE
>>>>>>
>>>>>>
>>>>>> Jeff Donaldson
>>>>>> Technology Director
>>>>>> Newark Charter School
>>>>>> jeff.donaldson at ncs.k12.de.us
>>>>>> (302) 369-2001 ext: 425
>>>>>>
>>>>> Follow this recent thread https://lists.samba.org/archive/samba-technical/2014-November/103475.html
>>>>> When using
>>>>>        samba-tool dns serverinfo server
>>>>> against a windows server, with that patch all should be displayed ok.
>>>>> Note, that the dns server infos from samba servers are always wrong atm! ('255.255.255.255 (53)')
>>>> Is this with the internal DNS server ?, only reason I ask is that it works for me (but I use bind9)
>>>>
>>>> aipServerAddrs              : ['192.168.0.3 (53)']
>>>> aipListenAddrs              : ['192.168.0.3 (53)']
>>>>
>>>> Rowland
>>>>
>>>>> (some pieces are not implemented yet)
>>>>>
>>>>> So use "netstat ......" to see what IPs/interfaces samba is using.
>>>>>
>>>>> Also have a look at your smb.conf regarding
>>>>>
>>>>> interfaces = ......
>>>>> bind interfaces only = ....
>>>>>
>>>>> Cheers, Günter
>>>>>
>>> oh right, i forgot to mention that it will _not_ work with
>>> samba servers, when IPv6 addresses are used, or when samba binds
>>> to both IPv4 and IPv6.
>>>
>>> It should play no role whether the internal dns server or the DLZ module is used.
>>>
>>> Cheers, Günter
>>>
>> To give some more info about the current samba state of these aip* DNS-entries:
>>
>> At some time in the past Microsoft had to implement IPv6. Some former (IPv4) restricted
>> dns data structures had to be expanded - to be more flexible.
>> Obviously these changes also made it into "serverinfo":
>>
>>  From older version which could only hold IPv4 entries:
>>          struct IP4_ARRAY *aipServerAddrs;/* [unique] */
>>          struct IP4_ARRAY *aipListenAddrs;/* [unique] */
>>          struct IP4_ARRAY *aipForwarders;/* [unique] */
>>
>> to recent implementation with even mixed IPv4 and IPv6 entries.
>>          struct DNS_ADDR_ARRAY *aipServerAddrs;/* [unique] */
>>          struct DNS_ADDR_ARRAY *aipListenAddrs;/* [unique] */
>>          struct DNS_ADDR_ARRAY *aipForwarders;/* [unique] */
>>
>> One can check this with samba-tool
>>
>> samba-tool dns serverinfo server --client-version=w2k
>> samba-tool dns serverinfo server --client-version=dotnet
>> samba-tool dns serverinfo server --client-version=longhorn
>>
>> ... and will probably get some python errors.
> Nope, they all work for me, and all return the same info except that the first doesn't return as much.
> 
> Rowland

So then just some more info for all who have IPv6 or a mixed IPv4/IPv6 setup:

samba-tool dns serverinfo li4771-131 --client-version=w2k                  <====== !
  dwVersion                   : 0xece0205
  fBootMethod                 : DNS_BOOT_METHOD_DIRECTORY
  fAdminConfigured            : FALSE
  fAllowUpdate                : TRUE
  fDsAvailable                : TRUE
  pszServerName               : LI4771-131.addlz.kukkukk.com
  pszDsContainer              : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com
ERROR(<class 'struct.error'>): uncaught exception - 'i' format requires -2147483648 <= number <= 2147483647
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 709, in run
    print_serverinfo(self.outf, typeid, res)
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 202, in print_serverinfo
    ip4_array_string(serverinfo.aipServerAddrs))
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 129, in ip4_array_string
    addr = '%s' % inet_ntoa(pack('i', array.AddrArray[i]))
---------------------------------

samba-tool dns serverinfo li4771-131 --client-version=dotnet              <===== !
  dwVersion                   : 0xece0205
  fBootMethod                 : DNS_BOOT_METHOD_DIRECTORY
  fAdminConfigured            : FALSE
  fAllowUpdate                : TRUE
  fDsAvailable                : TRUE
  pszServerName               : LI4771-131.addlz.kukkukk.com
  pszDsContainer              : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com
ERROR(<class 'struct.error'>): uncaught exception - 'i' format requires -2147483648 <= number <= 2147483647
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 709, in run
    print_serverinfo(self.outf, typeid, res)
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 202, in print_serverinfo
    ip4_array_string(serverinfo.aipServerAddrs))
  File "/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/dns.py", line 129, in ip4_array_string
    addr = '%s' % inet_ntoa(pack('i', array.AddrArray[i]))
------------------------------------

samba-tool dns serverinfo li4771-131 --client-version=longhorn                 <====== !
  dwVersion                   : 0xece0205
  fBootMethod                 : DNS_BOOT_METHOD_DIRECTORY
  fAdminConfigured            : FALSE
  fAllowUpdate                : TRUE
  fDsAvailable                : TRUE
  pszServerName               : LI4771-131.addlz.kukkukk.com
  pszDsContainer              : CN=MicrosoftDNS,DC=DomainDnsZones,DC=addlz,DC=kukkukk,DC=com
  aipServerAddrs              : ['255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)']
  aipListenAddrs              : ['255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)', '255.255.255.255 (53)']
  aipForwarders               : []

------------------------------------------------

So finally now 2 working examples against MS Windows W2008r2:

As can be seen the "dotnet" version can only display IPv4 (but IPv6 is around):

samba-tool dns serverinfo w08r2 --client-version=dotnet               <===== !
  dwVersion                   : 0x1db10106
  fBootMethod                 : DNS_BOOT_METHOD_DIRECTORY
  fAdminConfigured            : TRUE
  fAllowUpdate                : TRUE
  fDsAvailable                : TRUE
  pszServerName               : w08r2.addlz.kukkukk.com
  pszDsContainer              : cn=MicrosoftDNS,cn=System,DC=addlz,DC=kukkukk,DC=com
  aipServerAddrs              : ['192.168.200.81']
  aipListenAddrs              : ['192.168.200.81']
  aipForwarders               : ['192.168.200.70']
...

Here the most advanced "longhorn" outcome:
samba-tool dns serverinfo w08r2 --client-version=longhorn                 <==== !
  dwVersion                   : 0x1db10106
  fBootMethod                 : DNS_BOOT_METHOD_DIRECTORY
  fAdminConfigured            : TRUE
  fAllowUpdate                : TRUE
  fDsAvailable                : TRUE
  pszServerName               : w08r2.addlz.kukkukk.com
  pszDsContainer              : cn=MicrosoftDNS,cn=System,DC=addlz,DC=kukkukk,DC=com
  aipServerAddrs              : ['2a02:8109:8f40:11e0:a1a2:fff8:4aa6:3613', 'fd4d:e013:bb96:a60c::51', 'fd4d:e013:bb96:a60c:a1a2:fff8:4aa6:3613',
'fe80::a1a2:fff8:4aa6:3613', '192.168.200.81']
  aipListenAddrs              : ['fd4d:e013:bb96:a60c::51', 'fe80::a1a2:fff8:4aa6:3613', '192.168.200.81']
  aipForwarders               : ['192.168.200.70']

I hope, this sheds some light into this. :-)

Cheers, Günter

>>
>> At least "inet_ntoa()" - which works only with IPv4 - must be adopted to inet_ntop(),
>> which allows for both IP versions.
>>
>> Some additional cleanup in the samba sources is needed here.
>>
>> Cheers, Günter
>>
> 


-- 



More information about the samba mailing list