Showing posts with label Commands. Show all posts
Showing posts with label Commands. Show all posts

Top 10 'show' Commands

Top 10 'show' Commands 
One of the most important abilities a network administrator is the know-how to get information out of his network devices so he can find out what's going on with the network. In most networks, the staple of information gathering has been the "show" commands. Here are the list of  top ten commands you must know
  • show version: Start simple; this command gives uptime, info about your software and hardwuare and a few other details.
  • show ip interface brief: This command is great for showing up/down status of your IP interfaces, as well as what the IP address is of each interface. It's mostly useful for displaying critical info about a lot of interfaces on one easy to read page.
  • show interface: This is the more popular version of the command that shows detailed output of each interface. You'll usually want to specify a single interface or you'll have to hit 'page down' a lot. This command is useful because it shows traffic counters and also detailed info about duplex and other link-specific goodies.
  • show ip interface: This often overlooked command is great for all the configuration options that are set. These include the switching mode, ACLs, header compression, ICMP redirection, accounting, NAT, policy routing, security level, etc. Basically, this command tells you how the interface is behaving.
  • show ip route: This indispensable command shows your routing table, which is usually the primary purpose of the box. Get to know the options on this command.
  • show arp: Can't ping a neighbor? Make sure you're getting an arp entry.
  • show running-config: This is an easy one. It tells you how the box is configured right now. Also, "show startup-config" will tell you how the router will be configured after the next reboot.
  • show port: Similar to the show interface command on routers, this command gives you the status of ports on a switch.
  • show vlan: With the trend toward having lots of VLANs, check this command to make sure your ports are in the VLANs you think they are. Its output is very well designed.
  • show tech-support: This command is great for collecting a lot of info. It basically runs a whole bunch of other show commands, and spits out dozens of pages of detailed output, designed to be sent to technical support. But, it's also useful for other purposes.
Read More...

Cisco Discovery Protocol (CDP)

Cisco Discovery Protocol (CDP) is a proprietary protocol designed by Cisco to help administrators collect information about both locally attached and remote devices. By using CDP, you can gather hardware and protocol information about neighbor devices, which is useful info for troubleshooting the network.CDP messages are generated every 60 seconds as multicast messages on each of its active interfaces.

The information shared in a CDP packet about a Cisco device includes the following:

  • Name of the device configured with the hostname command
  • IOS software version
  • Hardware capabilities, such as routing, switching, and/or bridging
  • Hardware platform, such as 2600, 2950, or 1900
  • The layer-3 address(es) of the device
  • The interface the CDP update was generated on
CDP allows devices to share basic configuration information without even configuring any protocol specific information and is enabled by default on all interfaces. CDP is a Datalink Protocol occurring at Layer 2 of the OSI model. CDP is not routable and can only go over to directly connected devices.
CDP is enabled, by default, on all Cisco devices. CDP updates are generated as multicasts every 60 seconds with a hold-down period of 180 seconds for a missing neighbor.

#cdp run
 This command enables cdp globally
#no cdp run
 turns off CDP for entire router (global config)
#no cdp enable
 turns off CDP on specific interface
#sh cdp neighbor
 shows directly connected neighbors
#sh cdp int
 shows which interfaces are running CDP
#sh cdp int eth 0/0
 show CDP info for specific interface
#sh cdp entry <cdp neighbor here>
 shows CDP neighbor detail
#cdp timer 120
 change how often CDP info is sent (default cdp timer is 60)
#cdp holdtime 240
 how long to wait before removing a CDP neighbor (default CDP holdtime is 180)
#sh cdp run
 shows if CDP turned on
Read More...

Cisco: "Show Version" command

The show version command provides a lot of information in addition to the version of software that is running on the router. The following information can be collected with the show version command:

Software Version- IOS software version (stored in flash)
Bootstrap Version- Bootstrap version (stored in Boot ROM)
System up-time- Time since last reboot
System restart info- Method of restart (e.g. power cycle, crash)
Software image name- IOS filename stored in flash
Router Type and Processor type- Model number and processor type
Memory type and allocation (Shared/Main)- Main Processor RAM
- Shared Packet I/O buffering
Software Features- Supported protocols / feature sets
Hardware Interfaces- Interfaces available on router
Configuration Register- Bootup specifications, console speed setting, etc.

The following is a sample output of a show version command.
Router# show version
Cisco Internetwork Operating System Software
IOS (tm) 3600 Software (C3640-J-M), Version 11.2(6)P, SHARED PLATFORM,
RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1997 by cisco Systems, Inc.
Compiled Mon 12-May-97 15:07 by tej
Image text-base: 0x600088A0, data-base: 0x6075C000

ROM: System Bootstrap, Version 11.1(7)AX [kuong (7)AX], EARLY DEPLOYMENT
RELEASE SOFTWARE (fc2)

Router uptime is 1 week, 1 day, 38 minutes
System restarted by power-on
System image file is "flash:c3640-j-mz_112-6_P.bin", booted
via flash
Host configuration file is "3600_4-confg", booted via tftp
from 171.69.83.194

cisco 3640 (R4700) processor (revision 0x00) with 107520K/23552K bytes
of memory.
Processor board ID 03084730
R4700 processor, Implementation 33, Revision 1.0
Bridging software.
SuperLAT software copyright 1990 by Meridian Technology Corp).
X.25 software, Version 2.0, NET2, BFE and GOSIP compliant.
TN3270 Emulation software.
Primary Rate ISDN software, Version 1.0.
2 Ethernet/IEEE 802.3 interface(s)
97 Serial network interface(s)
4 Channelized T1/PRI port(s)
DRAM configuration is 64 bits wide with parity disabled.
125K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read/Write)

Configuration register is 0x2102
Read More...

Basic: Cisco IP Commands

Here is a list of the IP Commands

Configure IP on an interface: 
Serial interface
  • Router(config)#interface serial 0 
  • Router(config-if)#p address 157.89.1.3 255.255.0.0 
  • Router(config-if)#Clock rate 64000
  • Router(config-if)#encapsulation hdlc
  • Router(config-if)#no shutdown
  • Router(config-if)#exit

Fast ethernet interface
  • Router(config)#int fa 0/0 
  • Router(config-if)#ip address 200.81.1.4 255.255.255.0
  • Router(config-if)##no shutdown
  • Router(config-if)#exit

Other IP Commands: 

  • sh ip route - view ip routing table 
  • ip route <remote_network> <mask> <default_gateway> [administrative_distance] - configure a static IP route 
  • ip route 0.0.0.0 0.0.0.0 <put gateway of the last resort here> - sets default gateway 
  • ip classless - use with static routing to allow packets destined for unrecognized subnets to use the best possible route 
  • sh arp - view arp cache; shows MAC address of connected routers 
  • ip address 2.2.2.2 255.255.255.0 secondary - configure a 2nd ip address on an interface 
  • sh ip protocol - To view the protocol used 

Read More...

Privileged Mode commands of a router

Privileged Mode commands of a router 

Learn how to work in the privileged mode of a router.
enable - get to privileged mode
disable - get to user mode
enable password <give password here> - sets privileged mode password
enable secret <give password here> - sets encrypted privileged mode password
Read More...

General Cisco Commands

General Cisco Commands 

Here is a list of the general commands. These are the basic level commands and most commonly used
  • no shutdown - (enables the interface) 
  • reload - restarts the router 
  • show version - Cisco IOS version, uptime of router, how the router started, where system was loaded from, the interfaces the POST found, and the configuration register 
  • show clock - shows date and time on router 
  • show history - shows the history of your commands 
  • show debug - shows all debugging that is currently enabled 
  • no debug all - turns off all debugging 
  • sh users - shows users connected to router 
  • sh protocols - shows which protocols are configured 
  • banner motd # Your customized message here # - Set/change banner 
  • hostname <give router name> - use to configure the hostname of the router 
  • clear counters - clear interface counters 
Router Processes & Statistics commands: By these command you can see the statistics and different processes of the router. 
  • show processes - shows active processes running on router 
  • show process cpu - shows cpu statistics 
  • show mem - shows memory statistics 
  • show flash - describes the flash memory and displays the size of files and the amount of free flash memory 
  • show buffers - displays statistics for router buffer pools; shows the size of the Small, Middle, Big, Very Big, Large and Huge Buffers 
  • show stacks - shows reason for last reboot, monitors the stack use of processes and interrupts routines
Read More...

Basic commands for configuring a router.

 Basic commands for configuring a router. 

Note : Sh means "Show"
  • sh running-config - details the running configuration file (RAM) 
  • sh startup-config - displays the configuration stored in NVRAM 
  • setup - Will start the the automatic setup; the same as when you first boot the router 
  • config t - use to execute configuration commands from the terminal 
  • config mem - executes configuration commands stored in NVRAM; copies startup-config to running-config 
  • config net - used to retrieve configuration info from a TFTP server 
  • copy running-config startup-config - copies saved config in running config (RAM) to NVRAM or "write memory" for IOS under ver.11 
  • copy startup-config running-config - copies from non-volatile (NVRAM) to current running config (RAM) 
  • boot system flash <put file filename here> - tells router which IOS file in flash to boot from 
  • boot system tftp - tells router which IOS file on the tftp server to boot from 
  • boot system rom - tell router to boot from ROM at next boot 
  • copy flash tftp - Copies flash to tftp server 
  • copy tftp flash - Restores flash from tftp server 
  • copy run tftp - Copies the current running-config to tftp server 
  • copy tftp run - Restores the running-config from tftp server

Read More...