Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Computer Communication & Networks (SWE-306) SSUET/QR/114

LAB # 02
DIAGNOSTIC UTILITIES OF NETWORKS
OBJECTIVE

To learn about and practice some of the Diagnostic Utilities for use with computer networks.

THEORY

Following table gives the descriptions of different diagnostic Utilities.

Diagnostics Utility Functions


Ping The ping command verifies connections to
remote computer or computers, by sending
ICMP echo packets to the computer and listening
for echo reply packets.
IPCONFIG Verifies a TCP/IP configuration, including
DHCP, DNS, and WINS server addresses.
FINGER Retrieves system information from a remote
computer that supports the TCP/IP Finger
service.
NSLOOKUP Examines entries in the DNS database that
pertain to a particular host or domain.
HOSTNAME Returns the local computer’s hostname for
authentication.
NETSTAT Displays protocol statistics and the current state
of TCP/IP connections.
NBTSTAT Check the state of current NetBIOS over TCP/IP
connections, updates the LMHOSTS cache, or
determines your registered name &scope ID.
Route Views or modifies the local routing table
Tracert Verifies the route used from the local host to a
remote host.
Table 5.1 Diagnostic tools

Ping Objective
Verify connections to a remote computer or computers

Theory
The ping command verifies connections to remote computer or computers, by sending ICMP echo
packets to the computer and listening for echo reply packets. Ping waits for up to 1 second for each
packet sent and prints the number of packets transmitted and received. Each received packet is
validated against the transmitted message. By default, four echo packets containing 64 bytes of data
(a periodic uppercase sequence of alphabetic characters) are transmitted.
You can use the ping utility to test both the computer name and the IP address of the computer. If
the IP address is verified but the computer name is not, you may have a name resolution problem.
In this case, be sure that the computer name you are querying is in either the local HOSTS file or in
the DNS database. The Ping stands for Packet Internet Groper.
Computer Communication & Networks (SWE-306) SSUET/QR/114
LAB TASK:

Microsoft Windows [Version 10.0.19044.1288]

(c) Microsoft Corporation. All rights reserved.

C:\Users\se20-045>

C:\Users\se20-045>clear

'clear' is not recognized as an internal or external command,operable program or batch file.

C:\Users\se20-045>ls clear

'ls' is not recognized as an internal or external command,

operable program or batch file.

C:\Users\se20-045>ipconfig

Windows IP Configuration

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : ssuet.edu.pk

Link-local IPv6 Address . . . . . : fe80::343a:690c:279e:3ea8%5

IPv4 Address. . . . . . . . . . . : 172.16.16.185

Subnet Mask . . . . . . . . . . . : 255.255.252.0

Default Gateway . . . . . . . . . : 172.16.16.1

Ethernet adapter VirtualBox Host-Only Network:

Connection-specific DNS Suffix . :

Link-local IPv6 Address . . . . . : fe80::191a:b0d7:2cd2:75e6%12

IPv4 Address. . . . . . . . . . . : 192.168.56.1

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . :

Wireless LAN adapter Wi-Fi:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :

Wireless LAN adapter Local Area Connection* 1:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :


Computer Communication & Networks (SWE-306) SSUET/QR/114
Wireless LAN adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :

Ethernet adapter Bluetooth Network Connection:

Media State . . . . . . . . . . . :

of data:

Reply from 172.16.16.1: bytes Media disconnected

Connection-specific DNS Suffix . :

C:\Users\se20-045>ping 172.16.16.1

Pinging 172.16.16.1 with 32 bytes =32 time=2ms TTL=255

Reply from 172.16.16.1: bytes=32 time=2ms TTL=255

Reply from 172.16.16.1: bytes=32 time=2ms TTL=255

Reply from 172.16.16.1: bytes=32 time=1ms TTL=255

Ping statistics for 172.16.16.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 1ms, Maximum = 2ms, Average = 1ms

C:\Users\se20-045>ping aurangzeb

Pinging aurangzeb.ssuet.edu.pk [192.168.1.5] with 32 bytes of data:

Reply from 192.168.1.5: bytes=32 time<1ms TTL=127

Reply from 192.168.1.5: bytes=32 time<1ms TTL=127

Reply from 192.168.1.5: bytes=32 time<1ms TTL=127

Reply from 192.168.1.5: bytes=32 time<1ms TTL=127

Ping statistics for 192.168.1.5:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\se20-045>ping aurangzeb - t

Bad option -.
Computer Communication & Networks (SWE-306) SSUET/QR/114
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).

-r count Record route for count hops (IPv4-only).

-s count Timestamp for count hops (IPv4-only).

-j host-list Loose source route along host-list (IPv4-only).

-k host-list Strict source route along host-list (IPv4-only).

-w timeout Timeout in milliseconds to wait for each reply.

-R Use routing header to test reverse route also (IPv6-only).

Per RFC 5095 the use of this routing header has been

deprecated. Some systems may drop echo requests if

this header is used.

-S srcaddr Source address to use.

-c compartment Routing compartment identifier.

-p Ping a Hyper-V Network Virtualization provider address.

-4 Force using IPv4.


Computer Communication & Networks (SWE-306) SSUET/QR/114
-6 Force using IPv6.

C:\Users\se20-045>ipconfig/all

Windows IP Configuration

Host Name . . . . . . . . . . . . : DESKTOP-442SJSA

Primary Dns Suffix . . . . . . . : ssuet.edu.pk

Node Type . . . . . . . . . . . . : Hybrid

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No

DNS Suffix Search List. . . . . . : ssuet.edu.pk

Ethernet adapter Ethernet:

Connection-specific DNS Suffix . : ssuet.edu.pk

Description . . . . . . . . . . . : Intel(R) Ethernet Connection (11) I219-LM

Physical Address. . . . . . . . . : 00-68-EB-CA-7A-84

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

Link-local IPv6 Address . . . . . : fe80::343a:690c:279e:3ea8%5(Preferred)

IPv4 Address. . . . . . . . . . . : 172.16.16.185(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.252.0

Lease Obtained. . . . . . . . . . : Friday, 25 March 2022 9:23:56 am

Lease Expires . . . . . . . . . . : Friday, 25 March 2022 1:23:56 pm

Default Gateway . . . . . . . . . : 172.16.16.1

DHCP Server . . . . . . . . . . . : 192.168.1.13

DHCPv6 IAID . . . . . . . . . . . : 604006635

DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-56-51-08-00-68-EB-CA-7A-84

DNS Servers . . . . . . . . . . . : 192.168.1.3

192.168.1.7

192.168.1.13

NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter VirtualBox Host-Only Network:


Computer Communication & Networks (SWE-306) SSUET/QR/114
Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter

Physical Address. . . . . . . . . : 0A-00-27-00-00-0C

DHCP Enabled. . . . . . . . . . . : No

Autoconfiguration Enabled . . . . : Yes

Link-local IPv6 Address . . . . . : fe80::191a:b0d7:2cd2:75e6%12(Preferred)

IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . :

DHCPv6 IAID . . . . . . . . . . . : 688521255

DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-29-56-51-08-00-68-EB-CA-7A-84

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1

fec0:0:0:ffff::2%1

fec0:0:0:ffff::3%1

NetBIOS over Tcpip. . . . . . . . : Enabled

Wireless LAN adapter Wi-Fi:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Intel(R) Wi-Fi 6 AX201 160MHz

Physical Address. . . . . . . . . : F0-9E-4A-F6-13-41

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Local Area Connection* 1:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter

Physical Address. . . . . . . . . : F0-9E-4A-F6-13-42

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes


Computer Communication & Networks (SWE-306) SSUET/QR/114
Wireless LAN adapter Local Area Connection* 2:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2

Physical Address. . . . . . . . . : F2-9E-4A-F6-13-41

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

Ethernet adapter Bluetooth Network Connection:

Media State . . . . . . . . . . . : Media disconnected

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)

Physical Address. . . . . . . . . : F0-9E-4A-F6-13-45

DHCP Enabled. . . . . . . . . . . : Yes

Autoconfiguration Enabled . . . . : Yes

C:\Users\se20-045>hostname

DESKTOP-442SJSA

C:\Users\se20-045>netstat

Active Connections

Proto Local Address Foreign Address State

TCP 127.0.0.1:54102 DESKTOP-442SJSA:54103 ESTABLISHED

TCP 127.0.0.1:54103 DESKTOP-442SJSA:54102 ESTABLISHED

C:\Users\se20-045>tracert www.google.com

Tracing route to www.google.com [216.239.38.120]

over a maximum of 30 hops:

1 1 ms 2 ms 2 ms 172.16.16.1

2 * * * Request timed out.

3 ^C

C:\Users\se20-045>nslookup aurangzeb

Server: liaquat.ssuet.edu.pk
Computer Communication & Networks (SWE-306) SSUET/QR/114
Address: 192.168.1.3

Name: aurangzeb.ssuet.edu.pk

Address: 192.168.1.5

C:\Users\se20-045>

C:\Users\se20-045>
Computer Communication & Networks (SWE-306) SSUET/QR/114
HOME ASSIGNMENT
Q1: What is the basic purpose of using Networking Troubleshooting Tool?

In simple terms, network troubleshooting tools are standalone or integrated solutions that help
network administrators identify the root cause of a network issue in order to fix it.

Q2: How can we assign IP to our system statically using Command Prompt?

If you want to set a static IP address, run this command: netsh interface ip set address name=
"Network Interface Name" static [IP address] [Subnet Mask] [Gateway]. Replace [IP address]
[Subnet Mask] [Gateway] with the ones that match your network configuration.

Q3: Difference between Ping and Path Ping command

The main difference is that ping shows ICMP availability of the end point, which consist of the
availability of hops in the middle and health of the endpoint. While pathping shows you health of
the entire route. Show activity on this post. Ping shows the time it takes to get from you to the
destination.

Q5: What is the difference between DNS and DHCP ip address .Explain the role of default
gateway in network topology?

DHCP (Dynamic Host Configuration Protocol) and DNS (Domain Name System) both work across
the client-server architecture though they are different terms. While DNS maps the name of the
domain to the IP address, DHCP is a protocol that assigns the IP address to the host in a network
either dynamically or statically.

A default gateway makes it possible for devices in one network to communicate with devices in another
network. If a computer, for example, requests a web page, the request goes through the default gateway
before exiting the local network (LAN) to reach the internet

The default gateway is the path used to pass information when the device doesn't know where the destination
is. More directly, a default gateway is a router that connects your host to remote network segments. It's the
exit point for all the packets in your network that have destinations outside your network.

Q6: What is the main purpose of tracert command?

Traceroute – The traceroute command is used to determine the path between two connections. Often a
connection to another device will have to go through multiple routers.

The traceroute command will return the names or IP addresses of all the routers between two devices. This
also allows you to see where a packet may be misguided.

You might also like