0% found this document useful (0 votes)
116 views9 pages

CN PR 10

The document discusses various networking commands like ipconfig, ping, tracert, pathping, netstat and route. It provides the syntax and examples of using each command to understand basic TCP/IP utilities and networking.

Uploaded by

dkchauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views9 pages

CN PR 10

The document discusses various networking commands like ipconfig, ping, tracert, pathping, netstat and route. It provides the syntax and examples of using each command to understand basic TCP/IP utilities and networking.

Uploaded by

dkchauhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Practical No.

10
AIM: Run basic utilities and network commands: ipconfig, ping, tracert, netstat, pathping , route
Practical Outcome
a. Understand basic of TCP/IP utilities.
b. Understand networking commands

Network Command-line Utilities


These utilities must be run at the prompt of the Cmd.exe command interpreter. To open Command Prompt, click Start, click Run, type cmd, and then

click OK. Some command-line tools require the user to have administrator-level privileges on source and/or target computers.

 ipconfig
 ping
 tracert
 pathping
 netstat
 route

(1) IPCONFIG
This ipconfig command is used for finding the IP address and default gateway of your network. Displays all current TCP/IP network configuration

values and refreshes Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Used without parameters, ipconfig

displays the IP address, subnet mask, and default gateway for all adapters.

Syntax of ipconfig

ipconfig [/all]
[/renew [Adapter]]
[/release [Adapter]]
[/flushdns]
[/displaydns]
[/registerdns]
[/showclassid Adapter]
[/setclassid Adapter [ClassID]]

Examples of ipconfig

1) To display the basic TCP/IP configuration for all adapters, type:

ipconfig
2) To display the full TCP/IP configuration for all adapters, type:

ipconfig /all
3) To flush the DNS resolver cache when troubleshooting DNS name resolution problems, type:

ipconfig /flushdns
4) To display the DHCP class ID for all adapters with names that start with Local, type:

ipconfig /showclassid Local*


5) To set the DHCP class ID for the Local Area Connection adapter to TEST, type:

ipconfig / TEST
(2) PING
The ping (packet Internet groper) command is usually used as a simple way to verify that a computer can communicate over the network with another

computer or network device.

Ping command can be used to test both the computer name and the IP address of the computer.

Syntax of ping

ping [-t]
[-a]
[-n Count]
[-l Size]
[-f]
[-i TTL]
[-v TOS]
[-r Count]
[-s Count]
[{-j HostList | -k HostList}]
[-w Timeout]
[TargetName]

Examples of ping

The following example shows ping command output:

C:\>ping example.microsoft.com
Pinging example.microsoft.com [192.168.239.132] with 32 bytes of data:
Reply from 192.168.239.132: bytes=32 time=101ms TTL=124
Reply from 192.168.239.132: bytes=32 time=100ms TTL=124
Reply from 192.168.239.132: bytes=32 time=120ms TTL=124
Reply from 192.168.239.132: bytes=32 time=120ms TTL=124

1) To ping the destination 10.0.99.221 and resolve 10.0.99.221 to its host name, type:

ping -a 10.0.99.221
2) To ping the destination 10.0.99.221 with 10 Echo Request messages, each of which has a Data field of 1000 bytes, type:
ping -n 10 -l 1000 10.0.99.221
3) To ping the destination 10.0.99.221 and record the route for 4 hops, type:

ping -r 4 10.0.99.221
4) To ping the destination 10.0.99.221 and specify the loose source route of 10.12.0.1-10.29.3.1-10.1.44.1, type:

ping -j 10.12.0.1 10.29.3.1 10.1.44.1 10.0.99.221

(3) TRACERT
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. It will list all the routers it passes through until it reaches its destination, or fails to and is

discarded.

Used without parameters, tracert displays help

Syntax of tracert

tracert [-d]
[-h MaximumHops]
[-j HostList]
[-w Timeout]
[TargetName]
Examples of tracert

1) To trace the path to the host named corp7.microsoft.com, type:

tracert www.microsoft.com

2) To trace the path to the host named corp7.microsoft.com and prevent the resolution of each IP address to its name, type:

tracert -d www.microsoft.com

3) To trace the path to the host named corp7.microsoft.com and use the loose source route 10.12.0.1-10.29.3.1-10.1.44.1, type:

tracert -j 10.12.0.1 10.29.3.1 10.1.44.1 www.microsoft.com


(4) PATHPING
Provides information about network latency and network loss at intermediate hops between a source and destination. Pathping sends multiple Echo

Request messages to each router between a source and destination over a period of time and then computes results based on the packets returned from

each router.

Pathping performs the equivalent of the tracert command by identifying which routers are on the path. It then sends pings periodically to all of the

routers over a specified time period and computes statistics based on the number returned from each. Used without parameters, pathping displays

help.

Syntax of pathping

pathping [-n]
[-h MaximumHops]
[-g HostList]
[-p Period]
[-q NumQueries]
[-w Timeout]
[-T]
[-R]
[TargetName]

Examples of pathping

The following example shows pathping command output:

D:\>pathping -n www.gooogle.com
Tracing route to corp1 [10.54.1.196]

OUT PUT:
?
When pathping is run, the first results list the path. This is the same path that is shown using the tracert command. Next, a busy message is displayed for

approximately 90 seconds (the time varies by hop count). During this time, information is gathered from all routers previously listed and from the links

between them. At the end of this period, the test results are displayed.

(5) NETSTAT
Netstat is a common command line TCP/IP networking utility available in most
versions of Windows, Linux, UNIX and other operating systems. Netstat provides
information and statistics about protocols in use and current TCP/IP network
connections. Used without parameters, netstat displays active TCP connections.

Syntax of netstat

netstat [-a]
[-e]
[-n]
[-o]
[-p Protocol]
[-r]
[-s]
[Interval]

Examples of netstat

1) To display both the Ethernet statistics and the statistics for all protocols, type the following command:

netstat -e -s

2) To display the statistics for only the TCP and UDP protocols, type the following command:

netstat -s -p tcp udp

3) To display active TCP connections and the process IDs every 5 seconds, type the following command:

netstat -o 5
(6) ROUTE
What is the IP route command?
The ip route command can be used to add static routes in routing table. In the following
example we add network routing information for 25.25.25.0/24 network, to route it through
eth0 interface, as shown here: $ ip route add 25.25.25.0/24 dev eth0.

Manipulates network routing tables.

Syntax of route

ROUTE [-f] [-p] [-4|-6] command [destination]


[MASK netmask] [gateway] [METRIC metric] [IF interface]

-f Clears the routing tables of all gateway entries. If this is


used in conjunction with one of the commands, the tables are
cleared prior to running the command.

-p When used with the ADD command, makes a route persistent across
boots of the system. By default, routes are not preserved
when the system is restarted. Ignored for all other commands,
which always affect the appropriate persistent routes.

-4 Force using IPv4.

-6 Force using IPv6.

How do I find my IP route?


Use the Netstat ROUTE/-r command to display routes to the network. Verify
whether TCP/IP has a route to the destination.
Conclusion
1. Which command is used for identifying the MAC address of a system?
a) ipconfig
b) ifconfig
c) ping
d) getmac

ANS:
2. Which command helps to identify whether a given system is connected to a network?
a) ping
b) netstat
c) ipconfig
d) getmac

ANS:

3. Which of the following best describes what traceroute is?


a) It is the name of a tool used to determine the path of communication between
two computersApplication layer
b) It is how the distance between two cities is determined on a map.
c) It is a website that allows users to see how far away they are from a specified
computer.
d) It is a way for network administrators to send the details of their network
routers to other administrators.
ANS:

Practical related Quiz.

1. What is netstat?
…....................................................................................................................................
…...............................................................................................................................................
…..................................................................................................................................
…...............................................................................................................................................
…...........................................................................................................

2. What do you understand by ping command?


…...............................................................................................................................................
…...............................................................................................................................................
….......................................................................................................................
…...............................................................................................................................................
…...........................................................................................................

3. What is a use of pathping command?


............…...............................................................................................................................................
…...........................................................................................................
…...............................................................................................................................................
…...............................................................................................................................................
…...........................................................................................................
Assessment-Rubrics

Need
Rubrics Satisfactory Mark
Criteria Marks Good (2) Improvement
ID (1) Scored
(0)

RB1 Regularity 2 High (>70%) Moderate Poor (0-40%)


(40-70%)
RB2 Problem 2 Apt & Full Limited Very Less
Analysis Identification Identification Identification
of the of the of the Problem
Problem Problem
RB3 Development 2 Complete Incomplete Very Less
of the Solution for Solution for Solution for
Solution the Problem the Problem the Problem
RB4 Testing of the 2 Correct Partially Very less
Solution Solution as Correct correct
required Solution for solution for the
the problem
Problem
RB5 Mock viva test 2 All questions Delayed & Very few
responde partially questions
d correct answered
Correctly response correctly

Signature with Date


--------------

You might also like