Cisco Notes
Basic Useful Router Commands:
Router>enable
Router#config terminal
Router(config)#hostname R1
R1(config)#banner motd #Authorized access only! Updated last April 2009#
R1(config)#no ip domain-lookup <!--Note: Stops auto domain translation-->
R1(config)#enable password password
R1(config)#enable secret secretpassword
R1(config)#line console 0
R1(config-line)#password password
R1(config-line)#login
R1(config-line)#exit
R1(config)#line vty 0 4
R1(config)#int fa 0/0
R1(config-int)#ip add 192.168.0.1 255.255.255.0
R1(config-int)#no shut
R1(config-int)#exit
R1(config)#int s 0/0/0
R1(config-int)#ip add 192.168.1.1 255.255.255.252
R1(config-int)#clock rate 56000
R1(config)#int vlan 1 <!--Note: Fast ethernet Interfaces 0 to 3 are assigned to vlan 1 by default-->
R1(config-int)#ip add 192.168.10.1 255.255.255.0
R1#(config)#int loopback 0
R1(config-int)#ip add 192.168.2.1 255.255.255.0
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#network 192.168.0.0
R1(config-router)#network 192.168.1.0
R1(config-router)#default-information originate <!--Note: Router distributes default route to other routers-->
R1(config-router)#no auto-summary <!--Note: Rip Version 2 has auto-summary activated at default setting-->
R1(config-router)#exit
R1(config)#ip host R1 192.168.0.1 192.168.1.1 <!--Note: Adds routes to router table -->
R1(config)#copy run start
R1(config)#exit
R1#show ip route
R1#show ip protocol
R1#show ip interface brief
R1#debug ip rip
R1#undebug all
R1#
Using Dynamic Host Configuration Protocol
R1(config)#ip dhcp pool poolname
R1(dhcp-config)#network 192.168.3.0 255.255.255.0
R1(dhcp-config)#domain-name mydomain.com
R1(dhcp-config)#dns-server 192.168.1.1
R1(dhcp-config)#netbios-name-server 192.168.1.1
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10
Using static routes:
R1(config)#ip route (destination network) (subnet mask) (interface address/name)
R1(config)#ip route 172.16.1.0 255.255.255.0 s 0/0/2
R1(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.1
R1(config)# 0.0.0.0 0.0.0.0 s 0/0/2 <!--Note: This is the format for a default route-->
Using EIGRP
R1(config)#router eigrp 1 <!--Note: Use the same autonomous system number for same network devices-->
R1(config-router)#network 192.168.0.1 0.0.0.255
R1(config-router)#metric weights 0 1 0 1 0 0
R1(config-router)#no auto-summary <!--Note: Auto-summary is on by default; used to disable it-->
R1(config-router)#ip summary-address eigrp 1 192.168.0.0 255.255.252.0
R1(config)#int loopback 1
R1(config-int)#ip add 192.168.4.1 255.255.255.0
R1(config-int)#bandwidth 64 <!--Note: Change bandwidth setting of interface (in kilobits)-->
R1(config-int)#ip bandwidth-percent eigrp 1 50 <!--Note: Percentage of bandwidth to be used by interface-->
R1(config-int)#ip hello-interval eigrp 1 60 <!--Note: hello interval in seconds-->
R1(config-int)#ip hold-time eigrp 1 180 <!--Note: hold time interval in seconds-->
R1(config)#ip route 0.0.0.0 0.0.0.0 loopback 1
R1(config)#router eigrp 1
R1(config-router)#redistribute static <!--Note: required by static default route to distribute route in updates-->
R1#show ip eigrp neighbors
R1#show interfaces
R1#debug eigrp fsm
Using IGRP
R1(config)#router igrp 100 <!--Note: Use the same autonomous system number for same network devices-->
R1(config-router)#network 192.168.0.1 0.0.0.3 <!--Note: Used to specify a subnet using the wildcard mask-->
Setting up a Vlan using switches:
Switch1:
Fa 1 -> Vlan 1
Fa 2 -> Vlan 2
Switch 2:
Fa 1 -> Vlan 3
Switch1#conf t
Switch1(config)#vlan 1
Switch1(config-vlan)#name Writers
Switch1(config-vlan)#exit
Switch1(config)#vlan 2
Switch1(config-vlan)#name Editors
Switch1(config)#int fa 1
Switch1(config-int)#switchport mode access
Switch1(config-int)#switchport access vlan 1
Switch1(config-int)#exit
Switch1(config)#int fa 2
Switch1(config-int)#switchport access vlan 2
Switch1(config)#int fa 12
Switch1(config-int)#switchport mode trunk
Switch1(config-int)#switchport trunk encapsulation trunk1
Switch2#conf t
Switch2(config)#vlan 2
Switch2(config-vlan)#name Editors
Switch2(config-vlan)#exit
Switch2(config)#vlan 3
Switch2(config-vlan)#name Proofreaders
Switch2(config)#int fa 1
Switch2(config-int)#switchport mode access
Switch2(config-int)#switchport access vlan3
Switch2(config-int)#exit
Switch2(config)#int fa 2
Switch2(config-int)#switchport access vlan 2
Switch2(config)#int fa 12
Switch2(config-int)#switchport mode trunk
Switch2(config-int)#switchport trunk encapsulation trunk1