Cisco Commands
Show Commands
# show arp // Shows MAC address's
# show version // Shows IOS
# show mac-address-table
# show int fa0/1 // Shows stats for that port
# show run int fa0/1 // Shows config for that port
# sh run | begin line vty // Shows transport input ssh telnet
# show access-lists // Show access lists
# sh run | inc [word] // Pipe the running config
# sh run | begin [word] // As above
# sh cdp neighbours // Shows conected equipment
# show policy-map // Shows bandwidth allocation
# interface gi0/0# ip accounting ip-packets // Sets captur for IP address on traffic
# show ip account // show traffic IP for above
File Management
# dir (or dir flash:) // Shows files on internal flash
# dir usbflash0: (dir usb0:) // Shows USB files
# cd flash: // Navigate to Internal flash
# cd usbflash0:/CISCO/IOS // Navigating is case sensitive
# show flash: // Shows Internal flash memory used
# show version // Displays anmount of memory
# mkdir // Creat a Directory
# copy <filename> flash: // Copy file fronm USB to Internal flash
boot system flash:c1841-advsecurityk9-mz.124-15.T11.bin - Sets boot IOS
Flash
format flash: // Deletes all files
delete flash: // Deletes all files
delete [filename]
delete /recursive /force [folder] [filename] // Force deletes all files
rename [filename] [filename]
SYSLOG
(config)# no service config // Suppress TFTP error messages
VTY Lines
password cisco ??
enable secret cisco // Sets enabled password
line console 0 // Sets local console cable access
login
secret cisco // Can use 'password' for plain text
line vty 0 4 // Sets telnet access
login
secret cisco // Can use 'password' for plain text
SSH
username [username] priviledge 15 secret cisco // Sets user and pword for SSH
hostname myrouter // Sets hostname for RSA Keys
ip domain-name router.com // Sets domain name for RSA Keys
crypto key generate rsa general-keys modulus 1024 // Creates RSA Keys
ip ssh version 2 // Turns on SSH
transport input ssh telnet // Sets access for both (can omit one)
login local // Tells SSH to use local username authentication
show ip ssh // Shows status of SSH
who // Shows who's logged in
Interfaces
nterface FastEthernet0/1.100 // Sets sub interface
encapsulation dot1q 100 // Sets interface for VLAN
no int fa0/1.100 // and reload to remove interface
ip address a.b.c.d a.b.c.d (dhcp) // Sets IP address or DHCP
duplex auto / full / half // Sets duplex
speed auto / 10 / 100 // Sets speed
show ip interface brief // Shows IP address information
show interface fa0/1 // Shows port stats
show run interface fa0/1 // Shows config for that port
DHCP
ip dhcp pool pool1 // Creates pool1
network 192.168.1.0 255.255.255.0 // Auto selects fa0/0 with IP range
default-router 192.168.1.1 // Sets default route
dns-server 194.168.4.100 194.168.4.100 // Sets DNS server
domain-name mcarr // Sets domain name
ip dhcp pool pool2 // Sets second pool
network 10.1.1.1 255.255.255.0
default-router 10.1.1.1
dns-server 194.168.4.100 194.168.4.100
domain-name mcarr
!no ip dhcp pool pool2 // Removes pool
ip dhcp pool RESERVED-HOST // set up DHCP reservation
host 192.168.0.2 255.255.255.0
client-identifier 0100.1e8c.bb3e.18
show ip dhcp binding // Shows leased address's
show ip dhcp pool // Shows the DHCP pools
show arp // Shows learned MAC address's
NAT
ip nat inside source list 1 interface fastEthernet 0/0 overload - The NAT command
int fa0/0 > ip nat outside // Sets the outside inteface
int fa0/1.1 > ip nat inside // Sets the inside interface
int fa0/1.20 > ip nat inside // As above
Access Lists
access-list 1 permit 192.168.0.0 0.0.0.255 // Sets the access list for NAT
access-list 1 permit 10.1.1.0 0.0.0.255 // As above
ip nat inside source static tcp 192.168.0.2 5900 interface fa0/0 5900 ↵
// Sets static NAT for incoming connection on port 5900
show ip nat translations
show access-lists
HTTP Server
ip http server // Allows SDM access
ip http secure-server // as above but secure
ip authentication local
Routing
ip route 0.0.0.0 0.0.0.0 fa0/0 // Sets static route
ip routing // Turns on routing
router rip // Enables rip routing
version 2 // Sets rip routing to version 2
network a.b.c.d // Advertises routes for rip
router eigrp 100
no router eigrp 100
show ip route
show ip protocols
Switches
vlan 10 name SALES // Creates VLAN
switchport mode trunk (access) // Sets switchport mode
switchport trunk allowed vlan 1,2,3 // Adds VLANS to switchport
switchport access vlan 2 // Creates vlan on the fly
ip default-gateway 10.1.1.1 // Sets global gateway address of switch
sh int fa0/2 switchport // Shows switchport stats
sh int trunk // Shows trunk ports
sh int status // Shows switch overview
show vlan-switch // overview of switch
PPPoE
//////////// SERVER ////////////////
username CPE password 0 MyPassword
!
bba-group pppoe MyGroup
virtual-template 1
sessions per-mac limit 2
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
pppoe enable group MyGroup
!
interface Virtual-Template1
ip address 10.0.0.1 255.255.255.0
peer default ip address pool MyPool
ppp authentication chap callin
!
ip local pool MyPool 10.0.0.2 10.0.0.254
///////////// CLIENT ///////////////
interface FastEthernet0/0
no ip address
duplex auto
speed auto
pppoe enable
pppoe-client dial-pool-number 1
!
interface Dialer1
mtu 1492
ip address negotiated
encapsulation ppp
dialer pool 1
ppp chap password 0 MyPassword
/////////////// debug ///////////////
# debug ppp authentication
# debug ppp negotiation
# debug pppoe events
# debug pppoe errors
# debug pppoe packet
# u all // undebug all
# clear pppoe all
# clear int dialer 1
# show pppoe session
# show controllers vdsl 0/2/0
# controller vdsl 0
Miscellaneous
ping a.b.c.d repeat 100 // Ping with repeat
show arp vrf VRF_CE_MGMT_VPN // For VRF's
trace a.b.c.d // Like tracert
show file system // Shows file system
show log
sh dsl int atm0 // ADSL