Exp. 1- Networking Commands
Exp. 1- Networking Commands
Lab Outcome :- Execute and evaluate network administration commands and demonstrate
their use in different network scenarios.
Objectives :
To explains the basic networking commands and their arguments, options, and parameters.
To Learn the essential networking commands that are used to troubleshoot computer
networks.
Theory :
What is network?
A network consists of several computers connected together. The network can be as simple as
a few computers connected in your home or office, or as complicated as a large university
network or even the entire Internet. When your computer is part of a network, you have
access to those systems either directly or through services like mail and the web. Networking
is the practice of linking computing devices together with hardware and software that
supports data communications across these devices. There are a variety of networking
programs that you can use. Some are handy for performing diagnostics to see if everything is
working properly. Others (like mail readers and web browsers) are useful for getting your
work done and staying in contact with other people. What is networking commands? When
there is the need of transferring the data between one area to another area, there is some on
demand quires are form that quires called as networking commands through that two or more
computer connected together. What is use of networking command? By using these quires,
there is exchange in data very easily. In computer networks, networked computing devices
pass data to each other along data connections.
Tracert
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.
tracert www.google.co.in
The following image shows the output of this command.
Option Description
-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).
The following table lists some important options of the tracert command.
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.
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.
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 is mainly used to view the IP addresses on the computers that are configured
to obtain their IP address automatically.
Used without Displays the IP address, subnet mask, and default gateway for all
parameters adapters.
/all Displays the full TCP/IP configuration for all adapters.
The following table lists some important options of the ipconfig command.
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.
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.
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.
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, and IP protocols.
-r Displays the contents of the IP routing table.
● About
● Privacy Policy
● Terms and Conditions