Computer Network Experiment No3 0
Computer Network Experiment No3 0
Experiment No.- 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.
maximum value for count is 9, so use the tracert command instead if you're
interestedin viewing all the hops between two devices.
Use this option to report the time, in Internet Timestamp format, that each
-scount echorequest is received and echo reply is sent. The maximum value for
count is 4,
meaning that only the first four hops can be time stamped.
Specifying a timeout value when executing the ping command adjusts the amount
-wtimeout
of
time, in milliseconds, that ping waits for each reply. If you don't use the -w
option,the default timeout value of 4000 is used, which is 4 seconds.
-R This option tells the ping command to trace the round trip path.
-Ssrcaddr
Use this option to specify the source address.
-p Use this switch to ping a Hyper-V Network Virtualization provider address.
This forces the ping command to use IPv4 only but is only necessary if target
-4
is ahostname and not an IP address.
This forces the ping command to use IPv6 only but as with the -4option, is
-6
onlynecessary when pinging a hostname.
Target This is the destination you wish to ping, either an IP address or a hostname.
Use the help switch with the ping command to show detailed help about
/?
thecommand's several options.
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.
Guide Teacher: Ms. Bhawna Khullar
Name: Sonali Chaurasia Roll No: 2101330130128 IT-6th-A
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.
Guide Teacher: Ms. Bhawna Khullar
Name: Sonali Chaurasia Roll No: 2101330130128 IT-6th-A
Outputs: -
Example:
>> ipconfig
>> ipconfig/all
(3) tracert
command
Example:
>> tracert 192.168.0.18
>>tracert yahoo.com
>> netstat-n
Guide Teacher: Ms. Bhawna Khullar
Name: Sonali Chaurasia Roll No: 2101330130128 IT-6th-A
>> netstat-a
>> netstat-?
Example:
Result: -
All the required network commands are studied and successfully test the network connection
using ping command and use of ipconfig, netstat and tracert command provided by TCP/IP.