40
CISCO NETWORKING ACADEMY CISCO NETWORKING ACADEMY Chabot College Chabot College ELEC 99.08 ELEC 99.08 IOS Configuration Commands

Chabot College

Embed Size (px)

DESCRIPTION

Chabot College. ELEC 99.08 IOS Configuration Commands. Configuration Topics. Configuration file Ways to enter a config file to the router IOS configuration commands Additive editing. Configuration File. Just a text file Text instructions are interpreted by the EXEC. Loaded to RAM - PowerPoint PPT Presentation

Citation preview

Page 1: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Chabot CollegeChabot College

ELEC 99.08ELEC 99.08IOS Configuration Commands

Page 2: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Configuration TopicsConfiguration Topics• Configuration file• Ways to enter a config file to the router• IOS configuration commands• Additive editing

Page 3: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Configuration FileConfiguration File• Just a text file• Text instructions are interpreted by the EXEC.• Loaded to RAM• Changes in the config file take place

instantaneously. No reboot or other process is required.

Page 4: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Configuration FileConfiguration File• Commands may be entered in any order; the

IOS will place the commands in the correct position in the config file.

• Editing is additive. More about this later...

Page 5: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Config may be entered fromConfig may be entered from• NVRAM This is the default at reload or cold start. Also:

– rtr#config memory

– rtr#copy start run

• Setup Mode dialog– rtr#setup

• TFTP server– rtr#config network

– rtr#copy tftp run

• Terminal (con0, aux0, vty0 4)– rtr#config terminal

Page 6: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Page 7: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Review: Which mode is this?Review: Which mode is this?

• oak(config)#• Global configuration mode

Used for:– General configuration commands– Static routes

Page 8: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Review: Which mode is this?Review: Which mode is this?

• oak(config-if)#• Interface configuration mode

Used for:– Setting IP addresses and subnet masks– Setting other interface characteristics

Page 9: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Review: Which mode is this?Review: Which mode is this?

• oak(config-router)#• Router configuration mode

Used for:– Setting routing protocols

Page 10: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Review: Which mode is this?Review: Which mode is this?

• oak(config-line)#• Line configuration mode

Used for:– Setting login passwords on lines:

• con 0• aux 0• vty 0 4

Page 11: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global, Interface, Line & Router ModesGlobal, Interface, Line & Router Modes

Page 12: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config CommandsGlobal Config Commands• hostname

– name of router– format: one word, no spaces– changes instantaneously

rtr#conf trtr(config)#hostname oakoak(config)#banner motd $Router Admin: J. Jones$oak(config)#ip route 0.0.0.0 0.0.0.0 s1oak(config)#enable password cisco oak(config)#enable secret chabot

Page 13: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config CommandsGlobal Config Commands• banner motd

– message of the day (shown at login)– format: repeated character delimits message– in example below, $ is delimiter

rtr#conf trtr(config)#hostname oakoak(config)#banner motd $Router Admin: J. Jones$oak(config)#ip route 0.0.0.0 0.0.0.0 s1oak(config)#enable password cisco oak(config)#enable secret chabot

Page 14: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config CommandsGlobal Config Commands• ip route

– defines a “static” route– format: ip route x.x.x.x (address) y.y.y.y (mask) interface – in example below, the “default route” is set

rtr#conf trtr(config)#hostname oakoak(config)#banner motd $Router Admin: J. Jones$oak(config)#ip route 0.0.0.0 0.0.0.0 s1oak(config)#enable password cisco oak(config)#enable secret chabot

Page 15: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config CommandsGlobal Config Commands• enable passwword

– sets the weak “enable” password– format: enable password [word]

rtr#conf trtr(config)#hostname oakoak(config)#banner motd $Router Admin: J. Jones$oak(config)#ip route 0.0.0.0 0.0.0.0 s1oak(config)#enable password cisco oak(config)#enable secret chabot

Page 16: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config CommandsGlobal Config Commands• enable secret

– sets the encrypted “enable secret” password– format: enable secret [word]

– once entered, will not be readable in config file

rtr#conf trtr(config)#hostname oakoak(config)#banner motd $Router Admin: J. Jones$oak(config)#ip route 0.0.0.0 0.0.0.0 s1oak(config)#enable password cisco oak(config)#enable secret chabot

Page 17: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config CommandsGlobal Config Commands• no ip domain-lookup

– turns off DNS lookups– format: no ip domain lookup

– useful in lab, where there is no DNS

rtr#conf trtr(config)#hostname oakoak(config)#banner motd $Router Admin: J. Jones$oak(config)#ip route 0.0.0.0 0.0.0.0 s1oak(config)#enable password cisco oak(config)#enable secret chabotoak(config)#no ip domain-lookup

Page 18: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global Config - PracticeGlobal Config - Practice• Try it now with Router e-Sim:• Enter global config mode.• Enter the following commands:

• then log in again, and note the motd and passwords

router>enrouter#conf trouter(config)#hostname haywardhayward(config)#banner motd $Administered by(yourname)$hayward(config)#enable password cisco hayward(config)#enable secret chabothayward(config)#exithayward#exit

Page 19: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global config: changing to Interface ConfigGlobal config: changing to Interface Config• interface ethernet 0

– selects the interface to be configured– format: int e0 (substitute s0, s1, or e1 as appropriate)

– prompt gives no indication of the current interface being configured.

oak#conf toak(config)#int e0oak(config-if)#

Page 20: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Interface Config CommandsInterface Config Commands• ip address

– sets ip address & subnet mask– format: ip address x.x.x.x (address) y.y.y.y (mask)

oak#conf toak(config)#int e0oak(config-if)#ip address 192.168.4.1 255.255.255.0oak(config-if)#

Page 21: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Interface Config CommandsInterface Config Commands• descripton

– comment to describe the interface– format: desc [text text text]

oak#conf toak(config)#int e0oak(config-if)#ip address 192.168.4.1 255.255.255.0oak(config-if)#desc Oakland LANoak(config-if)#

Page 22: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Interface Config CommandsInterface Config Commands• no shutdown

– brings up an interface that was administratively shut down– format: no shut

oak#conf toak(config)#int e0oak(config-if)#ip address 192.168.4.1 255.255.255.0oak(config-if)#desc Oakland LANoak(config-if)#no shutoak(config-if)#

Page 23: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Interface Config CommandsInterface Config Commands• exit

– returns to Global Config mode– format: exit

oak#conf toak(config)#int e0oak(config-if)#ip address 192.168.4.1 255.255.255.0oak(config-if)#desc Oakland LANoak(config-if)#no shutoak(config-if)#exitoak(config)#

Page 24: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Interface Config - PracticeInterface Config - Practice• Try it now with Router e-Sim:• show interface e0 and note:

– is the interface UP and UP?– is an IP address shown?

• Enter interface config mode for Ethernet 0.• Enter the following commands:

• then show int e0 and note the effects of your configuration

hayward(config)#int eohayward(config-if)#ip address 192.168.3.1 255.255.255.0 hayward(config-if)#desc This is the Hayward LANhayward(config-if)#no shuthayward(config)#exithayward#exit

Page 25: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global config: changing to Line ConfigGlobal config: changing to Line Config• line con 0

– selects the line to be configured– format: line vty 0 4 (substitute con 0 or aux 0 as appropriate)

– prompt gives no indication of the current line being configured.

oak#conf toak(config)#line con 0oak(config-line)#

Page 26: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Line Config CommandsLine Config Commands• login

– enables password control for login– format: login

oak#conf toak(config)#line con 0oak(config-line)loginoak(config-line)#

Page 27: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Line Config CommandsLine Config Commands• password

– defines the password for this line– format: password [word]

oak#conf toak(config)#line con 0oak(config-line)loginoak(config-line)#password ciscooak(config-line)#

Page 28: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Line Config CommandsLine Config Commands• exit

– returns to Global Config mode– format: exit

oak#conf toak(config)#line con 0oak(config-line)loginoak(config-line)#password ciscooak(config-line)#exitoak(config)#

Page 29: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Line Config - PracticeLine Config - Practice• Try it now with Router e-Sim:• show run and note whether there are passwords on line con 0, aux 0,

and vty 0• Enter line config mode for con 0.• Enter the following commands:

• then show run and note the effects of your configuration

hayward(config)#line con 0hayward(config-line)#loginhayward(config-line)#password ciscohayward(config-line)#line vty 0 4hayward(config-line)#loginhayward(config-line)#password ciscohayward(config-line)#exithayward#^Z

Notice thechangehere

Page 30: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Additional Line Config CommandAdditional Line Config Command• logging synchronous

– prevents system messages from interrupting your typing input in the middle of a line

– add to console line

– format: logging synchronous

oak#conf toak(config)#line con 0oak(config-line)logging synchronousoak(config-line)#

Page 31: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Additional Line Config CommandAdditional Line Config Command• logging synchronous

– Router e-Sim doesn’t understand this command, so you can’t practice with it.

– Useful in in your real config files.

oak#conf toak(config)#line con 0oak(config-line)loginoak(config-line)#password ciscooak(config-line)logging synchronousoak(config-line)#

Page 32: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Global config: changing to Router ConfigGlobal config: changing to Router Config• router rip

– selects the dynamic routing protocol– format: router [protocol] (rip or igrp as appropriate)

oak#conf toak(config)#router ripoak(config-router)#

Page 33: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Router Config CommandsRouter Config Commands• network

– sets the networks on which the protocol will send and receive updates– format: network x.x.x.x

oak#conf toak(config)#router ripoak(config-router)#network 192.168.4.0oak(config-router)#network 10.0.0.0oak(config-router)#

Page 34: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Router Config CommandsRouter Config Commands• exit

– returns to Global Config mode– format: exit

oak#conf toak(config)#router ripoak(config-router)#network 192.168.4.0oak(config-router)#network 10.0.0.0oak(config-router)#exitoak(config)#

Page 35: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Router Config - PracticeRouter Config - Practice• Try it now with Router e-Sim:• show run and note whether RIP has been set as the dynamic routing

protocol• Enter line router config mode• Enter the following commands:

• then show run and note the effects of your configuration

hayward(config)#router riphayward(config-router)#network 10.0.0.0hayward(config-router)#network 192.168.3.0hayward(config-router)#exithayward(config)#exithayward#exit

Page 36: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

““No” CommandsNo” Commands• To remove or reverse any command, type the command

again, preceded by no

oak#conf toak(config)#no router ripoak(config)#

Page 37: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

““No” Command - PracticeNo” Command - Practice• Try it now with Router e-Sim:• show run and note whether RIP has been set as the dynamic routing

protocol• Enter global config mode• Enter the following commands:

• then show run and note whether RIP has been deleted

hayward(config)#no router riphayward(config)#exithayward#sh ru

Page 38: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

““No” Command - PracticeNo” Command - Practice

• Earlier, you set the ethernet 0 – IP address and subnet mask– description

• Now try using the no command to remove them.

hayward(config)#int e0hayward(config-if)#no ip addresshayward(config-if)#no deschayward(config-if)#exithayward(config)#exithayward#sh ru

• Answer:

Page 39: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Additive EditingAdditive Editing

• New commands add to the file and replace like commands only.

• Other commands remain in the config.• Even if you load an entire config file to RAM, old

commands not included in the new config file will remain in RAM.

• Confusion and problems can result.• Principle: Start clean to be sure:

– erase start, reload

Page 40: Chabot College

CISCO NETWORKING ACADEMYCISCO NETWORKING ACADEMY

Additive Editing - Results of Loading a Config on Top of a Current ConfigAdditive Editing - Results of Loading a Config on Top of a Current Config

!hostname oakland!enable password cisco !!!ip route 0.0.0.0 0.0.0.0 s1!no router rip

!hostname hayward!enable password cisco !banner motd $Shutdown 4PM$!!!router rip

!

1. CurrentRunning Config

in RAM

2. New Config Loaded from

NVRAM or TFTP

3. ResultingRunning Config

in RAM

!hostname oakland!hostname oakland!enable password cisco

!hostname oakland!enable password cisco !banner motd $Shutdown 4PM$

!hostname oakland!enable password cisco !banner motd $Shutdown 4PM$!ip route 0.0.0.0 0.0.0.0 s1

+ =

What will be the resulting hostname?What will be the resulting enable password?Will the resulting config include a banner motd?Will the resulting config include a static ip route?

!hostname oakland!enable password cisco !banner motd $Shutdown 4PM$!ip route 0.0.0.0 0.0.0.0 s1!!

Will the resulting config include rip routing?