Cisco CLI Flashcards
How to enter priviledged EXEC mode ?
How to enter global configuration mode ?
SWI>enable
SWI#configure terminal
How to create a password on Cisco device ?
enable password [pass]
or
enable secret [pass]
(more secure and takes precedence over enable password)
How to display running and starting configuration ?
show ____-config
show running-config
show startup-config
How to save configuration ?
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 ?
hostname [name]
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
How can you view all the availible commands in your current user mode ?
type ‘?’ in the CLI
How to configure a VLAN ?
vlan [vlan-id ]
show VLAN status ?
show vlan brief
What is portfast?
How to enable portfast on an interface?
How to enable it on all (access) ports?
Portfast should only be configured on ports connected to a host (PC). It will only work on an access port. It bypasses the ‘Listening’ and ‘Learning’ stage of STP going straight to a forwarding state.
SWI(config)#interface g0/0
SWI(config-if)#spanning-tree portfast
SWI(config)#spanning-tree portfast default
What is BPDUGuard ?
How to enable bpduguard on an interface?
How to enable it on all (access) ports?
BPDUGuard is an extra safe guard on the port. If a port with BPDUGuard recieves a BPDU from another switch, the interface will shutdown to prevent a loop from forming.
SWI(config)#interface g0/0
SWI(config-if)#spanning-tree bpduguard enable
SWI(config)#spanning-tree portfast bpduguard default
How to set a primary and secondary root bridge manually in different VLANs ?
SWI(config)#spanning-tree vlan 1 root primary
SWI(config)#spanning-tree vlan 2 root secondary
(What really happens behind the scenes is that the priority of the bridges are changed)
SWI(config)#spanning-tree vlan 1 priority 28672
How to set a spaning tree link type on an interface ?
SWI(config-if)#spanning-tree link-type [type]
point-to-point (full duplex)
shared
edge (portfast enabled)
How to check EtherChannel load balance method ?
How to change it ?
ASWI#show etherchannel load-balance
ASWI(config)#port-channel load-balance [type]
dst-ip / dst-mac / src-dst-ip / src-dst-mac / src-ip / src-mac
How to configure etherchannel modes ?
ASWI(config-if-range)#channel-group [group] mode [mode]
active (LACP) / auto (PAgP if detected) / desirable (PAgP) / on (etherchannel only) / passive (LACP if detected)
to configure etherchannel on routed ports first configure the ports to be routed ports then assign the IP address to the port-channel.
ASWI(config-if-range)#no switchport
ASWI(config-if-range)#channel-group 1 mode [mode]
ASWI(config-if-range)#interface po1
ASWI(config-if)#ip address [IP] [subnet]
Show info on the etherchannel
ASWI#show etherchannel summary
ASWI#show etherchannel port-channel
How to enable RIP Routing protocol on router ?
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary (prevents classful addressing)
R1(config-router)#network [classful network]
(tells the router which interfaces to activate RIP on)
R1(config-router)#passive-interface [int not connected to RIP neighbors]
R1(config-router)#default-information originate (advertise default route)
How to view the routing protocol being used ?
R1#show ip protocols
How to enable EIGRP ?
R1(config)#router eigrp [AS number]
R1(config-router)#no auto-summary (prevents classful addressing)
R1(config-router)#passive-interface [int not connected to RIP neighbors]
R1(config-router)#network [classful network]
(tells the router which interfaces to activate RIP on)
R1(config-router)#default-information originate (advertise default route)
How to make a loopback interface ?
R1(config)#interface loopback [num]
R1(config-if)#ip address [IP] [/32]
How to configure OSPF ?
R1(config)#router ospf [ID] (can be any number, only locally significant)
R1(config-router)#network [IP] [wildcard] area [area num]
can also enable on interface
R1(config)#interface [interface]
R1(config-if)#ip ospf [id] area [area]
R1(config-router)#passive-interface [interface]
(tells router to stop sending ospf hello messages out of a specific interface)
R1(config-router)#default-information originate (advertise default route)
View OSPF information
R1#show ip protocols
R1#show ip ospf database
R1#show ospf neighbors
R1#show ospf interface
How to change the reference bandwidth for OSPF cost ?
On an interface ?
R1(config-router)#auto-cost reference-bandwidth [Mbps]
(should configure the same bandwidth on all OSPF routers in the network)
R1(config)#interface [interface]
R1(config-if)#ip ospf cost [Mbps]
Command to enable IPv6 Routing on a router ?
R1(config)#ipv6 unicast-routing
R1(config)#int [interface]
R1(config-if)#ipv6 address [address/mask]
R1(config-if)#no shutdown
How to apply an access control list to an interface ?
R1(config-if)#ip access-group [number] {in / out}
How to create Standard Named Access Lists ?
R1(config)#ip access-list standard [acl-name]
R1(config-std-nacl)#[number] {allow / deny} [IP] [wildcard]