0% found this document useful (0 votes)
80 views

Name: Shruti Kitukale Sec/semester:A-5 Course Name: Computer Networks Lab Roll No: 25 Enroll No.:19010243

This document discusses using network utility commands like ping, ipconfig, netstat, and tracert to observe network details. It provides explanations of each command and examples of how to use them. Ping is used to verify IP connectivity between hosts. Ipconfig displays TCP/IP network configuration and allows renewing or releasing IP addresses. Netstat shows network connections, routing tables, and interface statistics. Tracert shows the path and hop times to a destination host. The conclusion states this practical examines using these commands to observe network details.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Name: Shruti Kitukale Sec/semester:A-5 Course Name: Computer Networks Lab Roll No: 25 Enroll No.:19010243

This document discusses using network utility commands like ping, ipconfig, netstat, and tracert to observe network details. It provides explanations of each command and examples of how to use them. Ping is used to verify IP connectivity between hosts. Ipconfig displays TCP/IP network configuration and allows renewing or releasing IP addresses. Netstat shows network connections, routing tables, and interface statistics. Tracert shows the path and hop times to a destination host. The conclusion states this practical examines using these commands to observe network details.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Name: Shruti Kitukale Sec/semester:A-5

Course Name: Computer Networks lab Roll no: 25


Enroll No.:19010243

PRACTICAL NO 2
Aim: Use Network Utility Command like ping, ipconfig, netstat, tracert to
observe the network details.
Theory:
1. Ping: The ping command helps to verify IP-level connectivity. When
troubleshooting, you can use ping to send an ICMP echo request to a target host
name or IP address. Use ping whenever you need to verify that a host computer
can connect to the TCP/IP network and network resources. You can also use ping
to isolate network hardware problems and incompatible configurations. It is
usually best to verify that a route exists between the local computer and a network
host by first using the ping command and the IP address of the network host to
which you want to connect. Try pinging the IP address of the target host to see if
it responds, as follows:
Ping IP_address
You should perform the following steps when using ping:
1. Ping the loopback address to verify that TCP/IP is installed and configured correctly on
the local computer.
ping 127.0.0.1
2. Ping the IP address of the local computer to verify that it was added to the network
correctly.
ping IP_address_of_local_host
3. Ping the IP address of the default gateway to verify that the default gateway is
functioning and that you can communicate with a local host on the local network.
ping IP_address_of_default_gateway
4. Ping the IP address of a remote host to verify that you can communicate through a
router.
ping IP_address_of_remote_host
The ping command uses Windows Sockets–style name resolution to resolve a computer
name to an IP address, so if pinging by address succeeds, but pinging by name fails, then
the problem lies in address or name resolution, not network connectivity.
If you cannot use ping successfully at any point, confirm that:

 The computer was restarted after TCP/IP was installed and configured.
 The IP address of the local computer is valid and appears correctly on the General
tab of the Internet Protocol (TCP/IP) Properties dialog box.
 IP routing is enabled and the link between routers is operational.
2. Ipconfig: Ipconfig (short for interface configuration) is a system administration
utility in Unix-like operating systems to configure, control, and query TCP/IP
network interface parameters from a command line interface (CLI) or in system
configuration scripts. Ifconfig originally appeared in 4.2BSD as part of the BSD
TCP/IP suite. To run the Ipconfig.exe utility, at a command prompt, type ipconfig,
and then add any appropriate option.
SYNTAX

ipconfig [/? | /all | /renew adapter | /release adapter | /flushdns | /displaydns |


/registerdns | /showclassid adapter | /setclassid adapter classid
The adapter connection name can use wildcard characters (* and ?).
OPTIONS

 /? Displays this help message


 /all Displays full configuration information
 /release Releases the IP address for the specified adapter
 /renew Renews the IP address for the specified adapter
 /flushdns Purges the DNS Resolver cache
 /registerdns Refreshes all DHCP leases and reregisters DNS names
 /displaydns Displays the contents of the DNS Resolver Cache
 /showclassid Displays all the DHCP ClassIds allowed for the specified adapter
 /setclassid Modifies the DHCP ClassId
The default (with no parameters specified) is to display only the IP address, subnet mask,
and default gateway for each adapter that is bound to TCP/IP. For /all, Ipconfig displays
all of the current TCP/IP configuration values, including the IP address, subnet mask,
default gateway, and Windows Internet Naming Service (WINS) and DNS configuration.
For /release and /renew, if no adapter name is specified, the IP address leases for all
adapters that are bound to TCP/IP are released or renewed. For /setclassid, if no ClassId
is specified, the ClassId is removed.
Snapshot of the following ipconfig commands:
3. NETSTAT: Netstat (network statistics) is a command-line tool that displays network
connections (both incoming and outgoing), routing tables, and a number of
network interface statistics. It is available on Unix, Unix-like, and Windows NT-
based operating systems. It is used for finding problems in the network and to
determine the amount of traffic on the network as a performance measurement.
Parameters used with this command must be prefixed with a hyphen (-) rather
than a slash (/).
 -a: Displays all active connections and the TCP and UDP ports on which the
computer is listening.
 -b: Displays the binary (executable) program's name involved in creating each
connection or listening port. (Windows XP, 2003 Server and newer Windows
operating systems (not Microsoft Windows 2000 or other non-Windows operating
systems)) On Mac OS X when combined with.
 -i: the total number of bytes of traffic will be reported.
 -e: Displays ethernet statistics, such as the number of bytes and packets sent and
received. This parameter can be combined with -s.
 -f Windows: Displays fully qualified domain names <FQDN> for foreign addresses
(only available on Windows Vista and newer operating systems).
 -f FreeBSDAddress: Family Limits display to a particular socket address family, unix,
inet, inet6
 -g: Displays multicast group membership information for both IPv4 and IPv6 (may
only be available on newer operating systems)
 -i: Displays network interfaces and their statistics (not available under Windows)
 -m: Displays the STREAMS statistics.
Netstat provides statistics for the following:

 Proto - The name of the protocol (TCP or UDP).


 Local Address - The IP address of the local computer and the port number being
used. The name of the local computer that corresponds to the IP address and the
name of the port is shown unless the -n parameter is specified. If the port is not
yet established, the port number is shown as an asterisk (*).
 Foreign Address - The IP address and port number of the remote computer to
which the socket is connected. The names that corresponds to the IP address and
the port are shown unless the-n parameter is specified. If the port is not yet
established, the port number is shown as an asterisk (*).
 State - Indicates the state of a TCP connection. The possible states are as follows:
CLOSE_WAIT, CLOSED, ESTABLISHED, FIN_WAIT_1, FIN_WAIT_2, LAST_ACK,
LISTEN, SYN_RECEIVED, SYN_SEND, and TIME_WAIT. For more information about
the states of a TCP connection.

Examples
To display the statistics for only the TCP or UDP protocols, type one of the following
commands:- netstat -sp tcp
netstat -sp udp:- To display active TCP connections and the process IDs every 5
seconds, type the following command (On Microsoft Windows, works on XP and
2003 only, or Windows 2000 with hotfix):
netstat -o 5
Mac OS X version
netstat -w 5
To display active TCP connections and the process IDs using numerical form, type
the following command (On Microsoft Windows, works on XP and 2003 only, or
Windows 2000 with hotfix):
netstat –no
To display all ports open by a process with id pid
netstat -aop | grep "pid"

4. Trace route:
Trace route is a command which can show you the path a packet of information
takes from your computer to one you specify. It will list all the routers it passes
through until it reaches its destination, or fails to and is discarded. In addition to
this, it will tell you how long each 'hop' from router to router takes.
In Windows, select Start > Programs > Accessories > Command Prompt. This will
give you a window like the one below.
Conclusion: Thus in this practical we studied to use Network Utility Command like
ping, ipconfig, netstat, tracert to observe the network details.

You might also like