chapter 04 - router conf

25
Khoa CNTT PHẠM VĂN TÍNH 01-2004 CONFIGURING CONFIGURING A ROUTER A ROUTER TS, PHẠM VĂN TÍNH TS, PHẠM VĂN TÍNH PART8 PART8

Upload: phanleson

Post on 15-May-2015

1.294 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

CONFIGURINGCONFIGURING

A ROUTER A ROUTER

TS, PHẠM VĂN TÍNHTS, PHẠM VĂN TÍNH

PART8PART8

Page 2: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

ObjectiveObjective

Name a router Set passwords Examine show commands Configure a serial interface Configure an Ethernet interface Execute changes to a router Save changes to a router Configure an interface description Configure a message-of-the-day banner Configure host tables Understand the importance of backups and

documentation

Page 3: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Global Configuration Mode Global Configuration Mode

All command-line interface (CLI) configuration changes to a Cisco router are made from the global configuration mode. For Examples:–Interface mode –Line mode –Router mode –Subinterface mode –Controller mode

Router#configure terminal

Router(config)#

exit : Returns the router to global configuration mode from one of these specific configuration modes

Ctrl-Z : Returns the router to privileged EXEC mode

Page 4: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Overview of Router ModesOverview of Router Modes

Page 5: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring a router nameConfiguring a router name

Router(config)#hostname Tokyo

Tokyo(config)#

Page 6: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring router passwordsConfiguring router passwords

enable secret <password>

Page 7: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Examining the show commandsExamining the show commands

show interfaces – Displays all the statistics for all the interfaces on the router. For example: Router#show interfaces serial 0/1

show controllers serial – Displays information-specific to the interface hardware

show version – Displays information about the router and the IOS that is running in RAM

show protocol – Displays the global and interface specific status of any configured Layer 3 protocols

show startup-config – Displays the saved configuration located in NVRAM

show running-config – Displays the configuration currently running in RAM

Page 8: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Examining the show commandsExamining the show commands

show clock – Shows the time set in the router show hosts – Displays a cached list of host

names and addresses show users – Displays all users who are

connected to the router show history – Displays a history of commands

that have been entered show flash – Displays information about flash

memory and what IOS files are stored there show ARP – Displays the ARP table of the router

Page 9: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring a serial interfaceConfiguring a serial interface

1. Enter global configuration mode 2. Enter interface mode 3. Specify the interface address and subnet mask 4. Set clock rate if a DCE cable is connected. Skip

this step if a DTE cable is connected. 5. Turn on the interface

Router(config)#interface serial 0/0 Router(config-if)#ip address <ip address> <netmask> Router(config-if)#clock rate <clock rates> The available clock rates in bits per second are: 1200, 2400, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000, 500000, 800000, 1000000, 1300000, 2000000, or 4000000.

Page 10: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Interface Configuration CommandsInterface Configuration Commands

Page 11: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Serial Interface Configuration ExampleSerial Interface Configuration Example

Router#configure terminal

Router(config)#interface serial 0/0

Router(config-if)#ip address 192.168.1.1 255.255.255.0

Router(config-if)#clock rate 56000

Router(config-if)#no shutdown

Router(config-if)#exit

Page 12: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Executing adds, moves, and changesExecuting adds, moves, and changes

Page 13: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring an Ethernet interfaceConfiguring an Ethernet interface

1. Enter global configuration mode

2. Enter interface configuration mode

3. Specify the interface address and subnet mask

4. Enable the interface

Router#configure terminal Router(config)#interface e0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit

Page 14: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring interface descriptionConfiguring interface description

1. Enter global configuration mode by entering the command configure terminal.

2. Enter specific interface mode (for example interface Ethernet 0) interface ethernet 0.

3. Enter the command description followed by the information that is to be displayed. For example, XYZ Network, Building 18.

4. Exit interface mode back to privileged EXEC mode by using the command ctrl-Z.

5. Save the configuration changes to NVRAM by using the command copy running-config startup-config.

Page 15: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring interface descriptionConfiguring interface description

Page 16: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring message-of-the-day (MOTD)Configuring message-of-the-day (MOTD)

1. Enter global configuration mode by using the command configure terminal.

2. Enter the command banner motd # The message of the day goes here #.

3. Save changes by issuing the command copy running-config startup-config.

Page 17: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring message-of-the-day (MOTD)Configuring message-of-the-day (MOTD)

Page 18: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Host name resolutionHost name resolution

to associate a host name with an IP address. A list of host names and their associated IP addresses is

called a host table. Host names, unlike DNS names, are significant only on

the router on which they are configured.

Page 19: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Configuring host tablesConfiguring host tables

1. Enter global configuration mode in the router. 2. Enter the command ip host followed by the

name of the router and all IP addresses associated with the interfaces on each router.

3. Continue entering until all routers in the network are entered.

4. Save the configuration to NVRAM.

Page 20: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Copying, editing, and pasting Copying, editing, and pasting configurationsconfigurations

A current copy of the configuration can be stored on a TFTP server. The copy running-config tftp command:

Step 1 : Enter the copy running-config tftp command.

Step 2 : Enter the IP address of the host where the configuration file will be stored.

Step 3 : Enter the name to assign to the configuration file.

Step 4 : Confirm the choices by answering yes each time.

Page 21: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Store Configuration on a TFTPStore Configuration on a TFTP

Page 22: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Restore Configuration from a TFTPRestore Configuration from a TFTP

Page 23: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Working with release 11.xWorking with release 11.x

Page 24: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

Working with pre-Release 11.0Working with pre-Release 11.0

Page 25: Chapter 04 - Router Conf

Kh

oa

CN

TT

PH

ẠM

N T

ÍNH

01-2

004

SummarySummary

The router has several modes: User EXEC mode Privileged EXEC mode Global configuration mode Other configuration modes

The command-line interface may be used to make changes to the configuration: Setting the hostname Setting passwords Configuring interfaces Modifying configurations Showing configurations Setting the Interface descriptions Setting the Login banners and messages-of-the-day