Re: DNS response record format?

From: Roger Abell [MVP] (mvpNoSpam_at_asu.edu)
Date: 07/17/04


Date: Fri, 16 Jul 2004 19:58:57 -0700

Use of updates would make sense if it were failover one was after,
but it seems to do the load distribution he mentioned updates
would be pretty unworkable/continuous.

-- 
Roger Abell
Microsoft MVP (Windows Server System: Security)
MCDBA,  MCSE W2k3+W2k+Nt4
"William Stacey [MVP]" <staceywREMOVE@mvps.org> wrote in message 
news:ezhzsJ0aEHA.3664@TK2MSFTNGP12.phx.gbl...
> Just another idea.  Instead of writing server code.  You could also just
> update the records on existing dns server. For example you can call 
> nsupdate
> in your program to update server RRs.  Next query will then see the new
> updates.  In c# you could call nsupdate like you would call "dir" or other
> dos program as a process.  Perl also has a DNS module that has update
> ability.  Using either of these methods, you get as creative as you need 
> as
> to how update order is figured out (i.e. cpu %, hits, machine down, etc.)
> Just remember that local client cache and intermediate dns server cache 
> will
> "wash" out most of your hard work unless you use a really low TTL - which
> also has a price.
>
> -- 
> William Stacey, MVP
>
> "Peter Steele" <psteele@z-force.com> wrote in message
> news:uW4nf3zaEHA.1048@tk2msftngp13.phx.gbl...
>> What language am I using? I'd *like* to use C# and a nice .NET class that
>> abstracts the whole thing, but it appears there is no such class.
>> Fortunately, I've dug up some existing C/C++ code that looks like it will
> do
>> the trick. It seems the DNS structure isn't exactly "user friendly." The
>> main reason I'm writing this is to implement a primitive load 
>> distribution
>> system. In my research I discovered the DNS RobinRobin flag that I made
>> another post about. It may very well be that we can use that, but I'll
> have
>> to see it in action to make sure it does what we want.
>>
>> Peter
>>
>> "William Stacey [MVP]" <staceywREMOVE@mvps.org> wrote in message
>> news:uToXfEvaEHA.1840@TK2MSFTNGP11.phx.gbl...
>> > As Roger said, 1034 and 1035 are the best recourses to get started.
> Like
>> > most things, putting together a simple request/reply is pretty straight
>> > forward, however things get really complicated quick if supporting
>> multiple
>> > RR types.  Then add resolver logic, local lookup logic, cache logic,
>> update
>> > logic, zones, nodes, rrsets, rr's, dnssec, etc, etc.  That said, doing
>> reply
>> > for one or two records without any recursive logic is pretty easy.  I
>> would
>> > start with RRs.
>> >
>> > I created an abstract RR class and derived all other RRs from it.  The
>> base
>> > class has ownerName, TTL, Type, Class, and RData string.  This is 
>> > common
>> > across all RRs.  Your derived classes will be specific to its type.  So
> an
>> A
>> > record will have a constructor that also takes an IPAddress, an NS
> record
>> > will have DName string, an SOA record will have many args, etc.  The
> first
>> > challenge you run into is parsing.  You need to parse the byte[] 
>> > request
>> > into sections and parse the request out of it.  That is ok.  You then
> need
>> > to see what record type is requested and parse the rdata bytes 
>> > correctly
>> for
>> > the type.  You also need to figure out name compression logic which is 
>> > a
>> bit
>> > tricky.  Domain names and domain labels can be scattered around the
>> request
>> > and the reply ( if your also doing a client resolver.)  Servers are
>> expected
>> > to do name compression for replies also.  Your server also needs to
> parse
>> > text records to build the internal Zone/RR memory structure.  Your RR
>> > classes also need to be able to parse their data types back into a
> byte[]
>> to
>> > build the reply.  This is all pretty easy to hard code for very simple
>> need,
>> > but to make it general and real-world requires a lot of work.  All this
>> only
>> > scratches the surface of what you will need to do if you take the blue
>> pill
>> > (or is that the red one?).   Good luck with your project.  hth.  BTW,
> what
>> > language will you be using?   Cheers.
>> >
>> > -- 
>> > William Stacey, MVP
>> >
>> > "Peter Steele" <psteele@z-force.com> wrote in message
>> > news:eYiq7vraEHA.1656@TK2MSFTNGP09.phx.gbl...
>> > > Can anyone point me to a good source, preferably with programming
>> > examples,
>> > > describing the format of a DNS response record. I need to write a
> simple
>> > DNS
>> > > server that is used to resolve just a few special names in our 
>> > > domain.
>> > I've
>> > > got the basic code infrastructure designed but what I'm having 
>> > > problem
>> > with
>> > > is how to create the response record. Any pointers would be
> appreciated.
>> > >
>> > >
>> >
>>
>>
> 


Relevant Pages

  • Re: DNS response record format?
    ... What language am I using? ... In my research I discovered the DNS RobinRobin flag that I made ... > into sections and parse the request out of it. ... >> server that is used to resolve just a few special names in our domain. ...
    (microsoft.public.windows.server.dns)
  • Re: Anyone Speak Swedish?
    ... Configuring a server for a DNS server can ... A person must type in the IP Address of a DNS ... 08:07:00 Request from 148.160.29.10 ignored - on block list. ... This technician had to search for our DNS server address. ...
    (alt.usage.english)
  • Re: RDNS "servfail"
    ... I have made that request of SBC. ... While I have told it to pass DNS ... If the requests were actually raching my server, ...
    (microsoft.public.windows.server.dns)
  • Re: DNS response record format?
    ... Instead of writing server code. ... update the records on existing dns server. ... >> into sections and parse the request out of it. ...
    (microsoft.public.windows.server.dns)
  • Re: DNS response record format?
    ... I created an abstract RR class and derived all other RRs from it. ... into sections and parse the request out of it. ... > server that is used to resolve just a few special names in our domain. ...
    (microsoft.public.windows.server.dns)