Query DNS

I would like to query the DNS server for the MX record.  In other words I would like know the mail server IP address in a domain. Some sample code please...
LVL 1
vasu_iAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkrCommented:
Which OS?
0
vasu_iAuthor Commented:
Both Win 95 and Win NT
0
SunBowCommented:
Which O/S for DNS, NT also?
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

vasu_iAuthor Commented:
An unknown host for DNS. I want to write a program which will make a zone transfer from a given domain which includes all the entries in that domain.

for example i want to perform a zone transfer from microsoft.com or cnet.com

thanx for the support
0
vasu_iAuthor Commented:
no response. thanx
0
vasu_iAuthor Commented:
This question has a deletion request Pending
0
SunBowCommented:
This question no longer is pending deletion
0
SunBowCommented:
Sad,
I'd like to see answer myself.
I do not object to the delete request, but hope it gets reposted, perhaps in unix/linux networking or TCP/IP area. Enquiring minds want to know.

You can surf and find both code and shareware and freeware that may purport to satisfy you original question.  I have seen some work and some not.  I think/suspect it is mfr dependant.

For your subsequent 'i want to perform a zone transfer', again, I suspect this is beyond our scope.  The folk you want to transfer from 'should' be allowed to only transfer to people they 'like', servers they 'trust', meaning they need to control their own resources, and not quickly give you permission to tie them up with needless work.  I hope you know what I mean.  If you want resources from Microsoft, you should ask.

For DNS lookups, I've seen these work and not work, and, perhaps like you, I'd like to know the difference, like why?   Perhaps it all works better if everyone runs unix, perhaps vendors add incompatibility tweaks. That's why I'd like the comments to continue.

But, as they dried up here, I can understand your desire to move on.

'Luck
0
vasu_iAuthor Commented:
SunBow,

I didn't understand what you tried to tell. Before that, thanx for the interest that you have shown in my question. Why i gave the request for deleting this question is I didn't find any one showed interest in my question.

The reason could be like you said may be beyond our scope. Let me fight. I know how the systems operate using raw sockets with udp. I observed certain DNS querys while I am using the Network Monitoring Tools.

I thought some or the other might have some documentation. But, the situation is not like that. I am trying to browse through rfcs for these DNS querys. A DNS query is nothing but a zone transfer. I think i can get it with in 2 days. I posted this question around a week back. As i said there not much response. I will post this same question with an answer once again. Any way thanx for your support.

Vasu
0
SunBowCommented:
Right, I understand delete request, it looked rather boring.

I am not an expert on this topic, but I do have a part time interest in it to assist in viewing integrity of my corporate network, ie, not musch interest beyond the firewalls, real world networking. So pardon some of my misconceptions.

I have used network tools. I once had a windows tool to so pings and tracert's that was wuite flexible and had menu items for the various DNS records with which I am not all that familiar. Most either did not work or GPF'd (like the tool could be at fault - but I had heard that record availability may vary depending on plaftform). A former coworker had a tool that easily displayed the records, but I think it was vendor specific - the tool went with the server.

I may have misunderstood your 'transfer' to mean to gather the entire hierarchical table, or at least one of its zones.  That sounded time consuming (traffic).

There are a number of programs available to do similar 'monitoring' or queries, shareware and freeware, and some $$$$ that allow a temporary (time-expired) use of product for demo. Some containing source code, while most seem to want parts remaining as .dll's etc.

I intend to return to checking the 'net for further info and source this week, beginning with getting some access to Visual Studio to put things together.

I'd prefer another kind of networking topic to address issues like this (UDP, TCP, etc) rather than just by operating system. But for monitoring, I'd like to see all packets, not just UDP, to best get a handle on all that is on the wire, hopefully by category, even application some day.

I am not sure what you mean by "I will post this same question with an answer once again", if you have answer, I'd be happy to hear. I'll leave it now.

Perhaps I'll get opportunity to eXchange with you here again. Would be nice.

Deleting this one is fine by me.
0
clarkaCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SunBowCommented:
http://www.ostrosoft.com/products.html
--------------------------------------
       OstroSoft » Products  
   
OstroSoft Internet Tools 4(shareware; $29.00)
Integrated set of network (Internet) information utilities: domain scanner, port scanner, ping, traceroute, hostname lookup, netstat, local host info, a lot more...

OstroSoft LocalHost 1.0 (freeware)
Simplified set of network tools for network/Internet users

FormoEd 1.1 (shareware; $13.00)
Automates process of filling forms. Works with Internet forms as well as with desktop applications

OstroSoft GLAZ 1.0 (freeware)
Set of Internet-related watchers

SMTP control (free)
OCX for Visual Basic providing simple SMTP session

WhoIs control (free)
OCX for Visual Basic performing queries to WhoIs server

DNS control (free)
OCX for Visual Basic providing host name-to-address and address-to-name resolution
 
0
SunBowCommented:
(another webPage extract same site.  Main reason I have to nominate this site to you is that it includes working source code for you, by clcking the text, saving some typo processing and spelling lookUps).  Although it is VB and not VC, I think for your purpose the concept could be similar (extracting from and using the O/S)
--------------------------------------------
How to install:
Download, copy to Windows System directory, register from command-line: regsvr32 SMTP.ocx
If you have problems installing SMTP.ocx - download complete setup. If you'd like to compile it yourself or add more functionality, or just wonder how it works - source code is available on-line
Methods:
SMTP.Connect()
does it all: connects to server, sends message, closes connection

Events:
SMTP_ConnectSMTP()
occurs on connection to server

SMTP_SendSMTP()
occurs on successful e-mail send

SMTP_CloseSMTP()
occurs on closing the connection to server

SMTP_ErrorSMTP(ByVal Number As Long, Description As String)
occurs on error

Properties:
SMTP.Status
Returns status of control

SMTP.MailFrom
Returns/Sets sender e-mail address

SMTP.MessageSubject
Returns/Sets subject of message

SMTP.MessageText
Returns/Sets text of message

SMTP.SendTo
Returns/Sets recipient e-mail address

SMTP.Server
Returns/Sets SMTP server name or IP address
0
SunBowCommented:
You might also try
http://www.ipswitch.com/Products/WS_Ping/index.html
for, WsPing32 s/b available for trial and show you what the end result could look like.
==================================
"This is a network diagnostic tool that implements PING, Traceroute
  and DNS lookups specifically for Windows 95 and Windows NT.  It may
  work on Windows for Workgroups (Window 3.x) with some network stacks
  when Win32s is installed.
.....
LOOKUP is a tool that lets you query Internet domain servers for
  information about hosts and name servers.  You can use LOOKUP to
  query the name server for information about various hosts and
  domains."
0
SunBowCommented:
0
SunBowCommented:
done?
0
vasu_iAuthor Commented:
SunBow,
Thanx for your support.

Actually I am looking for some source code. But still It helped me.

Thanx.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.