Networking Commands
1. PING
2. TRACERT
3. show ip route- to check the route of router
4. show mac-address-table- to check the mac
table of switch.
5. NETSTAT
6. IPCONFIG
7. NSLOOKUP
PING
PING IS : Packet Internet or Inter-Network Groper is a
basic Internet program that allows a user to test and
verify if a particular destination IP address exists and can
accept requests in computer network administration.
Internet Control Message Protocol (ICMP) is probably most
well known as the message protocol used for
the ping command. A ping command sends an ICMP
echo request to the target host. The target host
responds with an echo reply.
• C:\>ping [Link]
• Pinging [Link] with 32 bytes of data:
• Request timed out.
• Request timed out.
• Request timed out.
• Request timed out.
• Ping statistics for [Link]:
• Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
• C:\>ping [Link]
• Pinging [Link] with 32 bytes of data:
• Reply from [Link]: bytes=32 time=35ms TTL=125
• Reply from [Link]: bytes=32 time=13ms TTL=125
• Reply from [Link]: bytes=32 time=20ms TTL=125
• Reply from [Link]: bytes=32 time=5ms TTL=125
• Ping statistics for [Link]:
• Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
• Approximate round trip times in milli-seconds:
• Minimum = 5ms, Maximum = 35ms, Average = 18ms
TRACERT /TRACE ROUTE
• The traceroute command on a Cisco device or in
network can be used to identify the path used
by a packet to reach its target.
• It identifies all the routers in the path from the
source host to destination host and it can be
useful when troubleshooting network problems.
• Using this command you can figure out which
router in the path to an unreachable target
should be examined more closely as the
probable cause of the network’s failure.
Example
• C:\>tracert [Link]
• Tracing route to [Link] over a
maximum of 30 hops:
1 0 ms 0 ms 3 ms [Link]
• 2 1 ms 11 ms 0 ms [Link]
• 3 1 ms 13 ms 14 ms [Link]
• 4 23 ms 13 ms 12 ms [Link]
• Trace complete.
C:\Users>arp
Displays and modifies the IP-to-Physical address translation tables used by
address resolution protocol (ARP).
ARP -s inet_addr eth_addr [if_addr]
ARP -d inet_addr [if_addr]
ARP -a [inet_addr] [-N if_addr] [-v]
-a Displays current ARP entries by interrogating the current
protocol data. If inet_addr is specified, the IP and Physical
addresses for only the specified computer are displayed. If
more than one network interface uses ARP, entries for each ARP
table are displayed.
-g Same as -a.
-v Displays current ARP entries in verbose mode. All invalid
entries and entries on the loop-back interface will be shown.
inet_addr Specifies an internet address.
-N if_addr Displays the ARP entries for the network interface specified
by if_addr.
-d Deletes the host specified by inet_addr. inet_addr may be
wildcarded with * to delete all hosts.
-s Adds the host and associates the Internet address inet_addr
with the Physical address eth_addr. The Physical address is
given as 6 hexadecimal bytes separated by hyphens. The entry
is permanent.
eth_addr Specifies a physical address.
if_addr If present, this specifies the Internet address of the
interface whose address translation table should be modified.
If not present, the first applicable interface will be used.
Example:
> arp -s [Link] 00-aa-00-62-c6-09 .... Adds a static entry.
> arp -a .... Displays the arp table.
C:\Users>arp -a
Interface: [Link] --- 0x3
Internet Address Physical Address Type
[Link] 54-7c-69-01-e9-52 dynamic
[Link] e4-d5-3d-78-c2-b0 dynamic
[Link] 68-54-5a-a8-87-b1 dynamic
[Link] 78-0c-b8-62-69-f2 dynamic
[Link] 64-5a-04-61-8c-dc dynamic
[Link] 12-7a-ab-9a-81-81 dynamic
[Link] 94-08-53-3a-00-15 dynamic
[Link] 14-85-7f-06-93-3e dynamic
[Link] b8-81-98-b6-f7-60 dynamic
[Link] 5c-ea-1d-02-8d-39 dynamic
[Link] 10-60-4b-d9-76-c2 dynamic
[Link] 34-7d-f6-d2-53-20 dynamic
[Link] 64-bc-58-18-5d-8f dynamic
[Link] 80-2b-f9-65-fd-71 dynamic
[Link] 78-e4-00-0c-9b-77 dynamic
[Link] 10-3d-1c-cd-5a-2d dynamic
[Link] 5c-61-99-31-98-61 dynamic
[Link] 70-66-55-a6-0f-bd dynamic
[Link] dc-a2-66-1e-2c-5f dynamic
ARP COMMAND IN CISCO PACKET TRACER
• C:\>arp
• Cisco Packet Tracer PC ARP
• Display ARP entries: arp -a
• Clear ARP table: arp -d
• C:\>arp -a
• Internet Address Physical Address Type
• [Link] 00d0.9767.a17a dynamic
NETSTAT
• The netstat command, meaning network
statistics, is a Command Prompt command used
to display very detailed information about how
your computer is communicating with other
computers or network devices.
• Specifically, it can show details about individual
network connections, overall and protocol-
specific networking statistics, and much more,
all of which could help troubleshoot certain
kinds of networking issues.
C:\Users\dell>net stat
Active Connections
Proto Local Address Foreign Address State
TCP [Link]:51657 a23-215-196-10:https CLOSE_WAIT
TCP [Link]:51658 [Link]:http CLOSE_WAIT
TCP [Link]:52055 [Link]:https ESTABLISHED
TCP [Link]:52118 [Link]:https ESTABLISHED
TCP [Link]:52119 [Link]:https ESTABLISHED
TCP [Link]:53637 relay-30fbe9f1:http ESTABLISHED
TCP [Link]:53646 [Link]:https ESTABLISHED
TCP [Link]:54191 sf-in-f188:5228 ESTABLISHED
TCP [Link]:54311 del03s10-in-f3:https TIME_WAIT
TCP [Link]:54312 [Link]:http TIME_WAIT
TCP [Link]:54313 [Link]:http TIME_WAIT
TCP [Link]:54314 a-0001:https ESTABLISHED
TCP [Link]:54315 [Link]:https ESTABLISHED
TCP [Link]:54316 [Link]:https ESTABLISHED
TCP [Link]:54317 [Link]:https ESTABLISHED
TCP [Link]:54318 [Link]:https ESTABLISHED
C:\Users\dell>
N SL OO K UP
nslookup command is used for obtaining
server records.
Converting a domain name to its IP address
using the nslookup command is one of them.
One can also find IP address of any website’s
host machine.
Example of nslookup in Cisco Packet Tracer with DnS Server
• C:\>nslookup [Link]
• Server: [[Link]]
• Address: [Link]
• DNS request timed out.
• timeout was 15000 milli seconds.
• DNS request timed out.
• timeout was 15000 milli seconds.
• DNS request timed out.
• timeout was 15000 milli seconds.
• Server: [[Link]]
• Address: [Link]
• Non-authoritative answer:
• Name: [Link]
• Address: [Link]
Example of nslookup in cmd prompt
in windows
• C:\Users>nslookup [Link]
• Server: UnKnown
• Address: [Link]
• Non-authoritative answer:
• Name: [Link]
• Addresses: [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• C:\Users>nslookup [Link]
• Server: UnKnown
• Address: [Link]
• Non-authoritative answer:
• Name: [Link]
• Addresses: [Link]
• [Link]