Professional Documents
Culture Documents
Ccna Commands
Ccna Commands
Ccna Commands
PING
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:
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'