The most prominent of the show commands is the show running-config command that displays the current running config of the device. Remember that running-config is different from startup-config. The example below shows the running-config of a device.
myRouter#show running-config
Building configuration…
Current configuration : 865 bytes
!
! Last configuration change at 20:53:32 UTC Sun Jun 12 2011
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname myRouter
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$vio3$o5wBjKIRNoVW2t.6YegPv1
!
no aaa new-model
memory-size iomem 5
ip cef
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
!
!
line con 0
password test
login
line aux 0
line vty 0 4
password test
login
!
!
end
In the above output notice the various configurations from previous sections highlighted. In a single output, you can verify the entire configuration of the router.
Similar to the show running-config command, the show startup-config command shows the configuration stored in the NVRAM. If the running configuration is saved, the output of both commands will be the same as shown below:
myRouter#show startup-config
Using 1526 out of 196600 bytes!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname myRouter
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$vio3$o5wBjKIRNoVW2t.6YegPv1
!
no aaa new-model
memory-size iomem 5
ip cef
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip forward-protocol nd
!
!
!
line con 0
password test
login
line aux 0
line vty 0 4
password test
login
!
!
end
Remember the system information displayed during the boot process? You can see that information again using the show version command. An example of the output of this command is shown below:
Cisco IOS Software, 1841 Software (C1841-ADVIPSERVICESK9-M), Version 12.4(25e), RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2011 by Cisco Systems, Inc.
Compiled Wed 16-Mar-11 14:42 by prod_rel_team
ROM: System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
myRouter uptime is 1 day, 1 hour, 5 minutes
System returned to ROM by reload at 19:47:00 UTC Mon Jun 13 2011
System image file is “flash:c1841-advipservicesk9-mz.124-25e.bin”
This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
export@cisco.com.
Cisco 1841 (revision 5.0) with 115712K/15360K bytes of memory.
Processor board ID FHK094520FT
2 FastEthernet interfaces
1 Virtual Private Network (VPN) Module
DRAM configuration is 64 bits wide with parity disabled.
191K bytes of NVRAM.
31360K bytes of ATA CompactFlash (Read/Write)
Configuration register is 0x2102
Notice that most of the information from the boot process is repeated in the above output. This command can be used to find the IOS version, number and types of interfaces, memory sizes etc. The next show command that you should be familiar with is the show interfaces command. This command shows information related to an interface as shown below:
myRouter#sh interfaces FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is Gt96k FE, address is c200.1347.0000 (bia c200.1347.0000)
Internet address is 192.168.1.1/24
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:02, output hang never
Last clearing of “show interface” counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
238 packets output, 70510 bytes, 0 underruns
0 output errors, 0 collisions, 3 interface resets
3 unknown protocol drops
3 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Some important lines in the above outputs are highlighted. Let us look at them and see what they mean. The most important line in the above output is the first line:
FastEthernet0/0 is up, line protocol is up
This line shows that the interface is up and the line protocol is up, which means that the interface is connected properly. Things are not always this good. You can various some variations in the interface and line protocol status that indicate some problem. If the interface and line protocol both are shown as down, this indicates a problem with cabling or the interface and essentially a problem at the physical layer. If the interface is up but the line protocol is down, this indicates a problem at layer2 such as a framing or encapsulation problem. A third status that you can encounter is the administratively down status. This means that the shutdown command has been configured on the interface. You can use the no shut command in the interface configuration mode to bring it up.
The next three lines show the MAC address, IP Address, subnet mask and the MTU of the interface:
Hardware is Gt96k FE, address is c200.1347.0000 (bia c200.1347.0000)
Internet address is 192.168.1.1/24
MTU 1500 bytes
The next highlighted line shows the duplex and speed of the interface. As you can see, the interface is operating at 100Mb/s full duplex.
Full-duplex, 100Mb/s, 100BaseTX/FX
While troubleshooting, you might need to reset various counters such as count of packets input and output etc in the show interfaces output. This can be done using the clear counter command as shown below:
myRouter#clear counters
Clear “show interface” counters on all interfaces [confirm]
While the show interfaces command shows a lot of information, it is primarily geared towards layer 1 and layer 2 details. You can use the show ip interface command to look at IP related information as shown below:
myRouter#show ip interface fa0/0
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.1.1/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
Outgoing access list is not set
Inbound access list is not set
Proxy ARP is enabled
Local Proxy ARP is disabled
Security level is default
Split horizon is enabled
ICMP redirects are always sent
ICMP unreachables are always sent
ICMP mask replies are never sent
[output truncated]
While most of the above output is irrelevant to CCNA, you can see that the first four lines show the IP address, subnet mask, broadcast address and MTU of the interface. If you quickly want to see the IP address and status of all interfaces in the device, you can use the show ip interface brief command as shown below:
myRouter#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
FastEthernet0/1 unassigned YES unset administratively down down
While show interfaces and show ip interfaces commands are useful to find a bunch of information, the show ip interface brief command is used to quickly find the status and address of every interface. Similarly, the show protocols command can be used to find this information as shown below:
myRouter#show protocols
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.1.1/24
FastEthernet0/1 is administratively down, line protocol is down
The show protocols command is more useful if you have multiple layer 3 protocols running on the device.
When working with show commands, one useful feature that you can use is piping. Using pipes, you can search for specific lines in an entire output. Take a look at the example below:
myRouter#show running-config | include address
ip address 192.168.1.1 255.255.255.0
no ip address
In the above example, the output of show running-config is piped (using a pipe symbol!) and then the router is told to show lines form the output that include the word address. Similar to include, you can ask the router to exclude certain words. In the example below, the word unassigned is excluded from the show ip interface brief command to show only interface that have an IP address:
myRouter#show ip interface brief | exclude unassigned
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
The last pipe option that you need to know about, is the begin option. This option filters the output and shows the output starting from the line that contains the given word. Take a look at the example below:
myRouter#show running-config | begin line con
line con 0
password cisco
login
line aux 0
line vty 0 4
password cisco
login
!
!
end
In the example above, the output of show running-config is filtered to show only lines after the line containing the words “line con”. Essentially you filtered the output to see the configuration of all the three lines.
Apart from the above discussed show commands, there are many that will be discussed throughout the book with relevant topics. For now, you should be comfortable using these commands and finding information.
0 comments:
Post a Comment