0% found this document useful (0 votes)
17 views7 pages

Practical 3

The document provides an overview of essential network commands used for managing and troubleshooting computer networks, including 'tracert', 'ping', 'ipconfig', 'arp', and 'netstat'. Each command is explained with its syntax, functionality, and important options, emphasizing their roles in diagnosing connectivity issues and configuring network settings. Mastery of these commands is crucial for effective network administration and management.

Uploaded by

reviewyourpage
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)
17 views7 pages

Practical 3

The document provides an overview of essential network commands used for managing and troubleshooting computer networks, including 'tracert', 'ping', 'ipconfig', 'arp', and 'netstat'. Each command is explained with its syntax, functionality, and important options, emphasizing their roles in diagnosing connectivity issues and configuring network settings. Mastery of these commands is crucial for effective network administration and management.

Uploaded by

reviewyourpage
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/ 7

230761305001 Computer Network Practical-3

3. Study of basic Network command and Network


configuration commands.
Networking commands are essential tools for managing and troubleshooting computer networks.
From assessing connectivity with "ping" to configuring interfaces using "ifconfig" or "ipconfig,"
these commands provide crucial insights. Whether diagnosing issues, resolving DNS with
"nslookup," or securing connections with "ssh," mastering these tools is fundamental for effective
network administration.

1.Tracert:

This command is used to diagnose path-related problems. On an IP network, routers exchange IP


packets between the source and the destination. They take IP packets from the source host and
forward them in a sequence until they reach the destination host. The sequence of routers between
the source and destination is known as the path. A path consists of all routers in a sequence that IP
packets sent from the source host traverse to reach the destination host.

The tracert command prints the path. If all routers on the path are functional, this command prints
the full path. If a router is down on the path, this command prints the path up to the last operational
router.

The tracert command uses the following syntax.

tracert Destination Name or IP address

The following command traces the path to the host named www.google.co.in.

tracert www.google.co.in
The following image shows the output of this command.

The following table lists some important options of the tracert command.
230761305001 Computer Network Practical-3

Option Description
-d Do not resolve the IP addresses of intermediate routers to their names.
-h Specifies the maximum number of hops (routers) to search on the path. The default is 30 hops.
-w Specifies the amount of time in milliseconds to wait for a reply message from the router.
If not received within the time-out, an asterisk (*) is displayed. The default time-out is 4000
(4 seconds).

2.Ping:
The ping command is used to test connectivity between two hosts. It sends ICMP echo request
messages to the destination. The destination host replies with ICMP reply messages. If the ping
command gets a reply from the destination host, it displays the reply along with round-trip times.

The ping command uses the following syntax.

ping destination host IP or name

The following command tests connectivity between the host computer and Google's server.
ping google.com
The following image shows the output of this command.

If you specify the hostname as an argument, the ping command uses the configured DNS client
service to automatically translate the hostname into the IP address.

3.Ipconfig:
This command displays all current TCP/IP network configuration values and refreshes Dynamic
Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. This command
230761305001 Computer Network Practical-3

is mainly used to view the IP addresses on the computers that are configured to obtain their IP
address automatically.

The following image shows the sample output of this command.

The following table lists some important options of the ipconfig command.

Used without parameters Displays the IP address, subnet mask, and default gateway for all adapters.
/all Displays the full TCP/IP configuration for all adapters.
/renew [Adapter] Renews DHCP configuration for all adapters (if an adapter is not specified) or
for a specific adapter if the Adapter parameter is included.
/release [Adapter] Sends a DHCPRELEASE message to the DHCP server to release the current
DHCP configuration and discard the IP address configuration for either all
Adapters (if an adapter is not specified) or for a specific adapter if the Adapter
parameter is included.
/flushdns Flushes and resets the contents of the DNS client resolver cache.

4. Arp:
To send IP packets, a computer needs two addresses. These addresses are the MAC address and
the IP address. A MAC address is the physical or hardware address of the NIC. An IP address is
the logical or software address of NIC. If a computer knows the IP address of the destination
computer but it does not know the MAC address of the destination computer, it uses the ARP
protocol to know the MAC address of the destination computer.
230761305001 Computer Network Practical-3

The ARP protocol broadcasts a given IP address over a local network. The corresponding host
responds to the broadcast with its MAC address. To avoid repetition, ARP stores the answer in a
table known as ARP table. ARP maintains a separate ARP table for each NIC.

To view the ARP table, you can use the following command.

arp
By default, this command displays the ARP table of the active NIC. If multiple NICs are installed
on the computer, you can use the -a option with this command. If the -a option is used, the ARP
command displays all ARP tables.

The following image shows the output of the arp command when used with the -a option.

To display the ARP cache entry for a specific IP address, specify the IP address with the -N option.
For example, the following command displays the ARP cache table for the interface that is
assigned the IP address 192.168.42.171.

Arp -a -N 192.168.42.171
The following image shows the output of the above command.
230761305001 Computer Network Practical-3

5.Netstat:
This command displays active connections, ports on which the computer is listening, Ethernet
statistics, the IP routing table, and IP statistics.

The output of this command is organized in rows and columns. Each row represents a new
connection or an entry in the output. It contains four columns. These columns provide the
following information about the row.

Proto: - This column displays the name of the protocol (TCP or UDP).

Local Address: - This column displays the IP address of the local computer and the port number
being used. If the port is not yet established, the port number is shown as an asterisk (*).

Foreign Address: - This column displays the IP address and port number of the remote
computer to which the port is connected.

State: - This column displays the status of the connection.


The following image shows the sample output of this command.
230761305001 Computer Network Practical-3

Options and parameters:


The following table lists some common options of the netstat command.

Option Description

-a Displays all active TCP connections and the TCP and UDP ports on which the computer is
listening.

-e Displays Ethernet statistics, such as the number of bytes and packets sent and received.

-n Displays active TCP connections, however, addresses and port numbers are expressed
numerically and no attempt is made to determine names.

-o Displays active TCP connections and includes the process ID (PID) for each connection.

-p Shows connections for the protocol specified by Protocol. In this case, the Protocol can be
TCP, UDP, tcpv6, or udpv6.

-s Displays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP,
230761305001 Computer Network Practical-3

and IP protocols.

-r Displays the contents of the IP routing table.

Conclusion:
Network commands are essential for efficient network management and troubleshooting.
Understanding these commands enables users to configure and monitor networks effectively. To
enhance comprehension, refer to the suggested image keywords to visualize command outputs
and real-world scenarios.

You might also like