Misc 1 - CLI Commands Flashcards
enable secret
Defines a password that you need to enter when entering enable mode. This password is encrypted using MD5 encryption. If ‘Enable Password’ has already set a password on the router then it will be overwritten.
show running-config
Lists the currently running configuration on the switch
reload
Reboots Cisco IOS
enable
Moves the user from user mode to enable mode
disable
Moves the user from enable mode to user mode
?
Provides help for all commands listed in this mode
command ?
Lists text to describe all the first parameter options for the command (E.g. ‘show ?’ would list commands such as ‘show running-config’, ‘ show hosts’)
com?
Lists all commands that start with com
command <parm?>
Lists all parameters beginning with the parameter typed so far
command <parm><tab></tab></parm>
Causes the CLI to spell out the rest of the word of the parameter you have typed out so far
command <parm1> ?</parm1>
If a space is inserted between the parameter and the question mark the CLI lists all the next parameters and gives a brief explanation of each
show
Shows the current status of the parameters entered
debug
Shows the live status of the parameters entered
configure or configure terminal
Moves the user from enable mode to configuration mode
end or ctrl+z
Moves the user from configuration mode to enable mode
exit
Entering this from within a configuration submode brings you back to global configuration mode
copy running-config startup-config
Backs up the running config to the startup-config file overwriting it.
write erase or erase startup-config or erase NVRAM
Erases the startup-config file
login
Enables password security using the password entered for this interface’s type of access (e.g. console or vty)
enable secret
Global command that sets a password for logging into enable mode
line <access> <interface> password <password></password></interface></access>
Sets a password for access from this particular access mode (e.g. console or vty)
login local
Tells the access method (console or vty) to use the local list of usernames and passwords instead of shared passwords per access method
How would you remove the password from privileged EXEC (enable) mode?
no enable password
no password
Removes the shared password from the interface of the access method you are currently in.
transport input <all, none, telnet, ssh>
Whichever interfaces you select here are the only ones that you will be able to access the device on
no logging console
Disables the logging messages in the console. Can be reenabled by entering ‘logging console’
no ip domain-lookup
If you mistype a command, the device doesn’t think you’re searching for a domain name and lock up the device
description
Allows you to write a text description about a particular interface (e.g. What its purpose is).
interface range <interface> - <interface></interface></interface>
Tells the device that the next configuration being made will be made to all interfaces within this range. This can be defined as long as the interfaces are numbered consecutively and the interfaces are all the same type.
no <parameter></parameter>
Will revert this parameter back to its original configuration (e.g. ‘no speed’ will revert an interface set for speed 100 to auto negotiate)
What command is used to create a VLAN?
vlan <vlan-id></vlan-id>
What command is used to name a VLAN?
vlan name <name></name>
How do you set an interface as access for a particular VLAN?
‘switchport access vlan <vlan-id>'
Specifies that the port this is configured on is an access port for the respective VLAN ID. If the VLAN ID has not already been created then it will be created dynamically and the specified port(s) will be added.</vlan-id>
switchport mode access
Specifies that the port this is configured on will only ever be an access port
show vlan brief
Shows details of all VLANs currently configured on the device
switchport mode dynamic auto
Sets an interface to dynamic auto trunking mode (Explained in chapter 8 cards)
switchport mode dynamic desirable
Sets an interface to dynamic desirable trunking mode (Explained in chapter 8 cards)
What two commands could you use to disable VTP?
‘vtp mode transparent’ or ‘vtp mode off’
How would you encrypt your device’s password?
‘service password-encryption’
Doesn’t change the password, although it makes it so that the password is encrypted (Using Cisco Type 7) and cannot be seen on the router
What command would you use to define a password specifically for privileged EXEC (enable) mode?
enable password <password></password>
How would you define a voice VLAN?
switchport voice vlan <vlan-id></vlan-id>
What does ‘show interfaces trunk’ do?
Displays trunk information on the switch (e.g. what ports have what VLANs tagged, allowed VLANs on trunks)
How would you find out if an interface is currently in access mode?
‘show interfaces switchport’
Displays the configured status of all switch ports (e.g. administrative and operational modes, access mode and voice VLANs). Can be refined by entering ‘show interfaces switchport <interface>'.</interface>
What command would you use to only allow an interface to trunk specified VLANs?
‘switchport trunk allowed vlan <vlan-ID>'</vlan-ID>
spanning-tree pathcost method long
Allows you to use the IEEE 802.1Q (2004 and after) STP path costs
What does ‘port-channel load-balance <method>' do?</method>
Defines the EtherChannel load balancing method. The method can be:
- src-mac - Uses the source MAC address
- dst-mac - Uses the destination MAC address
- src-dst-mac - Uses both the source and destination MAC address
- src-ip - Uses the source IP address
- dst-ip - Uses the destination IP address
- src-dst-ip - Uses both the source and destination IP address
- src-port - Uses the source TCP or UDP port
- dst-port - Uses the destination TCP or UDP port
- src-dst-port - Uses the source and destination TCP or UDP port
How would you test the load balancing capabilites of an EtherChannel?
‘test etherchannel load-balance’
It does this by considering its method’s (e.g. src-mac, dst-ip, src-port, etc.) message headers and asking it where it would forward particular message headers.
How would you show the ip information of an interface?
‘show ip interface’
This will show information such as IP Address, interface status, MTU etc. To find this information for a specific interface you just need to enter ‘show ip interface <interface>'</interface>
How would you map a hostname to an IP address?
‘ip host <String> <IP>' (upto 8 addresses).
Normally used for Telnet purposes so you can Telnet to the hostname instead of having to remember the IP.</IP></String>
How would you display the hostnames and addresses configured on a router?
‘show hosts’
What command would you use to show the recent commands you have entered? What command would you use to refine the results?
‘show history’
will show all previously entered commands. If ‘history size <number>' is set then it will show this amount of commands.</number>
‘history size <number>'
Defines the number of commands you can see when entering the 'show history' command. Will also affect the amount of commands you can go back to when pressing the up arrow.</number>
What does ‘terminal monitor’ do?
This presents the status changes of interfaces in the terminal. For example if you shutdown gi0/0 it will show a message stating that gi0/0 has changed to administratively down.
‘terminal monitor’ does not remain between sessions. You will need to re enter this command after you logout and back in
What command could you use to find the administrative route distance of a route?
show ip route
What command could you use to find information about your router’s OSPF neighbors?
show ip ospf neighbor