Wednesday, May 5, 2010

Welcome to Virtual Cisco Labs - INITIAL STARTUP IN CISCO

CLOCK SET COMMAND - Router# clock set 13:32:00 12 May 2001

DESCRIPTION COMMAND - To add a description to an interface configuration, use the description interface configuration command. Use the no form of this command to remove the description. The description command is meant solely as a comment to be put in the configuration to help you remember what certain interfaces are used for. The following example shows how to add a description on interface:
Router (Config-if) # Description this interface connected to e0/0 of router 3.

TERMINAL HISTORY COMMAND - Sets the number of commands in the buffer that can be recalled by the router (maximum 256)
Router# terminal history size 25 (25 number of command to recall)

SETTING PASSWORD ON LINES
Console Password - Console password is needed when logging into router at user EXEC mode from console.
Router(config)# line console 0
Router(config-line)# password Cisco
Router(config-line)# Login

vty lines password - Virtual terminal lines (vty) are used to allow remote access to the router (by telneting through its interfaces). The router has five virtual terminal lines by default.
Router(config)# line vty 0 4
Router(config-line)# password Cisco
Router(config-line)# login

Setting Privileged Access Password - To set a local password to control access to various privilege levels, use the enable password global configuration command. Use the no form of this command to remove the password requirement.
An enable password is defined as follows:
• Must contain from 1 to 25 uppercase and lowercase alphanumeric characters.
• Must not have a number as the first character.
• Can have leading spaces, but they are ignored. However, intermediate and trailing spaces are recognized.
Router (config) # enable password CISCO@123

Setting Secret (Encrypted) Password - To set an encrypted local password to control access to various privilege levels, use the enable secret global configuration command. Use the no form of this command to remove the password requirement.
Router(config)# enable secret cisco

Message-of-the-Day Banner Command
Router(config)#banner motd # Building Power will be interrupted next Tuesday evening from 8 – 10 PM. #
Router(config)#

Login Banner Command
Router(config)#banner login # Authorized Personnel Only! Please enter your username and password. #
Router(config)#

Assigning a Local Host Name to an IP Address Command
Router(config)# ip host london 172.16.1.3

no ip domain-lookup Command - Ever type in a command incorrectly and are left having to wait for a minute or two as the router tries to translate your command to a domain server of 255.255.255.255? The router is set by default to try to resolve any word that is not a command to a Domain Name System (DNS) server at address 255.255.255.255. If you are not going to set up DNS, turn off this feature to save you time as you
type, especially if you are a poor typist.
Router(config)# no ip domain-lookup
Router(config)#

The logging synchronous Command - Turns on synchronous logging. Information items sent to the console will not interrupt the command you are typing. The command will be moved to a new line.
Router(config)#line console 0
Router(config-line)#logging synchronous

The exec-timeout Command - Sets the time limit when the console automatically logs off. Set to 0 0 (minutes seconds) means the console never logs off. The command exec-timeout 0 0 is great for a lab environment because the console never logs out. This is considered to be bad security and is dangerous in the real world. The default for the exec-timeout command is 10 minutes and zero (0) seconds (exec-timeout 10 0).
Router(config)#line console 0
Router(config-line)#exec-timeout 0 0

Cisco Command Aliases
Alias command allows you to define aliases for long commands. Alias command breaks down into three modes:
Alias Exec for Privileged Mode/Alias Configure for Global Configuration Mode/Alias Interface for Interface Configuration Mode.
Let say that you want to shorten Show Running-Configuration command to just two keystrokes, you could define it as follow:

Router(Config)# alias exec sr Show Running-config
Or if you want to use ns to perform No Shut command on an interface you could define it as:
Router(Config)# alias interface ns no shutdown

So now instead of typing out all those long commands you could type sr for show run or ns for no shut down and still achieve the same desired effects. Cisco IOS includes some built-in command aliases. You can view these aliases by using the "show alias" command. Here are the default command aliases:
• h - help
• lo - logout
• p - ping
• r - resume
• s - show
• u - undebug
• un - undebug
• w - where
The Alias Command reminds me of the .bat files back in the DOS days when we used it to combine multiple commands together and shorten the filename to just a few keystrokes. If used effectively, this could save you a lot of time and typing.

Verifying the Current Configuration - To verify the configuration in DRAM, use the show running-config command
Router#show running-config
Building configuration...
Current configuration : 776 bytes
!
version 12.4
Verifying the Stored Configuration - Next, you should check the configuration stored in NVRAM. To see this, use the show
startup-config command (sh start for short)

Router#show startup-config
Using 776 out of 245752 bytes
!
version 12.4

Copying the Current Configuration to NVRAM - You’ll then need to copy the current configuration to NVRAM:
Router#copy running-config startup-config
Destination filename [startup-config]?[enter]
Building configuration...
[OK]

Copying the Configuration to a TFTP Server - Once the file is copied to NVRAM, you can make a second backup to a TFTP server by using the copy running-config tftp command (copy run tftp for short)
Router#copy running-config tftp
Address or name of remote host []?1.1.1.2
Destination filename [router-confg]?todd-confg
!!
776 bytes copied in 0.800 secs (970 bytes/sec)
Router#

Restoring the Cisco Router Configuration – If you did copy the router’s configuration to a TFTP server as a second backup, you can restore the configuration using the copy tftp running-config command (copy tftp run for short) or the copy tftp startup-config command (copy tftp start for short)

Router#copy tftp running-config
Address or name of remote host []?1.1.1.2
Source filename []?todd-confg
Destination filename[running-config]?[enter]
Accessing tftp://1.1.1.2/todd-confg...
Loading todd-confg from 1.1.1.2 (via FastEthernet0/0): !
[OK - 776 bytes]
776 bytes copied in 9.212 secs (84 bytes/sec)
Router#

show Commands
Router#show ? Lists all show commands available.
Router#show interfaces Displays statistics for all interfaces.
Router#show interface serial 0/0/0 Displays statistics for a specific interface (in this case, serial 0/0/0).
Router#show ip interface brief Displays a summary of all interfaces, including status and IP address assigned.
Router#show controllers serial 0/0/0 Displays statistics for interface hardware. Statistics display if the clock rate is set and if the cable is
DCE, DTE, or not attached.
Router#show clock Displays time set on device.
Router#show hosts Displays local host-to-IP address cache. These are the names and addresses of hosts on the network to which you can connect.
Router#show users Displays all users connected to device.
Router#show history Displays the history of commands used at this edit level.
Router#show arp Displays the Address Resolution Protocol (ARP) table.
Router#show protocols Displays status of configured Layer 3 protocols.

No comments:

Post a Comment