Ccna Commands

You might also like

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

CCNA COMMANDS

PING

Analyzing ping result:

 so strictly speaking TTL refers to the number of hops a packet can make before it will be
discarded; but of course, indirectly, it also shows you the "time" of how long a packet's
life is left.
 “pinging google.com” – ping only knows how to communicate with IP address, this is to
lookup for the corresponding ip address
 “reply from 78.83.4.159” – this tells that the remote server of that ip address replied.
hat that means, though, is that the entire route across the internet, from your machine
through routers and switches and networking equipment and whatever else, worked, as
did the return path carrying the server’s reply. If this fails, (“timed out”) then something
along the connection between you and the server might be broken, the server might be
offline, or the server might not even exist. It’s also possible the server is explicitly
configured not to respond to ping requests.
 “time=5ms” This is the round trip time: the time between sending “Are you there?” and
receiving “Yes I am!”. – The total time it takes for the packet to be received and sent
back from a starting point to a destination. The time varies depending on many factors,
including how close you are to the remote server, how many routers and other
networking equipment are between you and that server, and more.
o Latency is the time it takes for a packet to go from the sending endpoint to the
receiving endpoint. 
 “Sent = 4, Received = 4” One of the things TCP/IP is designed to deal with is packet loss.
Ideally, every packet you send should get to where it’s going, but for various reasons,
that doesn’t always happen. As long as the packets can get there after a retry or two, in
normal usage you’d never notice. Ping sends multiple packets and reports specifically on
the success rate, so you can see if a particular connection is prone to packet loss.
 “Approximate round trip times” While on average the same kind of packet sent to the
same destination should take roughly the same amount of time, that’s also not always
the case. Some packets take longer than others, for reasons as diverse as the equipment
involved and paths followed. Ping reports these statistics so you can see if a particular
connection is prone to this type of problem

TRACEROUTE

 It is utility  that traces a packet from your computer to the host, and will also show the
number of steps (hops) required to reach there, along with the time by each step. 

As you can see, there are several rows divided into columns on the report. Each row represents
a "hop" along the route. Think of it as a check-in point where the signal gets its next set of
directions. Each row is divided into five columns. A sample row is below:

Let's break this particular hop down into its parts.


Hop Number - This is the first column and is simply the number of the hop along the route. In
this case, it is the tenth hop.
RTT Columns - The next three columns display the round trip time (RTT) for your packet to
reach that point and return to your computer. This is listed in milliseconds. There are three
columns because the traceroute sends three separate signal packets. This is to display
consistency, or a lack thereof, in the route.
Domain/IP column - The last column has the IP address of the router. If it is available, the
domain name will also be listed.
Checking the hop times
The times listed in the RTT columns are the main thing you want to look at when evaluating a
traceroute. Consistent times are what you are looking for. There may be specific hops with
increased latency times but they may not indicate that there is an issue. You need to look at a
pattern over the whole report. Times above 150ms are considered to be long for a trip within
the continental United States. (Times over 150ms may be normal if the signal crosses an ocean,
however.) but issues may show up with very large numbers.
Increasing latency towards the target
If you see a sudden increase in a hop and it keeps increasing to the destination (if it even gets
there), then this indicates an issue starting at the hop with the increase. This may well cause
packet loss where you will even see asterisks (*) in the report.

High latency in the middle but not at beginning or end


If the hop immediately after a long one drops back down, it simply means that the
router at the long hop set the signal to a lower priority and does not have an issue. Patterns like
this do not indicate an issue.
High latency in the middle that remains consistent
If you see a hop jump but remain consistent throughout the rest of the report, this does not
indicate an issue.

High latency in the beginning hops


Seeing reported latency in the first few hops indicates a possible issue on the local network
level. You will want to work with your local network administrator to verify and fix it.
Timeouts at the beginning of the report
If you have timeouts at the very beginning of the report, say within the first one or two hops,
but the rest of the report runs, do not worry. This is perfectly normal as the device responsible
likely does not respond to traceroute requests.

Timeouts at the very end of the report


Timeouts at the end may occur for a number of reasons. Not all of them indicate an issue,
however.
 The target's firewall may be blocking requests. The target is still most probably
reachable with a normal HTTP request, however. This should not affect normal
connection.
 The return path may have an issue from the destination point. This would mean the
signal is still reaching, but just not getting the return signal back to your computer. This
should not affect normal connection.
 Possible connection problem at the target. This will affect the connection.

TOP CCNA COMMANDS

show running-configuration

The 'show run' command is by far the most useful 'show' command you will come
across. It gives you a page by page report on how the current device is setup. This
include interface information such as the IP address, if the interface is shutdown, etc.
You can also see the device-wide information such as which passwords are set, if SSH
or telnet is setup and ready for login, etc. You can see when the configuration was
last updated and saved along with VLAN information. Basically, if there is a piece of
information you do not know, and are unsure how to find that information, start
with the 'show running-configuration' command. There is a good chance it will have
what you are looking for.
show interfaces
This command will show you detailed information about the interfaces on the device. The
command as simply 'show int' alone will display information about each configured on the
device, one after the other. If you are looking for information on a specific interface you can
input the type and number of the interface to get information about only that one interface, for
example 'show int fa 0/1' will only show information about FastEthernet 0/1.
The output of this command includes the MTU size, the bandwidth label, the mac-address, the
IP address, the subnet mask, and the errors on the interface. The detailed error report from
'show interfaces' makes this the go-to command when you are having routing issues. You will
see not only the number of errors, but the specific type of error, such as giants or collisions or
runts, and this will allow you to have an idea of where the problem may be coming from. If you
are seeing connection issues, try the 'show int' command.
show ip route

'Show ip route' will display the routing table which is used to find where to send data. This is
what you would use to see the next hop for every packet. This is a layer-3 command. It shows
which interface will send out a packet destined for a certain IP address. This command will also
tell you how the device learned of that route. You can find out if the route is directly connect,
static, or learned through a routing protocol such as OSPF of RIP. You can be most specific with
this command by including the protocol you are interested in, for example 'show ip route ospf'
will display OSPF routes. If you ever need to know which interface is responsible for reaching a
certain network, use this command.
show ip interface
The 'show ip int' command will give a detailed layer-3 report of an interface. Like the 'show
interfaces' command, you can specify a specific interface to look at such as 'show ip int g 0/2'.
This command will show information such as the incoming and outgoing access list, the IP
address and the network mast. The command 'show ip interface brief' is also extremely useful
for quickly seeing which interfaces are up and what IP address is assigned to each interface.
This is a quick and concise way to see what the basic interface status looks like.
show access-list
This command will display the access-lists on the device. This includes every line of the access-
list, but does not display which interface that access-list is applied to. To see where an access-
list is applied, you will want to run the 'show ip interface' or 'show run' commands. Note that
the 'show access-list' command shows access lists for all protocols, whereas 'show ip access-list'
only shows IPv4 access-lists and may exclude other existing access-lists, such as IPv6 access-
lists. Remember that each access list has a unstated last command of 'deny any'. Use the 'show
access-list' command to see exactly what an access-list is doing.
show cdp neighbor detail
'Show cdp neighbor detail' will display information about Cisco devices connected to the device
you are on. It is a layer-2 command, so this includes information about switches and even
phones. CDP is a Cisco proprietary protocol, so the command will only show information about
Cisco devices. The information includes the remote device type, the remote IP address, the
remote interface connected to the device you are on, and the remove device ID. This is a great
command for when you need to figure out what other types of devices you are connected to.
Say you find a switch in a closet somewhere and have no idea where all the cables from that
switch go. You can type 'show cdp neighbor detail' and see what type of device each interface is
connected to. No need to go tracing wires throughout the building. The 'show cdp neighbor'
command will show much (but not all) of the same information in a more concise format.
show vlan
The display from this command will show you the information and status of VLANs on the
device. This includes the VLAN names, numbers, and the interfaces on which each VLAN can be
found. If a certain interface is not listed in this command, that interface is a trunk. Use this
command to see which VLANs are active and on which ports.
show interface trunk
Use the 'show interface trunk' command to view all the trunk ports on the device. The display
will include information on which VLANs are allowed on which trunk, what the native VLAN is.
Use this command to see which ports are used for trunking and which VLANs are allowed to
pass through those trunks.

show ip protocols
This command displays information about Layer 3 protocols on the Cisco device. These include
RIP, OSPF and EIGRP. While these protocols have their own specific show commands, the 'show
ip protocols' gives a large amount of detail on all running protocols at once. It includes routing
information and is often the first Cisco command to run when troubleshooting routing
problems due to Network Layer protocols misconfiguration. For IPv6 use 'show ipv6 protocols'

You might also like