How can I have uppercase letters in my domains (similar to Berkeley.EDU)

Solution 1:

As noted in (an obscure place in) NSD's documentation,

NSD normalizes names to lower case.

If you want your names to show up with mixed-case, preserving whatever you put in the zone file, you will need to use a different nameserver, such as BIND. It is, after all, the Berkeley Internet Name Daemon...

While it may be possible to hack the NSD source code to make it preserve case, you should be wary of doing this, as it may not be possible to predict what bugs or unintended consequences such a change might introduce, and your nameserver is one of the last places you want mysterious bugs showing up.

Solution 2:

It would appear that your DNS3 server is mangling (normalising) the records for which is it authoritative. Have a look at the source code http://www.nlnetlabs.nl/svn/nsd/trunk/dname.c in particular dname_make and DNAME_NORMALIZE which is just tolower. From http://www.nlnetlabs.nl/svn/nsd/trunk/dname.h

#if defined(NAMEDB_UPPERCASE) || defined(USE_NAMEDB_UPPERCASE)
#define DNAME_NORMALIZE        toupper
#else
#define DNAME_NORMALIZE        tolower
#endif

It should be fairly easy to pull the SVN repository make a change to dname.h recompile and then get what you want. Of course in doing this your on your own for support.


As Michael Hampton points out this function

const dname_type *
dname_make_from_packet(region_type *region, buffer_type *packet,
               int allow_pointers, int normalize)
{
    uint8_t buf[MAXDOMAINLEN + 1];
    if(!dname_make_wire_from_packet(buf, packet, allow_pointers))
        return 0;
    return dname_make(region, buf, normalize);
}

is called with a hard coded parameter or normalize so you'd need to track it down and fix that too.


Solution 3:

They just set that up in their reverse zone. When you traceroute.. it hits the IP then your resolver is asking what the reverse is for the ip.. it would be something like

$ORIGIN 0.32.128.in-addr.arpa.
65     IN      PTR     t1-3.inr-201-sut.Berkeley.EDU.