DNS server no in sync with database?
Rowland Penny
repenny241155 at gmail.com
Thu Feb 26 02:35:53 MST 2015
On 26/02/15 05:06, Andrew Bartlett wrote:
> Kai,
>
> Can you help me understand what is going on with the internal DNS server
> here?
>
> I get different results between ldbsearch and a DNS lookup:
>
> ubuntu at ad-dc-1:~/samba$ host gc._msdcs.samba.example.com 127.0.0.1
> Using domain server:
> Name: 127.0.0.1
> Address: 127.0.0.1#53
> Aliases:
>
> gc._msdcs.samba.example.com has address 10.0.2.6
> gc._msdcs.samba.example.com has address 10.0.2.4
>
> While this is what I get when looking via ldbsearch:
>
> ubuntu at ad-dc-1:~/samba$ sudo bin/ldbsearch
> -H /var/lib/samba/private/sam.ldb -b
> DC=gc._msdcs,DC=samba.example.com,CN=MicrosoftDNS,DC=DomainDnsZones,DC=samba,DC=example,DC=com -s base --show-binary
> sudo: unable to resolve host ad-dc-1
> # record 1
> dn:
> DC=gc._msdcs,DC=samba.example.com,CN=MicrosoftDNS,DC=DomainDnsZones,DC=samba,DC=example,DC=com
> objectClass: top
> objectClass: dnsNode
> instanceType: 4
> whenCreated: 20150226045441.0Z
> whenChanged: 20150226045441.0Z
> uSNCreated: 3719
> showInAdvancedViewOnly: TRUE
> name: gc._msdcs
> objectGUID: a5218b75-7946-42e1-9b89-f087e37f8e04
> objectCategory:
> CN=Dns-Node,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com
> dc: gc._msdcs
> dnsRecord: NDR: struct dnsp_DnssrvRpcRecord
> wDataLength : 0x0004 (4)
> wType : DNS_TYPE_A (1)
> version : 0x05 (5)
> rank : DNS_RANK_ZONE (240)
> flags : 0x0000 (0)
> dwSerial : 0x00000004 (4)
> dwTtlSeconds : 0x00000384 (900)
> dwReserved : 0x00000000 (0)
> dwTimeStamp : 0x00376534 (3630388)
> data : union dnsRecordData(case 1)
> ipv4 : 10.0.2.4
>
> dnsRecord: NDR: struct dnsp_DnssrvRpcRecord
> wDataLength : 0x0004 (4)
> wType : DNS_TYPE_A (1)
> version : 0x05 (5)
> rank : DNS_RANK_ZONE (240)
> flags : 0x0000 (0)
> dwSerial : 0x00000007 (7)
> dwTtlSeconds : 0x00000384 (900)
> dwReserved : 0x00000000 (0)
> dwTimeStamp : 0x00376534 (3630388)
> data : union dnsRecordData(case 1)
> ipv4 : 10.56.240.4
>
> uSNChanged: 3725
> distinguishedName:
> DC=gc._msdcs,DC=samba.example.com,CN=MicrosoftDNS,DC=DomainDnsZones,DC=samba,DC=example,DC=com
>
> # returned 1 records
> # 1 entries
> # 0 referrals
>
>
Hi Andrew, are you using the correct search base ? I only ask, because
to get a result similar to yours, I have to use:
ldbsearch -H /var/lib/samba/private/sam.ldb -b
DC=gc,DC=_msdcs.example.com,CN=MicrosoftDNS,DC=ForestDnsZones,DC=example,DC=com
-s base --show-binary
I get returned:
# record 1
dn:
DC=gc,DC=_msdcs.example.com,CN=MicrosoftDNS,DC=ForestDnsZones,DC=example,DC=com
objectClass: top
objectClass: dnsNode
instanceType: 4
whenCreated: 20140812094132.0Z
uSNCreated: 3683
showInAdvancedViewOnly: TRUE
name: gc
objectGUID: 63712ed2-cd90-4d97-8e7b-09ec00f38aee
objectCategory: CN=Dns-Node,CN=Schema,CN=Configuration,DC=example,DC=com
dc: gc
dnsRecord: NDR: struct dnsp_DnssrvRpcRecord
wDataLength : 0x0004 (4)
wType : DNS_TYPE_A (1)
version : 0x05 (5)
rank : DNS_RANK_ZONE (240)
flags : 0x0000 (0)
dwSerial : 0x00000001 (1)
dwTtlSeconds : 0x00000384 (900)
dwReserved : 0x00000000 (0)
dwTimeStamp : 0x00000000 (0)
data : union dnsRecordData(case 1)
ipv4 : 192.168.0.2
dnsRecord: NDR: struct dnsp_DnssrvRpcRecord
wDataLength : 0x0004 (4)
wType : DNS_TYPE_A (1)
version : 0x05 (5)
rank : DNS_RANK_ZONE (240)
flags : 0x0000 (0)
dwSerial : 0x00000005 (5)
dwTtlSeconds : 0x00000384 (900)
dwReserved : 0x00000000 (0)
dwTimeStamp : 0x003752c4 (3625668)
data : union dnsRecordData(case 1)
ipv4 : 192.168.0.3
whenChanged: 20140813120804.0Z
uSNChanged: 3949
distinguishedName:
DC=gc,DC=_msdcs.example.com,CN=MicrosoftDNS,DC=ForestDnsZones,DC=example,DC=com
# returned 1 records
# 1 entries
# 0 referrals
root at dc01:~#
host gc._msdcs.example.com 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
gc._msdcs.example.com has address 192.168.0.3
gc._msdcs.example.com has address 192.168.0.2
Rowland
More information about the samba-technical
mailing list