General:
Router (config)# hostname name
Router (config)# banner motd # message #
Router (config)# enable secret password or enable password password
Router (config)# line console 0
Router (config-line)# password password
Router (config-line)# login
Router (config)# line vty 0 15
Router (config-line)# password password
Router (config-line)# login
Router (config)# service password-encryption
Router (config)# Username cisco password cisco
Router (config)# ip domain-name [Link]
Router (config)# crypto key generate rsa
Router (config)# ip ssh version 2
Router (config)# line vty 0 4
Router (config-line)# login local
Router (config-line)# transport input ssh
Router (config-line)# ip access-class 1 in
Router (config)# interface type number
Router (config-if)# ip address net-address net-mask
Router (config-if)# no cdp enable
Router (config)# description description
Router (config)# no shutdown
Router (config)# no cdp run
Router (config)# ip route net-address net-mask interface
Router (config)# ip route [Link] [Link] interface (Default Route)
Router# copy running-config startup-config
Router# erase startup-config
Router# reload
VTP Configuration:
Switch (config)# VTP domain domain-name
Switch (config)# VTP password password
Switch (config)# VTP version [1|2]
Switch (config)# VTP mode [server|client|transparent]
VLANs Configuration:
Switch (config)# vlan vlan_id
Switch (config-vlan)# name name
Switch (config)# interface interface_type number
Switch (config-if)# no shutdown
Switch (config-if)# switchport mode access
Switch (config-if)# switchport access vlan vlan_id
Switch (config-if)# switchport mode trunk
Switch (config-if)# switchport trunk allowed vlan [id|add|all|except|none|remove]
Switch (config-if)# switchport trunk native vlan vlan_id
Switch # delete flash:[Link]
Management VLAN Configuration:
Switch (config)# interface vlan id
Switch (config-if)# ip address ip_address mask_address
Switch (config)# ip default-gateway gateway_ip_address
STP Configuration:
Switch (config)# spanning-tree mode rapid-pvst
Switch (config)# spanning-tree vlan id priority number
Switch (config)# spanning-tree vlan id root [primary|secondary]
Switch (config-if)# spanning-tree vlan id port-priority number
Switch (config-if)# spanning-tree link-type [point-to-point|shared]
Switch (config-if)# spanning-tree portfast
Switch (config-if)# spanning-tree bpduguard enable
Port-Security Configuration:
Switch (config-if)# switchport port-security mac-address mac-address
Switch (config-if)# switchport port-security mac-address sticky
Switch (config-if)# switchport port-security maximum number
Switch (config-if)# switchport port-security violation [protect|restrict|shutdown]
EthernetChannel:
Switch (config)# interface range fastethernet 0/1-2
Switch (config-if)# channel-group 1 mode active
Switch (config)# interface port-channel 1
Switch (config-if)# switchport mode trunk
Switch (config-if)# switchport trunk allowed vlan 1,2,20
Inter-VLAN Routing Configuration:
Router (config)# interface interface_type number.vlan_id
Router (config-subif)# encapsulation dot1q valn_id
Router (config-subif)# encapsulation dot1q valn_id native
Router (config-subif)# ip address gateway_ip mask_address
OSPF Configuration:
Router (config)# router ospf process_id
Router (config-router)# network net-address wildcard-mask area area_id
Router (config-router)# passive-interface type number
Router (config-router)# router-id ip-address (Router ID/LoopBack/Highest active IP)
Router (config-router)# default-information originate (Propagate default route)
Router (config-router)# redistribute static subnets (Propagate static routes)
Router (config-router)# auto-cost reference-bandwidth Mbs (Change on every OSPF routers)
Router (config-if)# ip ospf hello-interval seconds
Router (config-if)# ip ospf dead-interval seconds (4x times hello interval)
Router (config-if)# bandwidth Kbs (Default 1544 Kbs)
Router (config-if)# ip ospf cost cost
Router (config-if)# ip ospf priority priority (0 cannot be DR)
Show Commands:
Router (config)# show startup-config
Router (config)# show running-config
Router (config)# show version
Router (config)# show interface type number
Router (config)# show ip route
Router (config)# show ip interface
Router (config)# show ip interface brief
Router (config)# show ip protocols
Router (config)# show cdp neighbors
Router (config)# show cdp traffic
Router (config)# show cdp interface s0/0/0
Router (config)# show ip ospf
Router (config)# show ip ospf neighbor
Router (config)# show ip ospf database
Router (config)# show ip ospf interface type number
Router (config)# show access-lists
Switch # show ip interface
Switch # show ip interface brief
Switch # show interface type number
Switch # show interface trunk
Switch # show interface interface_type number switchport
Switch # show interface switchport
Switch # show vlan brief
Switch # show vlan id
Switch # show vlan name
Switch # show port-security interface interface_type number
Switch # show vtp status
Switch # show vtp counters
Switch # show vtp password
Switch # show spanning-tree active
Switch # show spanning-tree detail
Switch # show spanning-tree summary
Switch # show spanning-tree vlan id
Switch # show spanning-tree interface interface_type number
Switch # show mac-address-table interface interface_type number
EIGRP Protocol
Router (config)# router eigrp AS_number
Router (config-router)# network network_ip wildCard_mask
Router (config-router)# passive-interface interface
Router (config-router)# no auto-summary
Router (config-if)# nip summary-address eigrp 1 [Link] [Link]
Router (config-router)# redistribute static
PPP Configuration:
Router (config)# username remote_name_router password password
Router (config)# interface interface_type number
Router (config-if)# encapsulation [HDLC|PPP|Frame-relay]
Router (config-if)# compress [predictor|stac]
Router (config-if)# ppp quality value
Router (config-if)# ppp multilink
Router (config-if)# ppp authentication [chap|chap pap|pap chap|pap]
Router (config-if)# ppp pap sent-username my_router_name password password
Router # debug ppp [authentication|negotiation|packet]
Router # show interface type number
Router # show controllers type number
Frame Relay Configuration:
Router (config-if)# encapsulation frame-relay [cisco|ietf]
Router (config-if)# frame-relay lmi-type [ansi|cisco|q933a]
Router (config-if)# frame-relay map protocol remote_address local_dlci [broadcast]
[ietf|cisco]
Router (config)# interface serial [Link] [multipoint|point-to-point]
Router (config-subif)# frame-relay interface-dlci number
Router # clear frame-relay-inarp
Router # show frame-relay map
Router # show frame-relay lmi
Router # show frame-relay pvc dlci
Router # debug frame-relay lmi
DHCP Configuration:
Router (config)# ip dhcp excluded-address low_addr high_addr
Router (config)# ip dhcp pool pool_name
Router (dhcp-config)# network network_addr [mask|/prefix]
Router (dhcp-config)# default-router gateway_addr
Router (dhcp-config)# dns-server dns_server_addr
Router (dhcp-config)# domain-name name
Router (dhcp-config)# lease time
Router (config-if)# ip helper-address server_addr
Router (config-if)# ip address dhcp
Router (config)# no service dhcp
Router # show ip dhcp binding
Router # show ip dhcp server statistics
Router # show ip dhcp pool
Router # show ip dhcp conflict
Router # debug ip dhcp server events
ACLs Configuration:
Router (config)# access-list number [deny|permit|remark] source_IP source_wildCard [log]
Router (config)# access-list number remark text coments
Router (config)# access-list number [deny|permit] source _IP [log]
Router (config)# ip access-list [standard|extended] name
Router (config-std-nacl)# [deny|permit|remark] source_IP source_wildCard [log]
Router (config-ext-nacl)# [deny|permit|remark] [IP|TCP|UDP|ICMP] source_IP source_wildCard destination_IP
destination_wildCard [eq|neq|gt|lt] port_number
Router (config-if)# ip access-group [ number|name] [in|out]
Router (config-if)# no ip access-group
Router (config)# no access-list number
Router (config-line)# access-class number [in|out]
Router# show access-list [ number|name]
NAT-PAT Configuration:
Router (config)# ip nat inside source static local_ip global_ip
Router (config-if)# ip nat [inside|outside]
Router (config)# ip nat pool name start_ip end_ip netmask netmask_ip (inside global)
Router (config)# access-list number [permit|deny] source_ip wildCard_mask (inside local)
Router (config)# ip nat inside source list ACL_number pool pool_name (PAT one-to-one)
Router (config)# ip nat inside source list ACL_number interface out_interface overload (PAT multiple-to-one)
Router (config)# ip nat inside source list ACL_number pool pool_name overload (PAT multiple-to-multiple)
Router (config-if)# ip nat [inside|outside]
Router# show ip nat translations [verbose]
Router# show ip nat statistics
Router# clear ip nat translations
IP V6:
IPv6 Address Description
• All routes and used when specifying a default
static route.
::/0
It is equivalent to the IPv4 quad-zero
([Link]).
• Unspecified address and is initially assigned to a
::/128
host when it first resolves its local link address.
• Loopback address of local host.
::1/128
Equivalent to [Link] in IPv4.
• Link-local unicast address.
FE80::/10 Similar to the Windows autoconfiguration IP
address of 169.254.x.x.
FF00::/8 • Multicast addresses.
All other addresses • Global unicast address.
Router (config)# ipv6 unicast-routing
Router (config-if)# ipv6 address [Link]/64 eui-64
Router (config)# ipv6 route net-address net-mask interface
RIP:
Router (config)# ipv6 router rip v6process
Router (config-if)# ipv6 rip v6process enable
OPSFV3:
Router (config-if)# ipv6 ospf 1 area 0
Router (configf)# ipv6 router ospf 1
Router (config-rtr)# router-id [Link]
EIGRP:
Router (configf)# ipv6 router eigrp 1
Router (config-rtr)# no shutdown
Router (config-if)# ipv6 eigrp 1
SNMP:
Router (config)# snmp-server community Cisco
Router (config)# snmp-server location San Jose
Router (config)# snmp-server contact Joe Summer
Router (config)# logging [Link]
Router (config)# logging trap informational