Sunday, April 30, 2017
Cisco router command
Cisco router command
Cisco Router Command Reference
Here is my own notes I have had as a word doc for several years. Its a basic reference for Cisco router commands.
BASIC DEVICE COMMANDS
Show Running Configuration File
>show running-config
Show Startup Configuration File (NVRAM)
>show startup-config
Show Flash Memory Information
>show flash
Show Command History
>show history
Copy Changes from Running Config to the Startup Config
#copy running-config startup-config
Show Version (Platform Type / OS Revision / Last Boot / Memory / Interfaces /Conf Register)
>show version
Show Devices Clock (Time/Date)
>show clock
Show Users Connected to Device
>show users
DEVICE SECURITY
Set password exec & non-exec (console / aux / telnet)
>enable
#configure terminal
#enable password EnablePass1
#line console 0
#login
#password ConsolePass1
#exit
#line aux 0
#login
#password AuxPass1
#exit
#line vty 0 4
#login
#password TelnetPass1
#exit
Set Secret Password (recommended method)
>enable
#configure terminal
#enable secret EnableSecret1
#exit
BASIC SETINGS
Set a Warning Banner For Login Prompt
>enable
#configure terminal
#banner motd &
#banner line1
#banner line2 &
#exit
Set hostname
>enable
#configure terminal
#hostname router1
#prompt router01
#exit
SAVING AND RESTORING CONFIGURATIONS
?Save Running Config to Startup Config
?#copy running-configuration startup-configuration
?Save Running Config to a Remote TFTP Server
?#copy running-configuration tftp
?<enter IP>
?<enter filename>
?Save Config From Remote TFTP Server to the Running Config
?#copy tftp running-configuration
?<enter IP>
?<enter filename>
?Erase NVRAM
?#erase nvram
INTERFACE COMAMNDS
Show Summary of All Interfaces (IP & Status)
>show ip interface brief
Show Detailed Interface Information (All Interfaces)
>show interfaces
Show Detailed Interface Information (Single Interface)
>show interfaces serial 0
Show Detailed Interface Protocol Information (Single Interface)
>show ip interface serial 0
Show Status of Interface Layer 3 Protocols
>show protocols
Show Information About IP Routing Protocols
>show ip protocols
Show IP Routes (Interfaces that are routing)
>show ip route
Show Cached Hosts List
>show hosts
Set description for an interface
>enable
#configure terminal
#interface serial 0
#description this is the serial0 link to router2
#exit
Configure an IP for an interface
#configure terminal
#interface Ethernet 0
#ip address 10.1.1.251 255.255.255.0
#exit
Enable an Interface
#configure terminal
#interface Ethernet 0
#no shutdown
#exit
Disable an Interface (Administratively Down)
#configure terminal
#interface Serial 1
#shutdown
#exit
SERIAL INTERFACES
Set Serial Interface Clock Rate (DCE Cable � Data Circuit-Terminating Equipment)
R1#configure terminal
R1#interface serial 0
R1#clock rate 56000
R1#no shut
R2#configure terminal
R2#interface serial 0
R2#no shut
Set Serial Interface Bandwidth and Clock Rate
#configure terminal
#interface serial 0
#bandwidth 64
#clock rate 64000
#exit
LOOPBACK INTERFACES
Create a Loopback Interface and Set the IP Address and Mask
R1#configure terminal
R1#interface loopback 0
R1#ip address 10.1.100.1 255.255.255.0
R1#no shut
CDP (Cisco Discovery Protocol)
Show CDP General Information
>show cdp
Show CDP Interface Information
>show cdp interface
Show CDP Neighbors
>show cdp neighbors
Show CDP Neighbors Detail
>show cdp neighbors detail
Show Specific CDP Entry Details
>show cdp entry R4
Set / Adjust the Time between CDP Updates
#configure terminal
(config)#cdp timer 45
Set / Adjust the CDP Information Hold Time
#configure terminal
(config)#cdp holdtime 60
Disable CDP on the Entire Router
#configure terminal
(config)#no cdp run
Enable CDP on the Entire Router
#configure terminal
(config)#cdp run
Disable CDP on an Interface
#configure terminal
(config)#interface Ethernet 0
(config-if)#no cdp run
Enable CDP on an Interface
#configure terminal
(config)#interface Ethernet 0
(config-if)#cdp run
ARP
Show ARP Table
>show arp
Clear ARP Table
#clear arp
TELNET
Telnet to another Device
>telnet 10.1.1.2
password: ****
Show Sessions
>show sessions
Disconnect from a session
>disconnect 1
Setup to Allow Telnet Logins
#conf term
(config)#line vty 0 4
(config-line)#login
(config-line)#password Pass1
HOSTS TABLE
?Add an Entry to the Hosts Table
#conf term
(config)#ip host California 192.168.10.1
STATIC ROUTING
?Show IP Routes (S = Static)
?>show ip route
?
?Add a Static Route
?#conf term
?#ip route 10.1.1.0 255.255.255.0 192.168.10.1
Remove a Static Route
?#conf term
?#no ip route 10.1.1.0 255.255.255.0 192.168.10.1
DEFAULT ROUTING
?Show IP Routes (S = Static * = Default Candidate)
?>show ip route
?
?Add a Default Route
?#conf term
?#ip route 0.0.0.0 0.0.0.0 192.168.10.1
Remove a Default Route
?#conf term
?#no ip route 0.0.0.0 0.0.0.0 192.168.10.1
RIP (Routing Information Protocol)
Uses UDP port 520
?
Show IP Routes (R = RIP)
?>show ip route
Show Information About IP Routing Protocols
>show ip protocols
?Enable RIP
?#conf term
?#router rip
?Disable RIP
?#conf term
?#no router rip
?Add a Network for RIP Advertisements/Receives (Delay <30secs)
?#conf term
?#router rip
?#network 10.0.0.0
Remove a Network from RIP Advertisements/Receives
?#conf term
?#router rip
?#no network 10.0.0.0
?Turn on RIP Debugging
?#debug ip rip
Turn off RIP Debugging
?#no debug ip rip
Clear and Re-Create IP Routing Table
?#clear ip route *
IGRP (Interior Gateway Routing Protocol)
Show IP Routes (I = IGRP)
?>show ip route
Show Information About IP Routing Protocols
>show ip protocols
?Enable IGRP
?#conf term
?#router igrp 100
?Add Networks Directly Connected to Router for IGRP Routing
#conf term
?#router igrp 100
?#network 10.0.0.0
Remove Networks Directly Connected to Router for IGRP Routing
#conf term
?#router igrp 100
?#no network 10.0.0.0
EIGRP (Enhanced Interior Gateway Routing Protocol)
Show IP Routes (D = EIGRP)
?>show ip route
Show Information About IP Routing Protocols
>show ip protocols
Show EIGRP Neighbours
>show ip eigrp neighbours
Show EIGRP Traffic, Shows EIGRP Packet Types Sent and Recieved
>show ip eigrp traffic
?Enable EGRP 100
?#conf term
?#router eigrp 100
?Add Networks Directly Connected to Router for EIGRP Routing
#conf term
?#router eigrp 100
?#network 10.0.0.0
Remove Networks Directly Connected to Router for EIGRP Routing
#conf term
?#router eigrp 100
?#no network 10.0.0.0
OSPF (Open Shortest Path First) Routing
Show Routing Table (O = OSPF)
>show ip route
Show Routing Protocol Information
>show ip protocols
Show the OSPF Database
>show ip ospf database
Show OSPF Neighbours
>show ip ospf neighbour
Show Interfaces Running OSPF � Detailed Information
>show ip ospf interface
Configure OSPF Routing and Set the Process Number
R1#conf term
R1(config)#router ospf 100
R2#conf term
R2(config)#router ospf 100
R3#conf term
R3(config)#router ospf 100
Configure Networks that the Router is Connected to
R1#conf term
R1(config)#router ospf 100
R1(config-router)#network 10.1.20.0 0.0.0.255 area 0
R1(config-router)#network 192.16.1.0 0.0.255.255 area 0
R2#conf term
R2(config)#router ospf 100
R2(config-router)#network 10.1.20.0 0.0.0.255 area 0
R3#conf term
R3(config)#router ospf 100
R3(config-router)#network 192.16.1.0 0.0.255.255 area 0
PPP (Point-to-Point Protocol)
With CHAP Authentication (Challenge-Handshake Authentication Protocol)
R1
Set the Enable Secret on R1
R1#conf term
R1#enable secret secretPassR1
Create a User on R1 with Same Password as R2�s Enable Secret
R1#username R2 password secretPassR2
Set an IP and Enable the Serial Interface on R1
R1#interface serial 0
R1#ip address 10.1.0.1 255.255.255.0
R1#no shutdown
Set Encapsulation for the Serial Interface to PPP on R1
R1#encapsulation ppp
Set PPP Authentication to CHAP for the Serial Interface on R1
R1#ppp authentication chap
R2
Set the Enable Secret on R2
R2#conf term
R2#enable secret secretPassR2
Create a User on R2 with Same Password as R1�s Enable Secret
R1#username R1 password secretPassR1
Set an IP and Enable the Serial Interface on R2
R2#interface serial 0
R2#ip address 10.1.0.2 255.255.255.0
R2#no shutdown
Set Encapsulation for the Serial Interface to PPP on R2
R2#encapsulation ppp
Set PPP Authentication to CHAP for the Serial Interface on R2
R2#ppp authentication chap
Show Serial Interface Details including Encapsulation Type
>show interfaces serial 0
Without CHAP Authentication
R1
Set an IP and Enable the Serial Interface on R1
R1#conf term
R1#interface serial 0
R1#ip address 10.1.0.1 255.255.255.0
R1#no shutdown
Set Encapsulation for the Serial Interface to PPP on R1
R1#encapsulation ppp
R2
Set an IP and Enable the Serial Interface on R2
R2#conf term
R2#interface serial 0
R2#ip address 10.1.0.2 255.255.255.0
R2#no shutdown
Set Encapsulation for the Serial Interface to PPP on R2
R2#encapsulation ppp
Show Serial Interface Details including Encapsulation Type
>show interfaces serial 0
ISDN (Integrated Services Digital Network)
?Show ISDN Status (Check Layer1 = Active, Layer2 = Multi-Frame Established)
?>show isdn status
?Show ISDN Interface Information
?>show interface bri 0
Specify the ISDN Switch Type
#conf term
?#isdn switch-type basic-ni
?
?Set the SPID for the Interface
?#interface bri 0
?#isdn spid1 32177820010100
?Set the Dialler String on the Interface to Establish Layer 3
?#interface bri 0
?#dialer string 7782002
?Setup a Dialer-list to Permit All IP Traffic
?#dialer-list 1 protocol ip permit
ISDN BRI-BRI using Legacy DDR (Dial on Demand Routing)
?Show ISDN Status (Check Layer1 = Active, Layer2 = Multi-Frame Established)
?>show isdn status
?Configure ISDN BRI-BRI using Legacy DDR
?R1(config)#isdn switch-type basic-ni
R1(config)#dialer-list 1 protocol ip permit
R1(config)#username R2 password cisco
R1(config)#interface bri0
R1(config-if)#encapsulation ppp
R1(config-if)#ip address 200.10.1.1 255.255.255.0
R1(config-if)#isdn spid1 32177820010100
R1(config-if)#dialer-group 1
R1(config-if)#dialer map ip 200.10.1.2 name R2 broadcast 7782001
R1(config-if)#ppp authentication chap
R1(config-if)#no shut
R2(config)#isdn switch-type basic-ni
R2(config)#dialer-list 1 protocol ip permit
R2(config)#username R1 password cisco
R2(config)#interface bri0
R2(config-if)#encapsulation ppp
R2(config-if)#ip address 200.10.1.1 255.255.255.0
R2(config-if)#isdn spid1 32177820020100
R2(config-if)#dialer-group 1
R2(config-if)#dialer map ip 200.10.1.1 name R1 broadcast 7782002
R2(config-if)#ppp authentication chap
R2(config-if)#no shut
ISDN BRI-BRI using Dialer Profiles
?Show ISDN Status (Check Layer1 = Active, Layer2 = Multi-Frame Established)
?>show isdn status
?Configure ISDN BRI-BRI using Dialer Profiles
?R1(config)#isdn switch-type basic-ni
R1(config)#dialer-list 1 protocol ip permit
R1(config)#username R2 password cisco
R1(config)#int bri0
R1(config-if)#encap ppp
R1(config-if)#ppp authentication chap
R1(config-if)#isdn spid1 32177820010100
R1(config-if)#dialer pool-member 1
R1(config-if)#no shut
R1(config-if)#int dialer 1
R1(config-if)#no shut
R1(config-if)#ip address 200.10.1.1 255.255.255.0
R1(config-if)#encap ppp
R1(config-if)#dialer-group 1
R1(config-if)#dialer pool 1
R1(config-if)#dialer remote-name R2
R1(config-if)#dilaer string 7782001
R1(config-if)#ppp authentication chap
R2(config)#isdn switch-type basic-ni
R2(config)#dialer-list 1 protocol ip permit
R2(config)#username R1 password cisco
R2(config)#int bri0
R2(config-if)#encap ppp
R2(config-if)#ppp authentication chap
R2(config-if)#isdn spid1 32177820020100
R2(config-if)#dialer pool-member 1
R2(config-if)#no shut
R2(config-if)#int dialer 1
R2(config-if)#no shut
R2(config-if)#ip address 200.10.1.2 255.255.255.0
R2(config-if)#encap ppp
R2(config-if)#dialer-group 1
R2(config-if)#dialer pool 1
R2(config-if)#dialer remote-name R1
R2(config-if)#dilaer string 7782002
R2(config-if)#ppp authentication chap
ISDN PRI using Dialer Profiles
?Show ISDN Status (Check Layer1 = Active, Layer2 = Multi-Frame Established)
?>show isdn status
?Configure ISDN PRI using Dialer Profiles
?R1(config)#isdn switch-type basic-ni
R1(config)#dialer-list 1 protocol ip permit
R1(config)#username R2 password cisco
R1(config)#interface bri0
R1(config-if)#encap ppp
R1(config-if)#ppp authentication chap
R1(config-if)#isdn spid1 32177820010100
R1(config-if)#dialer pool-member 1
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment