Subject: Simple question re. DNS label compression

From: Richard Johnson <[email-masked]>
Date: Wed, 9 Feb 2005 13:16:55 -0800

Simple question:  Can a DNS domain name, which is using label 
compression, have multiple levels of indirect pointers?  For example:

+---------------------------+
|  1   | "a"  |  4   | "t"  |
+---------------------------+
| "e"  | "s"  | "t"  |   3  |
+---------------------------+
| "c"  | "o"  | "m"  |   0  |
+---------------------------+
|  1   | "b"  | 0xc0 | 0x7  |
+---------------------------+
| "c"  | 0xc0 | 0xc  |   0  |
+---------------------------+

So, assuming I have coded this correctly:

1) the first label here is "a.test.com" in the the simple fashion.
2) the second label after it would be "b.com" following the "0xc007" 
indirect pointer
3) the third label after it would be "c.b.com" following first the 
"0xc00c" indirect pointer and then the "0xc007" indirect pointer.

Thanks for your time!

/raj

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/namedroppers/>

---

From: Richard Johnson <[email-masked]>
Date: Wed, 9 Feb 2005 14:12:07 -0800

I have a response already.  Apparently the answer is "yes".

Thanks everyone.

/raj

---

From: Peter Koch <[email-masked]>
Date: Wed, 09 Feb 2005 23:13:54 +0100

> compression, have multiple levels of indirect pointers?  For example:

this is correct per RFC 1035, 4.1.4. "Message compression":

	The compression scheme allows a domain name in a message to be
	represented as either:

	   - a sequence of labels ending in a zero octet

	   - a pointer

	   - a sequence of labels ending with a pointer

It can also be seen "in the wild":

> host -Y -t ns de.

de                  	NS	f.nic.de
;; 	01 66 03 6E 69 63 C0 0C                         ; .f.nic..        
de                  	NS	l.de.net
;; 	01 6C 02 64 65 03 6E 65 74 00                   ; .l.de.net.      
de                  	NS	s.de.net
;; 	01 73 C0 36                                     ; .s.6            
de                  	NS	z.nic.de
;; 	01 7A C0 22                                     ; .z."            
de                  	NS	a.nic.de
;; 	01 61 C0 22                                     ; .a."            
de                  	NS	c.de.net
;; 	01 63 C0 36                                     ; .c.6            

The first NS RR points back into the query section (C0 0C), the fourth points
back into the first (the "nic.de" part of "f.nic.de"), which then again
leads into the query section.

Please bear in mind that per RFC 3597 label compression cannot be applied
to domain names in the RDATA section of new RR types.

-Peter