You are on page 1of 41

Introduction to the Cisco IOS

In this chapter, youll learn how to configure a Cisco IOS router using both the initial setup mode and the Cisco IOS command-line interface (CLI). Through the IOS interface, you can configure passwords, banners, and more. Youll also learn the basics of router configurations in this chapter
2006 Glcat,Zyuanli,. All rights reserved.

Cisco Router IOS


Carrying network protocols and functions Connecting high-speed traffic between devices Adding security to control access and stop unauthorized network use Providing scalability for ease of network growth and redundancy Supplying network reliability for connecting to network resources
2006 Glcat,Zyuanli,. All rights reserved.

Connecting to a Cisco Router

2006 Glcat,Zyuanli,. All rights reserved.

2006 Glcat,Zyuanli,. All rights reserved.

2006 Glcat,Zyuanli,. All rights reserved.

Bringing Up a Routers
power-on self-test (POST) load the Cisco IOS from flash memory IOS loads and looks for a valid configuration(stored by default in nonvolatile RAM, or NVRAM)

2006 Glcat,Zyuanli,. All rights reserved.

Setup Mode
You have two options when using setup mode: Basic Management and Extended Setup. Basic Management only gives you enough configurations to allow connectivity to the router, but Extended Setup gives you the power to configure some global parameters as well as interface configuration parameters. To enter setup mode, just say yes or y to the following question:
2006 Glcat,Zyuanli,. All rights reserved.

--- System Configuration Dialog -- Would you like to enter the initial configuration dialog? [yes/no]:y At any point you may enter a question mark '?' for help.Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'.
2006 Glcat,Zyuanli,. All rights reserved.

Command-Line Interface
the command-line interface (CLI) truly is the best way to configure a router. I sometimes refer to the CLI as Cash Line Interface because if you can create advanced configurations on Cisco routers and switches using the CLI, then youll get the cash!
2006 Glcat,Zyuanli,. All rights reserved.

Logging into the Router


After the interface status messages appear and you press Enter, the Router> prompt will appear. This is called user exec mode (user mode) and its mostly used to view statistics, but its also a stepping-stone to logging into privileged mode. You can only view and change the configuration of a Cisco router in privileged exec mode (privileged mode), which you get into with the enable command.
2006 Glcat,Zyuanli,. All rights reserved.

10

Router> Router>enable Router#

2006 Glcat,Zyuanli,. All rights reserved.

11

CLI Prompts
Router> User mode disenable config t decompressed Flash(IOS) RAM
Router(config)#

enable

Router# Privileged mode exit end or ctrl+z

Global configuration mode Interfice exit

copy

decompressed NVRAM

Interface configuration mode Router(config-if)# Router(config-subif)#

2006 Glcat,Zyuanli,. All rights reserved.

12

Router and Switch Administrative Functions

Hostnames Banners Password Interface descriptions

2006 Glcat,Zyuanli,. All rights reserved.

13

Hostnames
Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname Todd Todd(config)#hostname Atlanta Atlanta(config)# See here:
2006 Glcat,Zyuanli,. All rights reserved.

14

Banners

A banner is more than just a little cool one very good reason for having a banner is to give any and all who dare attempt to telnet or dial into your internetwork a little security notice.

2006 Glcat,Zyuanli,. All rights reserved.

15

four available banner types

exec process creation banner incoming terminal line banner login banner message of the day banner

2006 Glcat,Zyuanli,. All rights reserved.

16

Message of the day (MOTD) is the most extensively used banner. It gives a message to every person dialing into or connecting to the router via Telnet or auxiliary port, or even through a console port See here:
2006 Glcat,Zyuanli,. All rights reserved.

17

Setting Passwords
There are five passwords used to secure your Cisco routers:
console Auxiliary telnet (VTY) enable password enable secret.

2006 Glcat,Zyuanli,. All rights reserved.

18

Enable Passwords

Console and Auxiliary used to set your enable password thats used to secure privileged mode. This will prompt a user for a password when the enable command is used.

2006 Glcat,Zyuanli,. All rights reserved.

19

example of setting the enable passwords:


Router(config)#enable secret todd Router(config)#enable password todd The enable password you have chosen is the same as your enable secret. This is not recommended. Re-enter the enable password. See here:
2006 Glcat,Zyuanli,. All rights reserved.

20

User-mode passwords
Router(config)#line ? <0-70> First Line number aux Auxiliary line console Primary terminal line tty Terminal controller vty Virtual terminal x/y Slot/Port for Modems
2006 Glcat,Zyuanli,. All rights reserved.

21

aux Sets the user-mode password for the auxiliary port. console Sets a console user-mode password. vty Sets a Telnet password on the router.

2006 Glcat,Zyuanli,. All rights reserved.

22

Telnet Password
Router(config-line)#line vty 0 ? <1-4> Last Line Number <cr> Router(config-line)#line vty 0 4 Router(config-line)# password todd2 Router(config-line)# login See here:
2006 Glcat,Zyuanli,. All rights reserved.

23

Encrypting Your Passwords

Because only the enable secret password is encrypted by default, youll need to manually configure the user-mode and enable passwords for encryption.

2006 Glcat,Zyuanli,. All rights reserved.

24

To manually encrypt your passwords, use the service password-encryption command. Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#service passwordencryption
2006 Glcat,Zyuanli,. All rights reserved.

25

Descriptions

Setting descriptions on an interface is helpful to the administrator and, like the hostname, only locally significant.

2006 Glcat,Zyuanli,. All rights reserved.

26

Atlanta(config)#int e0 Atlanta(config-if)#description Sales Lan Atlanta(config-if)#int s0 Atlanta(config-if)#desc Wan to Miami circuit:6fdda4321 See here:
2006 Glcat,Zyuanli,. All rights reserved.

27

Router Interfaces
The 2500 router is a fixed configuration router, which means that when you buy that model, youre stuck with that physical configuration. 2600 router, interface type slot/port See here:

2006 Glcat,Zyuanli,. All rights reserved.

28

Bringing Up an Interface

You can turn an interface off with the interface command shutdown, and turn it on with the no shutdown command.

2006 Glcat,Zyuanli,. All rights reserved.

29

Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int ethernet0 Router(config-if)#no shutdown Router(config-if)#^Z 00:57:08: %LINK-3-UPDOWN: Interface Ethernet0, changed state to up 00:57:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up Router#sh int ethernet0 Ethernet0 is up, line protocol is up

2006 Glcat,Zyuanli,. All rights reserved.

30

See here:

2006 Glcat,Zyuanli,. All rights reserved.

31

Configuring an IP Address on an Interface

Router(config)#int e0 Router(config-if)#ip address 172.16.10.2 255.255.255.0 Router(config-if)#no shut

2006 Glcat,Zyuanli,. All rights reserved.

32

If you want to add a second subnet address to an interface, you have to use the secondary parameter

2006 Glcat,Zyuanli,. All rights reserved.

33

Router(config-if)#ip address 172.16.20.2 255.255.255.0 secondary Router(config-if)#^Z

2006 Glcat,Zyuanli,. All rights reserved.

34

Serial Interface Commands


there are a couple of things you need to know.First, the interface will usually be attached to a CSU/DSU type of device that provides clocking for the line to the router. But if you have a back-to-back configuration (for example, one thats used in a lab environment), one endthe data communication equipment (DCE) end of the cablemust provide clocking. By default, Cisco routers are all data terminal equipment (DTE) devices,so you must tell an interface to provide clocking if you need it to act like a DCE device.
2006 Glcat,Zyuanli,. All rights reserved.

35

Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#int s0 Router(config-if)#clock rate ? Speed (bits per second) 1200 2400
2006 Glcat,Zyuanli,. All rights reserved.

36

Router(config-if)#clock rate 64000 %Error: This command applies only to DCE interfaces Router(config-if)#int s1 Router(config-if)#clock rate 64000 See here:
2006 Glcat,Zyuanli,. All rights reserved.

37

Viewing, Saving, and Erasing Configurations

2006 Glcat,Zyuanli,. All rights reserved.

38

show running-config show startup-config

2006 Glcat,Zyuanli,. All rights reserved.

39

show running-config RAM (running-config)

copy running-config startup-config

Bringing Up and decompressed

NVRAM (startup-config) show startup-config erase startup-config

2006 Glcat,Zyuanli,. All rights reserved.

40

Verifying Your Configuration

P166~172

2006 Glcat,Zyuanli,. All rights reserved.

41

You might also like