Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I currently have 2001:1973:2303::/48 assigned to me and i'll be assigning /64's to customer's

I'd like to have 1 zonefile for the /48 where i can essentially point / redirect query to different nameservers.

Example ( Desired effect )

2001:1973:2303:1234::/64 -> ns1.example.com, ns2.example.com
2001:1973:2303:2345::/64 -> ns99.example2.com, ns100.example2.com
2001:1973:2303:4321::/64 -> ns1.cust1.com, ns2.cust1.com

Current /48 zonefile

$TTL 3h
$ORIGIN 3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.
@ IN SOA ns3.example.ca. ns4.example.ca. (
    2011071030 ; serial
    3h         ; refresh after 3 hours
    1h         ; retry after 1 hour
    1w         ; expire after 1 week
    1h )       ; negative caching TTL of 1 hour
        IN NS   ns3.example.ca.
        IN NS   ns4.example.ca.

1234 IN NS ns1.example.com.
    NS ns2.example.com.
2345 IN NS ns99.example2.com.
    NS ns100.example2.com.
4321 IN NS ns1.cust1.com.
    NS ns2.cust1.com.

Where am i going wrong ? My request seems simple to me atleast. To put it in terms of firewalling i want to redirect traffic

client queries 2001:1973:2303:4321::1 -> ns3.example.ca sees the request and redirects the query to ns1.cust1.com -> ns1.cust1.com answers the query with omg.itworks.ca ( provided ns1.cust1.com is properly configured.

share|improve this question

migrated from stackoverflow.com Sep 30 '12 at 12:26

This question came from our site for professional and enthusiast programmers.

    
please indicate if these replies answer your question, and let us know if you need more help. –  Sander Steffann Oct 2 '12 at 9:14

3 Answers 3

In you example you write the last part of the address as one number. In reverse DNS you have to write every single hexadecimal digit separately (and include leading zeroes where necessary.

To correct and expand your example:

$TTL 3h
$ORIGIN 3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.
@       IN SOA ns3.example.ca. ns4.example.ca. (
                 2011071030 ; serial
                 3h         ; refresh after 3 hours
                 1h         ; retry after 1 hour
                 1w         ; expire after 1 week
                 1h )       ; negative caching TTL of 1 hour
           NS   ns3.example.ca.
           NS   ns4.example.ca.

4.3.2.1 IN NS ns1.example.com.
           NS ns2.example.com.
5.4.3.2 IN NS ns99.example2.com.
           NS ns100.example2.com.
1.2.3.4 IN NS ns1.cust1.com.
           NS ns2.cust1.com.

; This would be for 2001:1973:2303:1::/64
1.0.0.0 IN NS ns1.example.org.
           NS ns2.example.org.

; This would be for 2001:1973:2303:10::/64
0.1.0.0 IN NS ns1.example.org.
           NS ns2.example.org.

; This would be for 2001:1973:2303:100::/64
0.0.1.0 IN NS ns1.example.org.
           NS ns2.example.org.

; This would be for 2001:1973:2303:1000::/64
0.0.0.1 IN NS ns1.example.org.
           NS ns2.example.org.

A very useful tool for determining the full reverse DNS name of an address is sipcalc:

$ sipcalc -r 2001:1973:2303:ab::cafe
-[ipv6 : 2001:1973:2303:ab::cafe] - 0

[IPV6 DNS]
Reverse DNS (ip6.arpa)  -
e.f.a.c.0.0.0.0.0.0.0.0.0.0.0.0.b.a.0.0.3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.

-
share|improve this answer
1  
Additional tool: ipv6calc –  Koos van den Hout Oct 1 '12 at 9:40
    
Koos: yes, also a very useful tool! –  Sander Steffann Oct 1 '12 at 16:34

Not really sure it will work ... but you could try writing the NS entries like:

4.3.2.1 IN NS ns1.example.com.
4.3.2.1 IN NS ns2.example.com.
5.4.3.2 IN NS ns99.example2.com.
5.4.3.2 IN NS ns100.example2.com.
1.2.3.4 IN NS ns1.cust1.com.
1.2.3.4 IN NS ns2.cust1.com.
share|improve this answer

Others have pointed out your basic mistake, but to be explicit:

In the zone file you provide, you are delegating:

1234.3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.

and not:

4.3.2.1.3.0.3.2.3.7.9.1.1.0.0.2.ip6.arpa.

As far as DNS is concerned that's a perfectly valid (but alas, completely useless) delegation, so no error will be flagged when you do that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.