All the show
commands a available in the current mode. Definitely try out the following commands:
Router#show interfaces
Router#show ip protocols
Router#show ipv6 protocols
Router#show ip route
Router#show ipv6 route
Router#show ip arp
Router#show ipv6 neighbors
Global configuration (config)
In the parent mode, you issue the command
config
.
Router#config
Router(config)#
You do this in configuration mode with the hostname
command.
Router(config)#hostname ExampleName
ExampleName(config)#
Another useful command issued from config mode is the command to designate the DNS server to be used by the router:
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#
Until you hit ctrl-Z
(or type exit
until you reach parent mode) your command has not been put into affect. You can enter config mode, issue several different commands, then hit ctrl-Z
to activate them all. Each time you hit ctrl-Z
you return to parent mode and the prompt:
ExampleName#
Configuring Cisco router interfaces
Cisco interface naming is straightforward. Individual interfaces are referred to by this convention:
media type slot#/port#
Therefor, to display the configuration of that interface you use the command:
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#
For example:
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)#ipv6 address fe80::230:1bff:fe80:b8ea/64
ExampleName(config-if)#ipv6 enable
ExampleName(config-if)#no shutdown
ExampleName(config-if)#ctrl-Z
ExampleName#
Then to verify configuration:
ExampleName#show interface serial 1/1
Configuring Cisco Routing
IP routing is automatically enabled on Cisco routers. If it has been previously disabled on your router, you turn it back on in config mode with the command ip routing.
ExampleName(config)#ip routing
ExampleName(config)#ctrl-Z
To enable IPv6 routing, use the command ipv6 unicast-routing.
ExampleName(config)#ipv6 unicast-routing
ExampleName(config)#ctrl-Z
There are two main ways a router knows where to send packets. The administrator can assign static routes, or the router can learn routes by employing a dynamic routing protocol.
In the Cisco IOS this is done with the ip route
and ipv6 route commands.
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)#ipv6 route fe80::230:1bff:fe80::/64 fe80::230:1bff:fe80::1
ExampleName(config)#ctrl-Z
ExampleName#show ipv6 route
Saving your Cisco Router configuration
If you turned the router off right now, and turned it on again, you would have to start configuration over again. Your running configuration is not saved to any perminent storage media. You can see this configuration with the command show running-config
.
ExampleName#show running-config
You do want to save your successful running configuration. Issue the command copy running-config startup-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
Now any time you need to return your router to that configuration, issue the command copy startup-config running-config
.
ExampleName#copy startup-config running-config
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)ipv6 address fe80::230:1bff:fe80:b8ea/64
- N115-7206(config-if)ipv6 enable
- 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)#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
You are already familiar with the show
commands, both specific commands and how to learn what other show
commands are available. Some of the most basic, most useful commands you will use for troubleshooting are:
Router#show interfaces
Router#show ip protocols
Router#show ipv6 protocols
Router#show ip route
Router#show ipv6 route
Router#show ip arp
Router#show ipv6 neighbors
References