Networking Commands

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

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
8.ARP
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 192.168.25.98

• Pinging 192.168.25.98 with 32 bytes of data:

• Request timed out.


• Request timed out.
• Request timed out.
• Request timed out.

• Ping statistics for 192.168.25.98:


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

• C:\>ping 192.168.25.98

• Pinging 192.168.25.98 with 32 bytes of data:

• Reply from 192.168.25.98: bytes=32 time=35ms TTL=125


• Reply from 192.168.25.98: bytes=32 time=13ms TTL=125
• Reply from 192.168.25.98: bytes=32 time=20ms TTL=125
• Reply from 192.168.25.98: bytes=32 time=5ms TTL=125

• Ping statistics for 192.168.25.98:


• 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 192.168.25.98
• Tracing route to 192.168.25.98 over a
maximum of 30 hops:
1 0 ms 0 ms 3 ms 192.168.25.1
• 2 1 ms 11 ms 0 ms 192.168.25.102
• 3 1 ms 13 ms 14 ms 192.168.25.106
• 4 23 ms 13 ms 12 ms 192.168.25.98

• 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 157.55.85.212 00-aa-00-62-c6-09 .... Adds a static entry.
> arp -a .... Displays the arp table.
C:\Users>arp -a

Interface: 172.21.192.134 --- 0x3


Internet Address Physical Address Type
172.21.192.1 54-7c-69-01-e9-52 dynamic
172.21.192.104 e4-d5-3d-78-c2-b0 dynamic
172.21.192.117 68-54-5a-a8-87-b1 dynamic
172.21.192.118 78-0c-b8-62-69-f2 dynamic
172.21.192.126 64-5a-04-61-8c-dc dynamic
172.21.192.131 12-7a-ab-9a-81-81 dynamic
172.21.192.140 94-08-53-3a-00-15 dynamic
172.21.192.149 14-85-7f-06-93-3e dynamic
172.21.192.163 b8-81-98-b6-f7-60 dynamic
172.21.192.168 5c-ea-1d-02-8d-39 dynamic
172.21.192.173 10-60-4b-d9-76-c2 dynamic
172.21.192.181 34-7d-f6-d2-53-20 dynamic
172.21.192.188 64-bc-58-18-5d-8f dynamic
172.21.192.190 80-2b-f9-65-fd-71 dynamic
172.21.192.191 78-e4-00-0c-9b-77 dynamic
172.21.192.193 10-3d-1c-cd-5a-2d dynamic
172.21.192.197 5c-61-99-31-98-61 dynamic
172.21.192.200 70-66-55-a6-0f-bd dynamic
172.21.192.213 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
• 192.168.25.2 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 172.21.192.204:51657 a23-215-196-10:https CLOSE_WAIT
TCP 172.21.192.204:51658 117.18.237.29:http CLOSE_WAIT
TCP 172.21.192.204:52055 20.106.94.33:https ESTABLISHED
TCP 172.21.192.204:52118 40.97.120.66:https ESTABLISHED
TCP 172.21.192.204:52119 40.97.120.66:https ESTABLISHED
TCP 172.21.192.204:53637 relay-30fbe9f1:http ESTABLISHED
TCP 172.21.192.204:53646 20.197.71.89:https ESTABLISHED
TCP 172.21.192.204:54191 sf-in-f188:5228 ESTABLISHED
TCP 172.21.192.204:54311 del03s10-in-f3:https TIME_WAIT
TCP 172.21.192.204:54312 10.10.0.1:http TIME_WAIT
TCP 172.21.192.204:54313 10.10.0.1:http TIME_WAIT
TCP 172.21.192.204:54314 a-0001:https ESTABLISHED
TCP 172.21.192.204:54315 13.107.246.254:https ESTABLISHED
TCP 172.21.192.204:54316 13.107.49.254:https ESTABLISHED
TCP 172.21.192.204:54317 13.107.6.254:https ESTABLISHED
TCP 172.21.192.204:54318 204.79.197.222: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 lpu.in

• Server: [192.168.25.2]
• Address: 192.168.25.2
• 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: [192.168.25.2]
• Address: 192.168.25.2

• Non-authoritative answer:
• Name: lpu.in
• Address: 192.168.25.2
Example of nslookup in cmd prompt
in windows
• C:\Users>nslookup www.lpu.in
• Server: UnKnown
• Address: 172.19.2.254

• Non-authoritative answer:
• Name: www.lpu.in
• Addresses: 2606:4700:20::681a:ccd
• 2606:4700:20::681a:dcd
• 2606:4700:20::ac43:4a98
• 104.26.12.205
• 172.67.74.152
• 104.26.13.205

• C:\Users>nslookup google.com
• Server: UnKnown
• Address: 172.19.2.254

• Non-authoritative answer:
• Name: google.com
• Addresses: 2404:6800:4009:800::200e
• 142.250.194.238

You might also like