LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   BIND transfer garbled (https://www.linuxquestions.org/questions/linux-networking-3/bind-transfer-garbled-4175439752/)

billc108 12-02-2012 10:51 PM

BIND transfer garbled
 
I'm in the process of setting up a new BIND server as a secondary, in order to replace an antiquated one.

Both master and slave are running BIND 9.9.2

Transfers are occurring - sorta. They're coming through garbled. What should be coming through looking like:

Code:

$ORIGIN AfricaBound.org.
$ttl 38400
Africabound.org.        IN        SOA        ns1.sustainablesources.com. hostmaster.sustainablesources.com. (
                        1354438513
                        10800
                        3600
                        604800
                        38400 )
Africabound.org.        IN        NS        ns1.sustainablesources.com.
Africabound.org.        IN        NS        ns2.sustainablesources.com.
Africabound.org.        IN        NS        ns3.sustainablesources.com.

is instead coming through as:

Code:

+– AfricaboundorgÍî¶g– Africaboundorgns1sustainablesourcescomns2sustainablesourcescomns3sustainablesourcescomG–www Africaboundorgns1sustainablesourcescom
I've seen this before on transfers out of the old BIND server (which was previously the master), but I figured it was just a problem specific to that setup.

Any ideas as to what's causing this and how to fix it? Thanks!

bathory 12-03-2012 02:26 AM

Hi,

Could be a network problem, like a broken router, switch, firewall or something like that.
What happens if you're doing the transfer manually for both udp/tcp?
Code:

dig -t axfr AfricaBound.org @x.x.x.x +notcp
dig -t axfr AfricaBound.org @x.x.x.x +tcp

where x.x.x.x is the master's IP

billc108 12-03-2012 02:44 AM

Quote:

Originally Posted by bathory (Post 4841580)
What happens if you're doing the transfer manually for both udp/tcp?

Looks normal for both.

bathory 12-03-2012 04:03 AM

Aha. For bind 9.9.0 the slave zones are stored in raw format (see towards the end here)
If you want to see the zone in readable form you can run:
Code:

named-compilezone -j -f raw -o zone.txt AfricaBound.org /path/to/slave/zonefile
Regards

billc108 12-03-2012 09:27 AM

Quote:

Originally Posted by bathory (Post 4841624)
Aha. For bind 9.9.0 the slave zones are stored in raw format (see towards the end here)
If you want to see the zone in readable form you can run:
Code:

named-compilezone -j -f raw -o zone.txt AfricaBound.org /path/to/slave/zonefile
Regards

Wow. Thanks for that. How very annoying - at least until I get used to it.

Unfortunately, running that code (with the correct path, of course) gives me "not loaded due to errors." in all the variations I've tried. But at least that gives me a jumping off point.

Where did you get the code above? Perhaps there's some tweaking I can do to adjust it so I can read it as a human.

billc108 12-03-2012 09:41 AM

Quote:

Originally Posted by bathory (Post 4841624)
Aha. For bind 9.9.0 the slave zones are stored in raw format (see towards the end here)
If you want to see the zone in readable form you can run:
Code:

named-compilezone -j -f raw -o zone.txt AfricaBound.org /path/to/slave/zonefile
Regards

If I use:
Code:

$ named-checkzone -d  -f text -o zone.txt africabound.org /var/named/hosts/slave/
I get:

l
Code:

oading "africabound.org" from "/var/named/hosts/slave/" class "IN"
dns_master_load: /var/named/hosts/slave/:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/hosts/slave/:1: I/O error
zone africabound.org/IN: loading from master file /var/named/hosts/slave/ failed: I/O error
zone africabound.org/IN: not loaded due to errors.

But it shouldn't be loading from a master file, should it?

bathory 12-03-2012 11:32 AM

Quote:

If I use:

$ named-checkzone -d -f text -o zone.txt africabound.org /var/named/hosts/slave/

I get:

oading "africabound.org" from "/var/named/hosts/slave/" class "IN"
dns_master_load: /var/named/hosts/slave/:1: isc_lex_gettoken() failed: I/O error
dns_master_load: /var/named/hosts/slave/:1: I/O error
zone africabound.org/IN: loading from master file /var/named/hosts/slave/ failed: I/O error
zone africabound.org/IN: not loaded due to errors.

But it shouldn't be loading from a master file, should it?
You need to use "-f raw" because the zone file is in raw format. The resulting zone.txt will be in the classic txt format (the default for previous versions of bind). For more details see the named-compilezone manpage.

Regards


All times are GMT -5. The time now is 07:03 PM.