Basic Router Configuration
This chapter provides configuration procedures for Cisco 900 series integrated services routers (ISRs). It also includes configuration examples and verification steps whenever possible. This chapter contains the following topics:
Basic Configuration
Interface Configuration
Routing Configuration
Default Configuration
When you boot up your Cisco router for the first time, you notice some basic configuration has already been performed. Use the show running-config command to view the initial configuration, as shown in the following example.
Router# show running-config
Building configuration...
Current configuration : 1087 bytes
! No configuration change since last restart
! NVRAM config last updated at 06:11:03 UTC Mon Sep 17 2018
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
multilink bundle-name authenticated
license udi pid C921J-4P sn PSZ22241C1T
interface GigabitEthernet0
interface GigabitEthernet1
interface GigabitEthernet2
interface GigabitEthernet3
interface GigabitEthernet4
interface GigabitEthernet5
ip address 9.6.12.137 255.255.0.0
ip route 202.153.144.25 255.255.255.255 9.6.0.1
scheduler allocate 20000 1000
Configuring Global Parameters
This example shows how to configure router global parameters. By configuring global parameters, you specify a name for the router, an encrypted password to prevent unauthorized access to the router, and disables the router from translating unfamiliar words (typos) into IP addresses.
Router# configure terminal
Router(config)# hostname Router
Router(config)# enable secret pass123
Router(config)# no ip domain-lookup
For complete information on global parameter commands, see the Cisco IOS Release configuration guide documentation set.
Configuring I/O Memory Allocation
To reallocate the percentage of DRAM in use for I/O memory and processor memory on Cisco 900 series ISR routers, use the memory-size iomem i/o-memory-percentage command in global configuration mode. To revert to the default memory allocation, use the no form of this command. This procedure enables smartinit.
|
|
i/o-memory-percentage |
The percentage of DRAM allocated to I/O memory. The values permitted are 5, 10, 15, 20, and 25. A minimum of 50 MB of memory is required for I/O memory. |
When you specify the percentage of I/O memory in the command line, the processor memory automatically acquires the remaining percentage of DRAM memory.
This example shows how to allocate 25% of the DRAM memory to I/O memory and the remaining 75% to processor memory:
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# memory-size iomem 5
IO memory size too small: minimum IO memory size is 201M
Router(config)# memory-size iomem ?
<5-25> percentage of DRAM to use for I/O memory: 5, 10, 15, 20, 25
Router(config)# memory-size iomem 25
Smart-init will be disabled and new I/O memory size will take effect upon reload.
Verifying IOMEM Setting
Building configuration...
Current configuration : 1087 bytes
! No configuration change since last restart
! NVRAM config last updated at 06:11:03 UTC Mon Sep 17 2018
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
Interface Ports
Table 3-1 lists the interfaces that are supported on Cisco 900 series integrated services routers.
Table 3-1 Interfaces by Cisco Router
Slots, Ports, Logical Interface, Interfaces
|
|
|
|
Onboard GE Switch ports |
Gi0,Gi1,Gi2,Gi3 |
Gi0,Gi1,Gi2,Gi3 |
Gi0,Gi1,Gi2,Gi3 |
Onboard GE WAN ports |
Gi4,Gi5 |
Gi4,Gi5 |
Gi4,Gi5 |
USB |
usbflash0 |
usbflash0 |
usbflash0 |
Configuring Gigabit Ethernet Interfaces
This example shows how to configure the onboard Gigabit Ethernet (GE) interfaces:
Router# configure terminal
Router(config)# interface gigabitethernet 4
Router(config-if)# ip address 192.168.12.2 255.255.255.0
Router(config-if)# no shutdown
Note Switch ports support Auto, Full, and Half Duplex. WAN ports support only Full Duplex.
Use show interface command to verify the interface configuration. The following example shows the output for the switch port:
Router#show interfaces gig0
GigabitEthernet0 is up, line protocol is up
Hardware is Gigabit Ethernet, address is 7872.5dab.fe73 (bia 7872.5dab.fe73)
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
86738 packets output, 9316451 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
The following example shows the output for the WAN port:
Router#show interfaces gig5
GigabitEthernet5 is administratively down, line protocol is down
Hardware is iGbE, address is 7872.5dab.fe75 (bia 7872.5dab.fe75)
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Auto Duplex, Auto Speed, media type is RJ45
output flow-control is XON, input flow-control is XON
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
1 lost carrier, 0 no carrier, 0 pause output
0 output buffer failures, 0 output buffers swapped out
Configuring a Loopback Interface
The loopback interface acts as a placeholder for the static IP address and provides default routing information.
This example shows how loopback interface is used to support Network Address Translation (NAT) on the virtual-template interface. This configuration example shows the loopback interface configured on the gigabit ethernet interface with an IP address of 200.200.100.1/24, which acts as a static IP address. The loopback interface points back to virtual-template1, which has a negotiated IP address.
ip address 200.200.100.1 255.255.255.0 (static IP address)
interface Virtual-Template1
To verify that you have properly configured the loopback interface, enter the show interface loopback command. You should see verification output similar to the following example.
Router# show interface loopback 0
Loopback0 is up, line protocol is up
Internet address is 200.200.100.1/24
MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation LOOPBACK, loopback not set
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Output queue 0/0, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out
Another way to verify the loopback interface is to ping it:
Router# ping 200.200.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 200.200.100.1, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
Configuring Command-Line Access
The TTY lines are asynchronous lines used for inbound or outbound modem and terminal connections and can be seen in a router or access server configuration as line x. The specific line numbers are a function of the hardware built into or installed on the router or access server. In Cisco 900 series routers, the TTY lines are incremented by 1 and start with line number3.
This example shows the command-line access commands. You do not need to input the commands marked “default.” These commands appear automatically in the configuration file generated when you use the show running-config command.
transport input none (default)
Configuring Static Routes
Static routes provide fixed routing paths through the network. They are manually configured on the router. If the network topology changes, the static route must be updated with a new route. Static routes are private routes unless they are redistributed by a routing protocol.
In this configuration example, the static route sends out all IP packets with a destination IP address of 192.168.1.0 and a subnet mask of 255.255.255.0 on the Gigabit Ethernet interface to another device with an IP address of 10.10.10.2. Specifically, the packets are sent to the configured PVC.
You do not need to enter the command marked “(default).” This command appears automatically in the configuration file generated when you use the show running-config command.
ip route 192.168.1.0 255.255.255.0 10.10.10.2
To verify that you have properly configured static routing, enter the show ip route command and look for static routes signified by the “S.”
You should see verification output similar to the following:
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.108.1.0 is directly connected, Loopback0
S* 0.0.0.0/0 is directly connected, gigabitethernet0
Configuring Dynamic Routes
In dynamic routing, the network protocol adjusts the path automatically, based on network traffic or topology. Changes in dynamic routes are shared with other routers in the network.
The Cisco routers can use IP routing protocols, such as Routing Information Protocol (RIP) or Enhanced Interior Gateway Routing Protocol (EIGRP), to learn routes dynamically. You can configure either of these routing protocols on your router.
Configuring Routing Information Protocol
This configuration example shows RIP version 2 enabled in IP network 10.0.0.0 and 192.168.1.0.
Router> configure terminal
Router(config)# router rip
Router(config-router)# version 2
Router(config-router)# network 192.168.1.1
Router(config-router)# network 10.10.7.1
Router(config-router)# no auto-summary
Router(config-router)# end
To verify that you have properly configured RIP, enter the show ip route command and look for RIP routes signified by “R”. You should see a verification output like the example shown below.
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.108.1.0 is directly connected, Loopback0
R 3.0.0.0/8 [120/1] via 2.2.2.1, 00:00:02, Ethernet0/0
Configuring Enhanced Interior Gateway Routing Protocol
This configuration example shows the EIGRP routing protocol enabled in IP networks 192.145.1.0 and 10.10.12.115. The EIGRP autonomous system number is 109.
Router> configure terminal
Router(config)# router eigrp 109
Router(config)# network 192.145.1.0
Router(config)# network 10.10.12.115
Router(config-router)# end
To verify that you have properly configured IP EIGRP, enter the show ip route command, and look for EIGRP routes indicated by “D”. You should see verification output similar to the following:
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.108.1.0 is directly connected, Loopback0
D 3.0.0.0/8 [90/409600] via 2.2.2.1, 00:00:02, Ethernet0/0