Configuration and Troubleshooting Commands
Configuration and Troubleshooting Commands
Configuration and Troubleshooting Commands
Setting password
Router(config)# enable secret <password>
Configuring an interface
Router(config)#interface <type> <number>
Router(config-if) # ip address <ip address> <subnet mask>
Router(config-if) # description < description>
Router(config-if) # no shutdown
Saving changing
Router # copy running-config startup-config
Static Routes
Router(config)# ip route <dest-network> <subnet mask> <next-hop-address>/<exit-interface>
Redistribution
Router(config)#ip default-network <network-address>
Router(config-router) #default-information originate
Router(config-router)#redistribute static
Routing Protocols
OSPF
Router(config)# router ospf <process-ID>
Router(config-router)# network <address> <wildcard-mask> area <area-ID>
EIGRP
Router(config)# router eigrp <AS-number>
Router(config-router)# network <network-address>
Router(config-router)#no auto-summary
Access Control Lists (ACL)
Standard
Router(config)# access-list <1-99> permit/deny <source-address> <wildcard-mask>
Extended
Router(config)# access-list <100-199> <protocol> permit/deny <source-address> <wildcard-mask> <dest-
address> <wildcard-mask> <port>
Switch configuration
Create VLANs
Switch#vlan database
Switch(vlan)#vlan <vlan-number> name <vlan-name>
Switch(vlan)#exit
VTP
Switch#vlan database
Switch(vlan)#vtp <server/client>
Switch(vlan)#vtp domain <domain-name>
Switch(vlan)#exit
Trunk
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk encapsulation <type>
IP addressing
STP RIP
Show spanning-tree Show ip rip database
Show spanning-tree summary Show ip protocols
Show spanning-tree vlan [vlan-nbr]
Show spanning-tree inconsistentports EIGRP
Show spanning-tree root Show ip route eigrp
Show run | include spanning-tree Show ip route
Show spanning-tree mst configuration Show ip eigrp interface
Debug eigrp packtes
Inter-VLAN routing Show ip eigrp topology
Show ip int brief Debug ip eigrp [AS/summary
Show vlans Show ip eigrp interface detail]
Show ip route Show ip eigrp neighbors
show ip cef Show ip eigrp detail
show ip int vlan [vlan-nbr] show run | begin key chain
show ip cef summary show key chain
show ip cef detail Show running-config | begin key
Show adjacency faE 0/0 detail
HSRP Debug eigrp packets hello
Show standby
Show standby brief BGP
Show standby vlan [vlan nbr] Show ip bgp
Show standby vlan [vlan nbr] brief show ip route
Debug standby packets show ip bgp summary
Show running-config | begin standby show ip bgp neighbors
debug ip bgp
Port Security show run | begin bgp
Show port-security int fa 0/0 show ip bgp [network address] [mask]
debug ip tcp transactions
QOS clear ip bgp *
Show mls qos int fa 0/0 show ip bgp neighbors [ip-address] routes
Show run int fa 0/0 show ip bgp neighbors [ip-address] advertised-
Show auto qos interfaces routes
Show mls qos int fa 0/0 show ip bgp regexp [reg-exp]
ACL SSH
Show access-lists Show line vty 0 4
Show vlan access-map Show ip ssh
Clear ip access-list counters Show ssh
Show vlan filter Show users
Show access-lists
NAT Show run | begin vty
Show ip nat translations Show run int fa 0/0
Debug ip nat Transport input telnet ssh
Debug ip icmp
Show run | include ip nat NTP
Show ip nat statistics Show ntp associations
Clear ip nat translation * Show ntp status
Clear ip nat statistics * Show clock
Clock set hh:mm:ss
DHCP Show ip inspect interfaces
Show ip dhcp snooping
Show ip int brief
Show ip dhcp bindings show ip inspect sessions
Show ip dhcp server statistics show ip inspect interfaces
Debug ip udp Clear arp-cache
Show ip int fa 0/0 Show arp
Show ip dhcp pool Show cdp neighbors
Debug ip dhcp server events Show cdp neighbor detail
Show run | begin dhcp pool Show mac address-table
Show ip dhcp conflict Show mac address-table address [mac-address]
Debug dhcp detail Show mac address-table interface [int id]
Clear ip dhcp server statistics Show ip cef
Clear ip dhcp conflict * Show ip cef [ip address]
Show ip sockets Ipconfig /release/renew
Debug ip dhcp packets Show logging | include ---