Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
11 views

Basic Cisco Config Router Commands

Uploaded by

mugherisajid110
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Basic Cisco Config Router Commands

Uploaded by

mugherisajid110
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Configuring Global Parameters

To configure the global parameters for your router,


follow these steps.
SUMMARY STEPS
1. configure terminal
2. hostname name
3. enable secret password
4. no ip domain-lookup

DETAILED STEPS

Command Purpose
Step configure terminal Enters global configuration mode, when
1 using the console port.
Example:
Router> enable
Router# configure
terminal
Step hostname name Specifies the name for the router.
2
Example:
Router(config)# hostname
Router
Step enable secret password Specifies an encrypted password to
3 prevent unauthorized access to the router.
Example:
Router(config)# enable
secret cr1ny5ho

Step no ip domain-lookup Disables the router from translating


4 unfamiliar words (typos) into IP addresses.
Example:
Router(config)# no ip
domain-lookup

Configuring Gigabit Ethernet WAN Interfaces


You can connect WAN interfaces either by using straight polarity connectors or
reversed polarity connectors.
 Straight Polarity: If Mag-jack RJ45 connector has a dot or digit marked on
front housing, it can be used with any type of cables.
 Reversed Polarity: If Mag-jack RJ45 connector has no dots or digit marked
on front housing, it can be used with coupler and short cable (Cat5E UTP
cable) to connect other devices which doesn’t support auto polarity
correction.
To configure Gigabit Ethernet (GE) WAN interfaces, follow these steps, beginning
in global configuration mode.

SUMMARY STEPS
1. configure terminal
2. interface (gigabitethernet) (Serial) slot/port
3. ip address ip-address mask
4. no shutdown
5. exit
DETAILED STEPS

Command Purpose

Step configure terminal Enters global configuration mode.


1
Example:
Router# configure terminal

Step interface Enters the configuration mode for a Gigabit


2 gigabitethernet slot/port Ethernet interface on the router.
Example: Note GigabitEthernet WAN Interfaces are 0/8
and 0/9 for Cisco C841M-8X ISR and 0/4 to 0/5
Router(config)# interface
for Cisco C841M-4X
gigabitethernet 0/8

Step ip address ip-address mask Sets the IP address and subnet mask for the
3 specified GE interface.
Example:
Router(config-if)# ip
address 192.168.12.2
255.255.255.0

Step no shutdown Enables the GE interface, changing its state


4 from administratively down to administratively
Example:
up.
Router(config-if)# no shutdown

Step exit Exits configuration mode for the GE interface


5 and returns to global configuration mode.
Example:
Router(config-if)# exit
Configuring a Loopback Interface
The loopback interface acts as a placeholder for the static IP address and provides default
routing information.

To configure a loopback interface, follow these steps, beginning in global configuration mode .

SUMMARY STEPS
1. configure terminal

2. interface type number

3. ip address ip-address mask

4. exit

DETAILED STEPS

Command Purpose

Step configure terminal Enters global configuration mode.


1
Example:

Router# configure terminal

Step interface type number Enters configuration mode for the loopback interface.
2
Example:

Router(config)# interface Loopback


0

Step ip address ip-address mask Sets the IP address and subnet mask for the loopback
3 interface.
Example:

Router(config-if)# ip address
10.108.1.1 255.255.255.0

Step exit Exits configuration mode for the loopback interface


4 and returns to global configuration mode.
Example:

Router(config-if)# exit
Example: Configuring the Loopback Interface

The loopback interface in this sample configuration 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.

!interface loopback 0ip address 200.200.100.1 255.255.255.0ip nat outside!interface Virtual-


Template1ip unnumbered loopback0no ip directed-broadcastip nat outside!

Verifying the Loopback Interface Configuration

To verify that you have properly configured the loopback interface, enter the show interface loopback
command as shown in the following example.

Router# show interface loopback 0Loopback0 is up, line protocol is upHardware is LoopbackInternet
address is 200.200.100.1/24MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,reliability 255/255,
txload 1/255, rxload 1/255Encapsulation LOOPBACK, loopback not setLast input never, output never,
output hang neverLast clearing of "show interface" counters neverQueueing strategy: fifoOutput
queue 0/0, 0 drops; input queue 0/75, 0 drops5 minute input rate 0 bits/sec, 0 packets/sec5 minute
output rate 0 bits/sec, 0 packets/sec0 packets input, 0 bytes, 0 no bufferReceived 0 broadcasts, 0
runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 packets output,
0 bytes, 0 underruns0 output errors, 0 collisions, 0 interface resets0 output buffer failures, 0 output
buffers swapped out

You can lso verify the loopback interface by using the ping command as shown in the following
example.

Router# ping 200.200.100.1Type 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


To configure parameters to control access to the router, perform the following steps.

SUMMARY STEPS
1. configure terminal

2. line [ aux | console | tty | vty ] line-number

3. password password

4. login

5. exec-timeout minutes [ seconds ]

6. line [ aux | console | tty | vty ] line-number


7. password password

8. login

9. end

DETAILED STEPS

Command Purpose

Step configure terminal Enters global configuration mode.


1
Example:

Router# configure terminal

Step line [ aux | console | tty | vty ] line- Enters line configuration mode, and specifies the
2 number type of line.

Example:

Router(config)# line console 0

Step password password Specifies a unique password for the console


3 terminal line.
Example:

Router(config)# password 5dr4Hepw3

Step login Enables password verification at the terminal login


4 session.
Example:

Router(config-line)# login

Step exec-timeout minutes [ seconds ] Sets the interval that the EXEC command interpreter
5 waits until user input is detected. The default is 10
Example:
minutes. You can also optionally add seconds to the
Router(config-line)# exec-timeout 5 interval value.
30

Step line [ aux | console | tty | vty ] line- Specifies a virtual terminal for remote console
6 number access.

Example:

Router(config-line)# line vty 0 4

Step password password Specifies a unique password for the virtual terminal
7 line.

Example:

Router(config-line)# password
aldf2ad1

Step login Enables password verifiation at the virtual terminal


8 login session.
Example:

Router(config-line)# login

Step end Exits line configuration mode, and returns to


9 privileged EXEC mode.
Example:

Router(config-line)# endRouter#

Configuring Gigabit Ethernet LAN Interfaces

To manually configure Gigabit Ethernet (GE) LAN interfaces, follow these steps, beginning in global
configuration mode.

SUMMARY STEPS

1. configure terminal

2. interface gigabitethernet slot/port

3. ip address ip-address mask

4. no shutdown

5. exit

DETAILED STEPS

Command Purpose

Step configure terminal Enters global configuration mode.


1
Example:

Router# configure terminal

Step interface gigabitethernet slot/port Enters the configuration mode for a Gigabit Ethernet
2 interface on the router.
Example:
Note GigabitEthernet LAN Interfaces are 0/0 to 0/7
Router(config)# interface
for Cisco C841M-8X ISR and 0/0 to 0/3 for Cisco
gigabitethernet 0/1
C841M-4X ISR.
Step ip address ip-address mask Sets the IP address and subnet mask for the specified
3 GE interface.
Example:

Router(config-if)# ip
address 192.168.12.2 255.255.255.0

Step no shutdown Enables the GE interface, changing its state from


4 administratively down to administratively up.
Example:

Router(config-if)# no shutdown

Step exit Exits configuration mode for the GE interface and


5 returns to global configuration mode.
Example:

Router(config-if)# exit

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.

To configure static routes, perform these steps in global configuration mode.

SUMMARY STEPS

1. configure terminal

2. ip route prefix mask { ip-address | interface-type interface-number [ ip-address ]}

3. end

DETAILED STEPS

Command Purpose

Step configure terminal Enters global configuration mode.


1
Example:

Router# configure terminal


Step ip route prefix mask { ip-address | interface- Specifies the static route for the IP
2 type interface-number [ ip-address ]} packets.

Example:

Router(config)# ip route 192.168.1.0 255.255.0.0


10.10.10.2

Step end Exits router configuration mode, and


3 enters privileged EXEC mode.
Example:

Router(config)# end

Example: Configuring Static Routes

In the following 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 classless (default)ip route 192.168.1.0 255.255.255.0 10.10.10.2!

Verifying Configuration

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:

Router# show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP
external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1
- OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded
static route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.108.1.0 is directly
connected, Loopback0S* 0.0.0.0/0 is directly connected, FastEthernet0

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” section


 “Configuring Enhanced Interior Gateway Routing Protocol” section

Configuring Routing Information Protocol

To configure the RIP routing protocol on the router, follow these steps, beginning in global configuration
mode.

SUMMARY STEPS

1. configure terminal

2. router rip

3. version { 1 | 2 }

4. network ip-address

5. no auto-summary

6. end

DETAILED STEPS

Command Task

Step configure terminal Enters global configuration mode.


1
Example:

Router> configure
terminal

Step router rip Enters router configuration mode, and enables RIP on the router.
2
Example:

Router(config)# router
rip

Step version { 1 | 2 } Specifies use of RIP version 1 or 2.


3
Example:

Router(config-router)#
version 2

Step network ip-address Specifies a list of networks on which RIP is to be applied, using
4 the address of the network of each directly connected network.
Example:

Router(config-router)#
network 192.168.1.1

Step no auto-summary Disables automatic summarization of subnet routes into


5 network-level routes. This allows subprefix routing information
Example:
to pass across classful network boundaries.
Router(config-router)#
no auto-summary

Step end Exits router configuration mode, and enters privileged EXEC
6 mode.
Example:

Router(config-router)#
end

Example: RIP Configuration

The following configuration example shows RIP version 2 enabled in IP network 10.0.0.0 and
192.168.1.0.

To see this configuration, use the show running-config command from privileged EXEC mode.

Router# show running-configrouter ripversion 2network 10.0.0.0network 192.168.1.0no auto-summary!

Verifying RIP Configuration

To verify that you have properly configured RIP, enter the show ip route command and look for RIP
routes signified by “R” as shown in this example.

Router# show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP
external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1
- OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded
static route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.108.1.0 is directly
connected, Loopback0R 3.0.0.0/8 [120/1] via 2.2.2.1, 00:00:02, Ethernet0/0

Configuring Enhanced Interior Gateway Routing Protocol

To configure Enhanced Interior Gateway Routing Protocol (EGRP), perform these steps.

SUMMARY STEPS

1. configure terminal

2. router eigrp as-number

3. network ip-address

4. end

DETAILED STEPS
Command Purpose

Step configure terminal Enters global configuration mode.


1
Example:

Router> configure
terminal

Step router eigrp as- Enters router configuration mode, and enables EIGRP on the router.
2 number The autonomous-system number identifies the route to other EIGRP
routers and is used to tag the EIGRP information.
Example:

Router(config)#
router eigrp 109

Step network ip-address Specifies a list of networks on which EIGRP is to be applied, using
3 the IP address of the network of directly connected networks.
Example:

Router(config)#
network 192.145.1.0

Step end Exits router configuration mode, and enters privileged EXEC mode.
4
Example:

Router(config-
router)# end

Router#

Example: Configuring EIGRP

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.

To see this configuration use the show running-config command, beginning in privileged EXEC mode.

Router# show running-config...!router eigrp 109network 192.145.1.0network 10.10.12.115!...

Verifying EIGRP Configuration

To verify that you have properly configured EIGRP, enter the show ip route command, and look for EIGRP
routes indicated by “D “ as shown in the following example:

Router# show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP
external, O - OSPF, IA - OSPF inter areaN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1
- OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS
level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded
static route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnetsC 10.108.1.0 is directly
connected, Loopback0D 3.0.0.0/8 [90/409600] via 2.2.2.1, 00:00:02, Ethernet0/0

Configuring Image and Configuration Recovery Using the Push Button

A push or reset button is available on the rear side of the Cisco 800M Series ISR and it is designed to
provide a disaster recovery method for the router.

Push button can be useful for recovery during one of the two scenarios:

 During ROMMON initialization

 For loading a specific configuration file without accessing the router IOS prompt after IOS is up
and running.

Push Button Behavior During ROMMON Initialization

Table 2-1 shows the high level functionality when the push button is pressed during ROMMON
initialization.

Table 2-1 Push Button Functionality During ROMMON Initialization

ROMMON Behavior IOS Behavior

 Boots using default If the configuration named *.cfg is available in NVRAM storage or
baud rate. flash storage, IOS will perform a backup of the original
configuration and boots up using this configuration.
 Performs auto-boot.

 Loads the *.default


image if available on
compact flash

Push Button Behavior When IOS is up and Running

If you press the push button for more than three seconds and then release the push button after IOS is
up and running, IOS detects this event and looks for configuration files in the order of priority.If the IOS
finds the configuration file, it copies the configuration file to the startup configuration file. Then the
router reloads itself and the new configuration takes effect. If the configuration files cannot be found,
pressing reset button has no effect.

The order of priority in which the router looks for configuration file is given as follows:

1. usbflash0:customer-config. SN

2. usbflash0:customer-config

3. flash:customer-config. SN

4. flash:customer-config
Note SN is the hardware serial number.

Configuring 800M Series ISR using Zero Touch Deployment

The Zero Touch Deployment (ZTD) through USB feature in Cisco 800M Series ISRs is an ease-of-use
feature that loads a customized configuration from a USB flash drive. This feature requires that the
router has no startup configuration in its nonvolatile RAM (NVRAM). The feature also requires that a
valid configuration file, with the filename extension.cfg, is stored in the USB flash drive. A valid
configuration file can be created by saving the running configuration of a router to flash, USB flash, or to
a TFTP Server.

When a router with no startup configuration boots up, it checks for a valid configuration file within the
USB flash drive. The pre-requisites for deployment using the Zero Touch Deployment through USB
feature are:

 Boot up router with no startup-configuration.

 Cisco USB flash drive inserted in the first available USB slot.

 A valid configuration file in ASCII text with the filename extension.cfg

If the USB flash drive has multiple.cfg files, the router chooses the one with the highest index number in
the USB Flash drive. To avoid loading an incorrect.cfg file, ensure that there is only one.cfg file in the USB
flash drive.

The Cisco 800M Series ISR uses second core and it is actively used in detecting USB flash drive if 3G
Wireless WAN module is present on the router. If 3G Wireless WAN module is not present, USB flash
drive is detected by the IOS. When 3G Wireless WAN module is present, USB detection is a bit delayed
for the Cisco 800M series ISR due to the delay in second core initialization. While system startup is in
progress and push button is pressed, a timer is started to check the completion of second core
initialization. For some reason if second core takes more time, system reports an error message and
continues the normal start up. After second core initialization router waits up to 10 seconds for USB
detection and then complete the configuration. In case the USB flash drive does not contain a
deployment configuration, router enters the configuration mode.

You might also like