Cisco Router Configuration Tutorial
1. What this document covers
1.1 Reasons for using the command-line
2. Getting started with Cisco
Router>
If it has been previously configured with a hostname, it will look like this:
hostname of router>
2.1 Modes
Router>?
2.2 Unprivileged and privileged modes
Router>show ?
Router>
Router#
Router(arguments)#
3. Configuring your Cisco Router
Router#show interfaces
Router#show ip protocols
Router#show ip route
Router#show ip arp
3.1 Global configuration (config)
Router#config
Router(config)#
As demonstrated above, the prompt changes to indicate the mode that you are now in.
Router(config)#hostname ExampleName
ExampleName(config)#
ExampleName(config)#ip name-server aa.bb.cc.dd
ExampleName(config)#ctrl-Z
ExampleName#
This is also where you set the password for privileged mode.
ExampleName(config)#enable secret examplepassword
ExampleName(config)#ctrl-Z
ExampleName#
ExampleName#
3.2 Configuring Cisco router interfaces
Cisco interface naming is straightforward. Individual interfaces are referred to by this convention:
media type slot#/port#
ExampleName#show interface ethernet 6/2
If your router does not have slots, like a 1600, then the interface name consists only of:
media type port#
ExampleName#show interface serial 0
Here is an example of configuring a serial port with an IP address:
ExampleName#config
ExampleName(config)#interface serial 1/1
ExampleName(config-if)#ip address 192.168.155.2 255.255.255.0
ExampleName(config-if)#no shutdown
ExampleName(config-if)#ctrl-Z
ExampleName#
ExampleName#show interface serial 1/1
ExampleName(config)#interface serial 1/1
ExampleName(config-if)#shutdown
ExampleName(config-if)#ctrl-Z
ExampleName#show interface serial 1/1
ExampleName(config)#interface serail 1/1
ExampleName(config-if)#no ip address 192.168.155.2 255.255.255.0
ExampleName(config-if)ctrl-Z
ExampleName#show interface serial 1/1
3.3 Configuring Cisco Routing
ExampleName(config)#ip routing
ExampleName(config)#ctrl-Z
ExampleName#config
ExampleName(config)#ip route 172.16.0.0 255.255.255.0 192.168.150.1
ExampleName(config)#ctrl-Z
ExampleName#show ip route
ExampleName#config
ExampleName(config)#router rip
ExampleName(config-router)#network aa.bb.cc.dd
ExampleName(config-router)#network ee.ff.gg.hh
ExampleName(config-router)#ctrl-Z
ExampleName#show ip protocols
3.4 Saving your Cisco Router configuration
ExampleName#show running-config
ExampleName#copy running-config startup-config
Your configuration is now saved to non-volatile RAM (NVRAM). Issue the command show startup-config
.
ExampleName#show startup-config
ExampleName#copy startup-config running-config
3.5 Example Cisco Router configuration
- Router>enable
- Router#config
- Router(config)#hostname N115-7206
- N115-7206(config)#interface serial 1/1
- N115-7206(config-if)ip address 192.168.155.2 255.255.255.0
- N115-7206(config-if)no shutdown
- N115-7206(config-if)ctrl-z
- N115-7206#show interface serial 1/1
- N115-7206#config
- N115-7206(config)#interface ethernet 2/3
- N115-7206(config-if)#ip address 192.168.150.90 255.255.255.0
- N115-7206(config-if)#no shutdown
- N115-7206(config-if)#ctrl-z
- N115-7206#show interface ethernet 2/3
- N115-7206#config
- N115-7206(config)#router rip
- N115-7206(config-router)#network 192.168.155.0
- N115-7206(config-router)#network 192.168.150.0
- N115-7206(config-router)#ctrl-z
- N115-7206#show ip protocols
- N115-7206#ping 192.168.150.1
- N115-7206#config
- N115-7206(config)#ip name-server 172.16.0.10
- N115-7206(config)#ctrl-z
- N115-7206#ping archie.au
- N115-7206#config
- N115-7206(config)#enable secret password
- N115-7206(config)#ctrl-z
- N115-7206#copy running-config startup-config
- N115-7206#exit
4. Troubleshooting your Cisco router
ExampleName#show interfaces
ExampleName#show ip protocols
ExampleName#show ip route
ExampleName#show ip arp
4.1 Testing connectivity
ExampleName#ping xx.xx.xx.xx
ExampleName#trace xx.xx.xx.xx