[go: up one dir, main page]

0% found this document useful (0 votes)
9 views15 pages

Week 4 Tools Utilities

The document provides an overview of various network utilities used for analyzing and troubleshooting internet connections, primarily focusing on Windows commands like IPCONFIG, PING, TRACEROUTE, and WHOIS. It explains how to use these commands to retrieve network configuration information, check connectivity, trace packet routes, and identify IP address ownership. Additionally, it mentions the necessity of administrative rights for certain commands and the availability of similar tools on Linux/Unix systems.

Uploaded by

nirzorshoot0
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)
9 views15 pages

Week 4 Tools Utilities

The document provides an overview of various network utilities used for analyzing and troubleshooting internet connections, primarily focusing on Windows commands like IPCONFIG, PING, TRACEROUTE, and WHOIS. It explains how to use these commands to retrieve network configuration information, check connectivity, trace packet routes, and identify IP address ownership. Additionally, it mentions the necessity of administrative rights for certain commands and the availability of similar tools on Linux/Unix systems.

Uploaded by

nirzorshoot0
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/ 15

Week 4: NetWork Utilities

Useful utilities and what they do


• In this section lets get familiar with some Internet tools (commands) for
analyzing and trouble-shooting connections.
• Most commands given in this section are available in Windows.
• For a command/utility only available on Linux/Unix, you need either a
account on our school’s server or you have a Linux system at
home/VirtualBox.

4/19/2025 Chao Gao (Dr), Principal Lecturer 2


IPCONFIG
• To get network configuration information of a host computer
• Every computer connected to the Internet has a specific configuration to
communicate with other computers. These include
• The computer name (hostname)
• IP address and mask
• Network driver setting
• Gateway and necessary Internet servers (incl. DNS)
• IPCONFIG is given by command line (Start→Run→Cmd).

4/19/2025 Chao Gao (Dr), Principal Lecturer 3


IPCONFIG: examples
U:\>ipconfig/?
U:\>ipconfig
USAGE:
Windows
ipconfig [/allcompartments] [/? | IP Configuration
/all |
/renew [adapter] | /release [adapter] |
/renew6 [adapter] | /release6 [adapter] |
Ethernet adapter
/flushdns Ethernet: | /registerdns |
| /displaydns
/showclassid adapter |
Media State .adapter
/setclassid . . . .[classid]
. . . . .| . : Media disconnected
Connection-specific
/showclassid6 adapter DNS| Suffix . : ad.puv.fi
/setclassid6 adapter [classid] ]
Ethernet adapter Ethernet 2:
where
adapter Connection-specific
Connection name DNS Suffix . : ad.puv.fi
(wildcard Link-local
characters IPv6* andAddress
? allowed, . . .see
. .examples)
: fe80::56bf:64ff:fe5b:1722%15
IPv4 Address. . . . . . . . . . . : 192.168.36.59
Options: Subnet Mask . . . . . . . . . . . : 255.255.254.0
/? Default
Display this helpGateway
message. . . . . . . . . : 192.168.37.254
/all Display full configuration information.
/release Release the IPv4 address for the specified adapter.
/release6 Release the IPv6 address for the specified adapter.
/renew Renew the IPv4 address for the specified adapter.
/renew6 Renew the IPv6 address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.
/showclassid6
4/19/2025 Displays all the IPv6
Chao DHCP
Gao (Dr), class
Principal IDs allowed for adapter.
Lecturer 4
/setclassid6 Modifies the IPv6 DHCP class id.
IPCONFIG: release/renew
• ALL option gives more details.
• RELEASE option dis-configurates the current settings.
• RENEW option re-configurates the computer.
• Both options need administrative right.

• Please find your PC's IP and convert it to 32-bit binary.

4/19/2025 Chao Gao (Dr), Principal Lecturer 5


PING
• Short for Packet Internet Groper, a utility to determine whether a specific
IP address is accessible. It works by sending a packet to the specified
address and waiting for a reply. PING is used primarily to troubleshoot
Internet connections and round-trip delays.
U:\>ping

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
[-4] [-6] target_name

Options:
-t Ping the specified host until stopped.
To see statistics and continue - type Control-Break;
To stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet (IPv4-only).
-i TTL Time To Live.
-v TOS Type Of Service (IPv4-only. This setting has been deprecated
and has no effect on the type of service field in the IP
Header).
… //rest of output is cutoff

4/19/2025 Chao Gao (Dr), Principal Lecturer 6


Basic use of PING
• You need to give a destination address when using ping.
• The destination address can be given as host name as well.

U:\>ping 193.166.140.104

Pinging 193.166.140.104 with 32 bytes of data:


Reply from 193.166.140.104: bytes=32 time<1ms TTL=63
Reply from 193.166.140.104: bytes=32 time<1ms TTL=63
Reply from 193.166.140.104: bytes=32 time<1ms TTL=63
Reply from 193.166.140.104: bytes=32 time<1ms TTL=63

Ping statistics for 193.166.140.104:


U:\>ping shell.vamk.fi
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Pinging shell.vamk.fi [193.166.140.104] with 32 bytes of data:
Minimum = 0ms, Maximum = 0ms, Reply
Average = 0ms
from 193.166.140.104: bytes=32 time<1ms TTL=63
Reply from 193.166.140.104: bytes=32 time<1ms TTL=63
Reply from 193.166.140.104: bytes=32 time<1ms TTL=63
Reply from 193.166.140.104: bytes=32 time<1ms TTL=63

Ping statistics for 193.166.140.104:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

4/19/2025 Chao Gao (Dr), Principal Lecturer 7


PING (cont.)
• There are a group of options associated with PING, for example, when
option -t is used, PING will send packages continuously until a break
command (CTRL+C) is given; if –a switches is used, PING will get the
domain name of specified IP host computer.
• PING can be used to check communication delay between your and
remote host. Take the output of previous examples, it gives the length of
package (default is 32 bytes), time to get the reply (denoted as round-
trip-time RTT), and time-to-live (TTL) of packages.

4/19/2025 Chao Gao (Dr), Principal Lecturer 8


TRACEROUTE
• It traces a packet from your computer to an Internet host, showing how
many hops (routers) the packet requires to reach the host and how long
(time) each hop takes. You can use this command to figure out where the
longest delays are occurring.
• On Unix and Linux, the utility name is "traceroute". Windows has the
same utility called "tracert".
U:\>tracert

Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout]


[-R] [-S srcaddr] [-4] [-6] target_name

Options:
-d Do not resolve addresses to hostnames.
-h maximum_hops Maximum number of hops to search for target.
-j host-list Loose source route along host-list (IPv4-only).
-w timeout Wait timeout milliseconds for each reply.
U:\>tracert shell.vamk.fi -R Trace round-trip path (IPv6-only).
-S srcaddr Source address to use (IPv6-only).
Tracing route to shell.vamk.fi-4[193.166.140.104] Force using IPv4.
over a maximum of 30 hops: -6 Force using IPv6.

1 <1 ms <1 ms <1 ms ifw.cc.puv.fi [192.168.37.254]


2 1 ms <1 ms <1 ms shell.vamk.fi [193.166.140.104]
4/19/2025 Chao Gao (Dr), Principal Lecturer 9
Trace complete.
Tracerouting to a remote host
U:\>tracert www.vnexpress.vn

Tracing route to vnexpress.net [111.65.250.2]


over a maximum of 30 hops:

1 <1 ms <1 ms <1 ms ifw.cc.puv.fi [192.168.37.254]


2 <1 ms <1 ms <1 ms efw.cc.puv.fi [193.166.141.17]
3 1 ms <1 ms <1 ms uva-r1.cc.puv.fi [193.166.141.2]
4 1 ms <1 ms <1 ms vaasa1-xe-0-0-0-0-1.ip.funet.fi [193.167.253.72]
5 7 ms 7 ms 6 ms vaasa2.ip.funet.fi [86.50.255.175]
6 7 ms 7 ms 7 ms pori2.ip.funet.fi [86.50.255.202]
7 7 ms 8 ms 10 ms pori1.ip.funet.fi [86.50.255.206]
8 7 ms 7 ms 7 ms rauma1.ip.funet.fi [86.50.255.208]
9 7 ms 7 ms 7 ms turku2.ip.funet.fi [86.50.255.210]
10 7 ms 8 ms 7 ms turku1.ip.funet.fi [86.50.255.196]
11 7 ms 6 ms 34 ms espoo1.ip.funet.fi [86.50.255.200]
12 9 ms 7 ms 7 ms fi-csc2.nordu.net [109.105.102.168]
13 11 ms 11 ms 11 ms se-sthb.nordu.net [109.105.97.93]
14 11 ms 11 ms 11 ms 109.105.101.1
15 11 ms 11 ms 11 ms ndn-gw2.vodafone.com [109.105.98.101]
16 200 ms 200 ms 200 ms ae6-pcr1.fis.cw.net [195.2.18.86]
17 201 ms 201 ms 201 ms ae0-xcr1.mld.cw.net [195.2.20.209]
18 200 ms 200 ms 200 ms ae28-xcr1.hkg.cw.net [195.2.16.241]
19 200 ms 200 ms 200 ms ae0-xcr1.hke.cw.net [195.2.10.98]
20 200 ms 200 ms 200 ms ftp-gw.hke.cw.net [213.185.219.66]
21 217 ms 217 ms 233 ms 118.69.131.130
22 242 ms * 242 ms 118.69.131.133
23 243 ms 243 ms 243 ms 42.112.0.226
24 243 ms 243 ms 243 ms 42.118.36.6
25 * * * Request timed out.
26 * * * Request timed out.
27 243 ms 243 ms 243 ms 111.65.250.2
4/19/2025 Chao Gao (Dr), Principal Lecturer 10
Location of IP Address
• IP addresses are managed by an international association called IANA
(Internet Assigned Number Authority). An organization/company needs
to apply for a block (a class) of IP addresses for its network. All the
allocated IP addresses are stored in a database and available on the
Internet.
• There are many websites that can tell you the location of an IP address
(more precisely, the owner). For example, https://www.iplocation.net/.

4/19/2025 Chao Gao (Dr), Principal Lecturer 11


IP Possessor: whois
[15:30][gc@shell:~]$ whois 193.166.140.1
% This is the RIPE Whois query server #1.
• "whois" is a Unix/Linux utility, % The objects are in RPSL format.
%
which lets you to find out the % Rights restricted by copyright.
% See http://www.ripe.net/db/copyright.html
owner of an IP address. % Note: This output has been filtered.
% To receive output for a database update, use the "-B"
flag.
• There is also a website
% Information related to '193.166.140.0 - 193.166.143.255'
"who.is" which can give you
inetnum: 193.166.140.0 - 193.166.143.255
similar result. netname: VITECH-NET
descr: Vaasa Institute of Technology
country: FI
admin-c: PR538-RIPE

person: Timo E. Pitkaranta
address: Vaasa Polytechnic
address: Wolffintie 30
address: FIN-65200 VAASA
address: Finland
phone: +358 40 5818832
fax-no: +358 6 3263112
e-mail: timo.pitkaranta@puv.fi
nic-hdl: TEP2-RIPE
source: RIPE # Filtered

% Information related to '193.166.0.0/15AS1741'

route: 193.166.0.0/15
descr: FUNET-BLOCK
origin: AS1741
4/19/2025 mnt-by: AS1741-MNT
Chao Gao (Dr), Principal Lecturer 12
source: RIPE # Filtered
HOSTNAME
• Hostname command is very simple. It gives the hostname of your
computer, which is the same as displayed when using “IPCONFIG/ALL”
command.

C:\Documents and Settings\gao.chao>hostname


W30_C016_GAO2

4/19/2025 Chao Gao (Dr), Principal Lecturer 13


NETSTAT
• The NETSTAT utility displays active network connections of your device:
• Foreign Address - The IP address (or hostname) and port number of the
foreign computer to which port number is connected.
• Local Address - The IP address (or hostname) of the local computer, and the
port number the connection is using
• Proto - The name of the protocol used by the connection. Generally, it is TCP.
U:\>netstat

Active Connections

Proto Local Address Foreign Address State

TCP 192.168.36.59:8194 WA3030-GC-L1:60742 ESTABLISHED


TCP 192.168.36.59:8194 WA3030-GC-L1:60746 ESTABLISHED
TCP 192.168.36.59:8194 sophos:64430 ESTABLISHED
TCP 192.168.36.59:50997 198.251.175.241:https ESTABLISHED
TCP 192.168.36.59:52534 a2-23-144-228:https ESTABLISHED
TCP 192.168.36.59:52575 139:https ESTABLISHED
TCP 192.168.36.59:52589 a2-23-145-47:https ESTABLISHED
TCP 192.168.36.59:52597 35:https TIME_WAIT
TCP 192.168.36.59:52601 35:https TIME_WAIT
TCP 192.168.36.59:52603 104.16.173.188:https ESTABLISHED
TCP 192.168.36.59:52673 134.224.191.37:https CLOSE_WAIT

4/19/2025 Chao Gao (Dr), Principal Lecturer 15


Other network-related commands
• It is better to know some more Linux/Unix commands/utilities.
• wget: download a file from a URL.
• scp: securely copy a file from/to a remote system
• curl: transfer data using various network protocols
• dig: query DNS related information
• For more detailed information, see: https://www.javatpoint.com/linux-
networking-commands

4/19/2025 Chao Gao (Dr), Principal Lecturer 17

You might also like