• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1103
  • Last Modified:

Can I send multiple DNS queries over one TCP connection?

I would like to know whether it is possible to send more than one DNS query over the same TCP connection.

I am aware that DNS queries usually go over UDP and TCP is used for large requests and zone transfers only, no need to point it out. I want to make a bunch of DNS request over the same TCP connection. Is this possible?

Answers to this specific question hopefully referring to RFC or other reputable sources are greatly appreciated.
0
gremwell
Asked:
gremwell
  • 2
1 Solution
 
wdurrettCommented:
Hi gremwell.

Can you please provide a little more information on what you are attempting to do?

0
 
Chris DentPowerShell DeveloperCommented:

In theory you can continue sending queries over a single session and the server should continue to answer them.

This behaviour is suggested in RFC 1035 section 4.2.2:

http://www.ietf.org/rfc/rfc1035.txt

I've never actually tried to send queries down the same connection, my resolver closes down the TCP connection as soon as it's had a response from the server.

Chris
0
 
gremwellAuthor Commented:
Chris, I really appreciate you taking care to answer to the specific question I have asked.

PS. Yes, I also have not manage to simulate it with resolvers. Even if I run 'dig' in batch mode ('-f' command line key) it reopens the connection to every request. I trust there are some Perl modules will help.

0
 
Chris DentPowerShell DeveloperCommented:
Fingers crossed then :)

As far as I know Net::DNS does the same thing (one TCP connection per query), but it's been a very long time since I looked at it.

Chris
0

Featured Post

Who's Defending Your Organization from Threats?

Protecting against advanced threats requires an IT dream team – a well-oiled machine of people and solutions working together to defend your organization. Download our resource kit today to learn more about the tools you need to build you IT Dream Team!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now