Lab 05
Lab 05
Lab 05
5.2 Introduction
The Windows operating system contains numerous built-in, command line networking utilities
to troubleshoot network issues. However, there are 11 built-in networking tools that Windows
networking administrators should be familiar with. Windows System provides plenty of
networking commands to troubleshoot network issues by executing it in CMD (command
prompt or command console). At the end of this lab student must know the
● local loop address and its purpose
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. Ping is used to test whether one network host is
able to communicate with another. It is used detecting devices on network and troubleshooting
network problems. It will help to see the connection between your device and another device on
the network. If we receive a reply from the device then the device is working properly. We can
use this command with an IP address and hostname.
Ping Command Syntax: The simplest way to use ping is to specify the destination as the first
parameter:
Ping DESTINATION
where DESTINATION is the IP address or domain name of the computer to test connectivity
with.
ping www.google.com
ping 127.0.0.1
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 with this address 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.
Operating systems often allow administrator users to modify some of the above information as
well. The main command to view and edit the network interface information is ipconfig.
Ipconfig
Ipconfig / all
The tracert command is a Command Prompt command that's used to show several details
about the path that a packet takes from the computer or device you're on to whatever
destination you specify.
tracert [-d] [-h MaxHops] [-w TimeOut] [-4] [-6] target [/?]
Item Description
This option prevents tracert from resolving IP addresses to hostnames, often
-d
resulting in much faster results.
-h This tracert option specifies the maximum number of hops in the search for the
MaxHop target. If you do not specify MaxHops, and a target has not been found by 30
s hops, tracert will stop looking.
-w You can specify the time, in milliseconds, to allow each reply before timeout using
TimeOut this tracert option.
-4 This option forces tracert to use IPv4 only.
-6 This option forces tracert to use IPv6 only.
target This is the destination, either an IP address or hostname.
Tracert Command Examples:
tracert www.google.com
The net use command is a Command Prompt command that's used to connect to, remove,
and configure connections to shared resources, like mapped drives and network printers.
It's one of many net commands like net send, net time, net user, net view, etc.
Option Explanation
Execute the net use command alone to show detailed information about
net use
currently mapped drives and devices.
Use this option to specify the drive letter or printer port you want to map
the network resource to. For a shared folder on the network, specify a drive
letter from D: through Z:, and for a shared printer, LPT1: through LPT3:. Use
devicename
* instead of specifying devicename to automatically assign the next
available drive letter, starting with Z: and moving backward, for a mapped
drive.
\\ This specifies the name of the computer, computername, and the shared
In the following example, we used the net use command to connect to my media shared folder
on a computer named ace. The media folder will be mapped to the highest available drive
letter [*], which in our example happens to be w, but we don't want to continue mapping this
drive every time we log onto the computer [/persistent:no].
In this simple example of the net use command, we get a list of all the shared resources
currently in use under the user account that's currently logged in. In our example, the
result in Command Prompt shows "Z: \\server\shared folder\" since z: is the drive letter
that's connecting to shared folder on server.
Net use
The message "There are no entries in this list." will show if there aren't any connections
currently set up.
Unmap a Drive
v. Hostname command
The hostname command is used to show computer's host name and domain name. A host
name is a name that is assigned to a host (i.e., a computer connected to the network) that
uniquely identifies it on a network and thus allows it to be addressed without using its full IP
address. Domain names are user-friendly substitutes for numeric IP addresses.
The basic syntax for the hostname command is
hostname [options] [new_host_name]
hostname
vi. Getmac
Getmac is used to display the Media Access Control (MAC) addresses for each network
adapter in the computer. This tool is typically used in troubleshooting network issues.
C:\users\Nosheen> getmac
It stands for name server lookup. When we want to know the IP address of the domain,
we can use this command. If this command is run over and over, different IP addresses
will get for a website like google, yahoo, Flipkart because these domains have spread to
different machines.
C:\users\Nosheen> nslookup
It is used for network statics, diagnostics, and analysis. If we are managing a huge college
campus network, then this tool is useful because it provides an advanced aspect of the
network.
C:\users\Nosheen> netstat
By running this command, will show the number of active connections on the system. The
active connection is about port (TCP) is open and ready to accept the connection request.
ix. Arp
It stands for address resolution protocol. It will find the MAC address and hardware
address of the host from the IP address. The ARP command corresponds to the Address
Resolution Protocol. Although it is easy to think of network communications in terms of IP
addressing, packet delivery is ultimately dependent on the Media Access Control (MAC)
address of the device’s network adapter. This is where the Address Resolution Protocol
comes into play. Its job is to map IP addresses to MAC addresses.
Windows devices maintain an ARP cache, which contains the results of recent ARP
queries. You can see the contents of this cache by using the ARP -A command. If you are
having problems communicating with one specific host, you can append the remote host’s
IP address to the ARP -A command.
Arp -a
x. Route
IP networks use routing tables to direct packets from one subnet to another. The Windows
Route utility allows you to view the device’s routing tables. To do so, simply type Route
Print. The cool thing about the Route command is that it not only shows you the routing
table, it lets you make changes. Commands such as Route Add, Route Delete, and Route
Change allow you to make routing table modifications on an as needed basis.
Route print
If you need to know anything about the device you are using, be it details of the
processor used, the version of Windows you are operating on, or what the boot device is
configured as, you can find it all through the Windows GUI. But why would you want to
spend time doing that when you can run this simple command to see it all in one place?
This command will poll your device and display the most important information in a
clean, easy to read format.
systeminfo
i. pathping:
A better version of tracert that gives statics about packet lost and latency. The PathPing
tool is a utility that combines the best aspects of Tracert and Ping. Entering the PathPing
command followed by a host name initiates what looks like a somewhat standard Tracert
process. Once this process completes however, the tool takes 300 seconds (five minutes)
to gather statistics, and then reports latency and packet loss statistics that are more
detailed than those provided by Ping or Tracert
Pathping
Q1. View the configuration details, including addresses, of your computers network
interfaces.
Q2. Test the network connectivity between your computer and several other computers:
another PC in the lab.
Q3. Using one of the publicly available websites for ping/traceroute, test the connectivity
to several external websites.
Q5 Find the IP addresses of several web servers (domains) using more than one method.
Q.7. Find the hardware address of another computer in the lab using ARP.
Q.8. View the active TCP connections that your computer has, especially after you visited a
website. netstat