Ping, DNS, and WHOIS: Monitoring your Network
Download
Report
Transcript Ping, DNS, and WHOIS: Monitoring your Network
Ping, DNS, and WHOIS:
Monitoring your Network
Defiana Arnaldy, M.Si
0818 0296 4763
[email protected]
Overview
•
•
•
•
•
Introduction
DNS
Ping
WMI
Conclusion
Introduction
• Network protocols are not just used to move data
from one point to another.
• Some protocols have specific purposes that help
keep Internet traffic flowing and make using the
network easier.
• These utility protocols may not be required for
every network application;
• however, because these are niche technologies,
many developers may not know how to
implement such features
DNS
• DNS operates on UDP port 53 and is described
in RFC 1010, RFC 1304, RFC 1035, and RFC
1183
• the most common use for DNS is to convert
domain names into IP addresses because
people find it difficult to remember strings of
numbers more than nine digits long
• DNS was developed to provide a system that
converts easily recognizable domain names
into IP addresses
• You can use DNS.GetHostByName to convert
a domain name () to an IP address ()
• The reverse of this action, converting an IP
address to a domain name, can be achieved
using IPHostEntry DNS.GetHostByAddress.
Implementing DNS MX
• Open a new project in Visual Studio .NET and
draw three textboxes named
– tbDNSServer
– tbDomain
– tbStatus
• the latter having multiline set to true
• Button named btnFind
• For the coding see your self at the ebook
Ping
• Ping or ICMP a protocol used to report
broken network connections or other routerlevel problems that end hosts might need to
know
• Many developers are familiar with the ping
utility, which can be used to determine if a
computer is switched on or not and how much
delay there is over the connection to it.
• This protocol can be implemented in .NET to
provide applications with the ability to check
quickly if a computer to which it needs to connect
is turned on.
• It is possible to send a ping by constructing it with
a raw socket; an example of this can be seen at
www.eggheadcafe.com/articles/20020209.asp.
• A simpler implementation is to use the ICMP DLL,
which is standard to all Windows platforms.
• For Coding, see your self at EBook
WHOIS
• WHOIS (“who is”) is a protocol that can be used
to query the registrant of a domain name.
• It runs on TCP port 43 and is described
definitively in RFC 954.
• This information includes the name and company
of the person who bought the domain name,
along with details of the DNS servers for that
domain and the operator(s) of those servers.
• Performing a WHOIS query with .NET is easy.
All that is required is to open a TCP connection
on port 43, send the domain name followed
by the new line character, and read back the
response until the connection closes.
• For coding, see for yourself at the EBook
Telnet
• Telnet could be used as a back end to a
remote configuration console for a UNIX
product, but beyond that, it would rarely be
used programmatically
• Telnet often used to debug servers and
investigate new TCPbased protocols because
all telnet clients provide the option to connect
on ports other than 23.
Other members of the TCP/IP suite
•
•
•
•
ARP Address resolution protocol
RIP Routing information protocol
OSPF Open shortest path first
BGP/EGP Border gateway protocol (BGP)
supersedes exterior gateway protocol
• SNMP Simple network management
protocol
• PPP Point-to-point protocol
WMI
• WMI,
or
Windows
Management
Instrumentation, is used within a Windows
intranet to provide a facility to perform simple
administrative tasks remotely
• One of the main uses of WMI is to extract
technical information about remote Windows
systems
• WMI is structured somewhat like a database
Reading WMI data
• WMI data may resemble a database
conceptually, but the System.Management
namespace, which encapsulates WMI, is
dissimilar to the data access namespaces.
• WMI uses a ManagementScope that is passed
the location of the remote computer in the
format \\<host name>\root\namespace and a
ConnectionOptions object that contains the
logon credentials (username and password).
Conclusion
• This chapter has dealt with a set of network protocols
that are not suited to moving bulk data among
machines, but are particularly valuable in adding
features and improving the performance of distributed
applications
• The chapter concluded with a look at a surprisingly
versatile Microsoft technology, WMI, which can pull
virtually every conceivable piece of technical
information from a remote computer over.
• WMI is an absolutely essential technology for internal
IT support.
The End …
• Question