Cisco CLI Flashcards
What is the running-config ?
The current active configuration file on the device. As you enter commands into the CLI, you edit the active configuration
What is the start-up config ?
The configuration loaded upon the restart of the device
How to enter priviledged EXEC mode ?
type “enable” in CLI
Router#
How to enter global configuration mode ?
type “configure terminal” in CLI
Router(config)#
How to create a password on Cisco device ?
type “enable password ____” in CLI while in configuration mode
or
type “enable secret ____” in CLI while in configuration mode
(more secure and takes precedence over enable password)
How to display running and starting configuration ?
type “show ____-config” in EXEC mode.
show running-config
show startup-config
How to save configuration ?
Type into CLI
1 “write”
2 “write memory”
3 “copy running-config startup-config”
How to encrypt passwords ?
service password-encryption
(Encrypts current and future passwords. Uses Cisco proprietary type 7 encryption. Not secure can be cracked)
enable secret _____
(more secure. Uses MD5 encryption, harder to crack. Passwords are always encrypted)
How to remove a command ?
type “no” in front of command you want to remove (global config mode)
You use the […] keyword to execute privileged EXEC commands in global configuration mode.
do
How to change hostname of Cisco device ?
Use the ‘hostname’ command in global configuration mode
How to view mac address table ?
show mac address-table
How to clear mac address table ?
clear mac address-table dynamic
clear mac address-table dynamic interface (mac or port)
How to view interface info on router ?
show ip interface breif
How to configure interface on router ?
interface (interface)
How to manually set ip address for interface ?
ip address (IP address) (subnet mask)
no shutdown
How to configure interfaces in a range ?
interface range (range)
How to configure router static path to next hop ?
ip route (ip address) (netmask) (next hop ip address)
ip route (ip address) (netmask) (exit interface)
Cisco Default Serial Connection Setting
Speed (baud): 9600
Data bits: 8
Stop Bits: 1
Parity: None
Flow Control: None
When logging into Cisco CLI what is the default user mode ?
‘User EXEC mode’
Users can look at some information but can’t make any changes to the configuration
How can you view all the availible commands in your current user mode ?
type ‘?’ in the CLI
VTY
The term “vty” stands for Virtual teletype. VTY is a virtual port and used to get Telnet or SSH access to the device. VTY is solely used for inbound connections to the device. These connections are all virtual with no hardware associated with them.
in global config mode type
line vty 0 16
login local
logging sync
username <user> password <pass></pass></user>
How to setup remote access
Enter global configuration mode:
configure terminal (conf t)
Create user account:
username <user> password <pass></pass></user>
Create VLAN:
interface vlan1
Set its IP address:
ip address <IP> <subnet></subnet></IP>
Virtual ports are administratively down by default so turn interface on:
no shutdown
line vty 0 15
tell where to look for username and password:
login local
verify telnet access:
transport input all
set domain name:
ip domain-name <name></name>
generate cryptography key:
crypto key generate rsa
Enter modulus number based on security policy
ip ssh version 2
Set to ssh only:
transport input ssh
show ip interface brief
show all interfaces
show all interfaces in a VLAN
show vlan brief
show inventory
used to display information about the hardware components installed in the device. This command provides details such as the part numbers, serial numbers, descriptions, and quantities of the various hardware components.