Experiment No 3
Experiment No 3
- 3
AIM- Test the network connection using ping command and using ipconfig, netstat and trcert
command provided by TCP/IP.
The ping command is a Command Prompt command used to test the ability of the source computer
to reach a specified destination computer. The ping command is usually used as a simple way to
verify that a computer can communicate over the network with another computer or network
device.
The ping command operates by sending Internet Control Message Protocol (ICMP) Echo
Request messages to the destination computer and waiting for a response. How many of those
responses are returned, and how long it takes for them to return, are the two major pieces of
information that the ping command provides.
For example, you might find that there are no responses when pinging a network printer, only to
find out that the printer is offline and its cable needs replaced. Or maybe you need to ping a router
to verify that your computer can connect to it, to eliminate it as a possible cause for a networking
issue.
ping 127.0.01
In the above example, we're pinging 127.0.0.1, also called the IPv4 localhost IP address or IPv4
loopback IP address, without options.
Using the ping command to ping 127.0.0.1 is an excellent way to test that Windows' network
features are working properly but it says nothing about your own network hardware or your
connection to any other computer or device. The IPv6 version of this test would be ping::1.
There are also a variety of switches for ipconfig that add functions. These are invoked by entering
"ipconfig /{switch}". To obtain a list of switches, enter "ipconfig /?" or "ipconfig -?".
For a detailed output of network parameters, use the command "ipconfig /all". Unless you are
experienced with networks, however, this may be more than we want to know.
At the command prompt, type: tracert xxx Where xxx is the IP address or URL of the machine
that we are trying to connect to.
Here is the result of tracert from college computer to yahoo.com ( DNS has resolved the name
“yahoo.com” to 129.64.99.33)
nslookup google.com:
nslookup followed by the domain name will display the “A Record” (IP Address) of the domain.
Use this command to find the address record for a domain. It queries to domain name servers and
get the details.
nslookup 192.168.0.10:
Reverse DNS lookup you can also do the reverse DNS look-up by providing the IP Address as
argument to nslookup.
Lookup for any record we can also view all the available DNS records using- type=any option.
Lookup for an soa record SOA record (start of authority), provides the authoritative information
about the domain, the e-mail address of the domain admin, the domain serial number, etc
Lookup for an ns record NS (Name Server) record maps a domain name to a list of DNS servers
authoritative for that domain. It will output the name serves which are associated with the given
domain.
Lookup for an a record We can also view all the available DNS records for a particular record
using -type=a option.
Lookup for an mx record MX (Mail Exchange) record maps a domain name to a list of mail
exchange servers for that domain. The MX record tells that all the mails sent to “google.com”
should be routed to the Mail server in that domain.
Lookup for an txt record TXT records are useful for multiple types of records like DKIM, SPF,
etc. You can find all TXT records configured for any domain using below command.
Outputs: -
(1) ping
command
Example:
>> ipconfig
>> ipconfig/all
(3) tracert
comman
Example
>>tracert yahoo.com
(4) netstat command
>> netstat-n
>> netstat-a
>> netstat-?
(5) nslookup
command
Example:
>> nslookup
niet.co.in
Result: -
All the required network commands are studied and successfully test the network
connectionusing ping command and use of ipconfig, netstat and tracert command provided
by TCP/IP.