0% found this document useful (0 votes)
293 views

CCNA Command Guide: Help: When You Write Command in Cisco Device

The document provides guidance on basic Cisco networking commands for different device modes, configuration settings, and protocols. It includes: - Descriptions of user mode, privileged mode, global configuration mode, and interface configuration mode and how to move between the modes. - Examples of commands for basic device configuration settings like hostname, passwords, and interfaces. - Explanations of commands for VLAN configuration, IP settings, and trunking ports. - Summaries of commands for protocols like VTP, STP, and inter-VLAN routing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
293 views

CCNA Command Guide: Help: When You Write Command in Cisco Device

The document provides guidance on basic Cisco networking commands for different device modes, configuration settings, and protocols. It includes: - Descriptions of user mode, privileged mode, global configuration mode, and interface configuration mode and how to move between the modes. - Examples of commands for basic device configuration settings like hostname, passwords, and interfaces. - Explanations of commands for VLAN configuration, IP settings, and trunking ports. - Summaries of commands for protocols like VTP, STP, and inter-VLAN routing.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CCNA Command Guide

Help : when you write Command in cisco Device

- Using the Tab Key to Complete Commands


Ex: Router> en = Router> enab = Router> enable
Using shortcuts for entering commands
Ex: Router#configure terminal = Router#config t

Using ? the Question Mark for Help Router#c?


Clear clock
- Using ↑↓ To Show Last commend Entry
- Using Ctrl + Z Or End To Moves you from any prompt back down to privileged mode

Device Cisco Modes

Mode User mode Privileged mode Global configuration mode Interface configuration mode
Prompt Router> Router# Router(config)# Router(config-if)#
To move Mode from
Router>enable Router#configure terminal Router(config)# interface f0/0
Up Mode
To move Mode from
Router#disable Router(config)#exit Router(config-if)#exit
Down Mode

Basic Configuring
Command Description
Router(config)#hostname R1 Change name Device
Router(config)#enable password cisco Sets enable password
Router(config)#enable secret class Sets enable secret password
Router(config)#line console 0 Enters console line mode
Router(config-line)#password console Sets console line mode password to console
Router(config-line)#login Enables password checking at login
Router(config)#line vty 0 4 lines Enters vty line mode for all five vty
Router(config-line)#password telnet Sets vty password to telnet
Router(config-line)#login Enables password checking at login
Router(config)#service password-encryption Applies a weak encryption to passwords
Router(config)#no service password -encryption Turns off password encryption
Turns off trying to automatically resolve an unrecognized
Router(config)#no ip domain-lookup
command to alocal host name

Saving Configuring
Command Description
Router#copy running-config startup-config Saves the running configuration to local NVRAM
Router#copy running-config tftp Saves the running configuration remotely to a TFTP server
Router#copy flash: tftp Saves the IOS remotely to a TFTP server
Router#erase startup-config Deletes the startup configuration file from NVRAM
Configuring a Switch (Verifying Commands)
Command Description
switch#show mac-address-table Displays the current MAC address forwarding table.
switch#show vlan Displays the current VLAN configuration.
switch#show vlan brief Displays VLAN information in brief
switch#show interface vlan1 Displays setting of virtual interface VLAN 1, the default VLAN on the switch.
switch#delete flash:vlan.dat Removes the VLAN database from flash memory.
switch#erase startup-config Erases the file from NVRAM.
switch#reload Restarts the sw

Setting IP Addresses and Default Gateways


Command Description
Enters the virtual interface for VLAN 1, the default
Switch(config)#interface vlan1
VLAN on the switch
Sets the IP address and netmask to allow for remote
Switch(config-if)#ip address 172.16.10.2 255.255.255.0
access to the switch
Switch(config)#ip default-gateway 172.16.10.1 Allows IP information an exit past the local network

VLAN Configuration and Assigning Ports to VLANs


Command Description
Creates VLAN 30 and enters VLAN configuration
Switch(config)#vlan 30
mode for further definitions.
Assigns a name to the VLAN. The length of the name
Switch(config-vlan)#name Sales
can be from 1 to 32 characters.
set the same configuration parameters on multiple
Switch(config)#interface range fastethernet 0/1 - 9
ports at the same time.
Switch(config-if)#switchport mode access Sets the port to access mode
Switch(config-if)#switchport access vlan 10 Assigns this port to VLAN 10

Configuration Trunk interface and Assigning Ports to Native VLAN


Command Description
Switch(config)#interface fastethernet 0/X Moves to interface configuration mode
Switch(config-if)#switchport mode trunk Set the interface into permanent trunking mode
Switch(config-if)#switchport trunk encapsulation (isl or dot1q) Specifies ISL or DOT1Q encapsulation on the trunk link
Switch(config-if)#switchport trunk native vlan X Assigns this port to VLAN Native
Configuration VLAN Trunking Protocol (VTP)
Command Description
Changes the switch to VTP mode to (client or
Switch(config)#vtp mode (client or transparent or server ) transparent or server ) NOTE: By default, all Catalyst
switches are in server mode.
Configures the VTP domain name. The name can be
from 1 to 32 characters long.
Switch(config)#vtp domain XYZ NOTE: All switches operating in VTP server or client
mode must have the same domain name to ensure
communication.
Configures a VTP password , the password length
Switch(config)#vtp password XXXXXX ranges from 8 to 64 characters long. All switches
must have the same VTP password set.
Enables VTP pruning. By default, VTP pruning is
Switch(config)#vtp pruning
disabled
Switch#show vtp status Displays general information about VTP configuration

Inter-VLAN Communication Using an External Router


Command Description
Router(config)#interface fastethernet 0/0 Moves to interface configuration mode.
Router(config-if)#no shutdown UP the interface
Router(config-if)#duplex full Sets the interface to full duplex
Router(config-if)#interface fastethernet 0/0.1 Creates subinterface 0/0.1 and moves to
subinterface configuration mode.
Router(config-subif) #encapsulation dot1q X Assigns VLAN X to this subinterface.
Router(config-subif)#ip address 192.168.1.1 255.255.255.0 Assigns the IP address and netmask

Communication Spanning Tree Protocol


Command Description
Switch(config)#spanning-tree vlan 5 Enables STP on VLAN 5
Modifies the switch priority from the default 32768 to a
Switch(config)#spanning-tree vlan 5 root lower value to allow the switch to become the root switch
for VLAN 5.
Switch(config)#spanning-tree vlan 5 root primary Configures the switch to be the root switch for VLAN 5
hello-time 4 and sets the hello delay timer to 4 seconds.
Switch(config)#interface fastethernet 0/1 Moves to interface configuration mode
Configures the cost for the interface that is an access port.
NOTE: If a loop occurs, STP uses the path cost when
Switch(config-if)#spanning-tree cost 100000
trying to determine which interface to place into the
forwarding state.
Configures the switch priority of VLAN 5 to 12288
NOTE: With the priority keyword, the range is 0 to 61440
Switch(config)#spanning-tree vlan 5 priority 12288 in increments of 4096. The default is 32768.
0 4096 8192 12288 16384 20480 24576 28672
32768 36864 40960 45056 49152 53248 57344 61440
Switch(config)#spanning-tree vlan 5 hello-time 4 Changes the hello-delay timer to 4 seconds on VLAN 5
Switch(config)#spanning-tree vlan 5 forward-time 20 Changes the forward-delay timer to 20 seconds on VLAN 5
Switch(config)#spanning-tree vlan 5 max-age 25 Changes the maximum-aging timer to 25 seconds on VLAN 5
Switch#show spanning-tree Displays STP information
Switch#show spanning-tree vlan 5 Displays STP information for VLAN 5
Switch(config)#spanning-tree mode rapid-pvst Enables Rapid PVST+.

You might also like