400 likes | 476 Views
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
E N D
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 • Changes in the config file take place instantaneously. No reboot or other process is required.
Configuration 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...
Config 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
Review: Which mode is this? • oak(config)# • Global configuration mode Used for: • General configuration commands • Static routes
Review: Which mode is this? • oak(config-if)# • Interface configuration modeUsed for: • Setting IP addresses and subnet masks • Setting other interface characteristics
Review: Which mode is this? • oak(config-router)# • Router configuration mode Used for: • Setting routing protocols
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
Global Config Commands • hostname • name of router • format: one word, no spaces • changes instantaneously rtr#conf t rtr(config)#hostname oak oak(config)#banner motd $Router Admin: J. Jones$ oak(config)#ip route 0.0.0.0 0.0.0.0 s1 oak(config)#enable password cisco oak(config)#enable secret chabot
Global Config Commands • banner motd • message of the day (shown at login) • format: repeated character delimits message • in example below, $ is delimiter rtr#conf t rtr(config)#hostname oak oak(config)#banner motd $Router Admin: J. Jones$ oak(config)#ip route 0.0.0.0 0.0.0.0 s1 oak(config)#enable password cisco oak(config)#enable secret chabot
Global 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 t rtr(config)#hostname oak oak(config)#banner motd $Router Admin: J. Jones$ oak(config)#ip route 0.0.0.0 0.0.0.0 s1 oak(config)#enable password cisco oak(config)#enable secret chabot
Global Config Commands • enable passwword • sets the weak “enable” password • format: enable password [word] rtr#conf t rtr(config)#hostname oak oak(config)#banner motd $Router Admin: J. Jones$ oak(config)#ip route 0.0.0.0 0.0.0.0 s1 oak(config)#enable password cisco oak(config)#enable secret chabot
Global 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 t rtr(config)#hostname oak oak(config)#banner motd $Router Admin: J. Jones$ oak(config)#ip route 0.0.0.0 0.0.0.0 s1 oak(config)#enable password cisco oak(config)#enable secret chabot
Global 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 t rtr(config)#hostname oak oak(config)#banner motd $Router Admin: J. Jones$ oak(config)#ip route 0.0.0.0 0.0.0.0 s1 oak(config)#enable password cisco oak(config)#enable secret chabot oak(config)#no ip domain-lookup
Global 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>en router#conf t router(config)#hostname hayward hayward(config)#banner motd $Administered by(yourname)$ hayward(config)#enable password cisco hayward(config)#enable secret chabot hayward(config)#exit hayward#exit
Global 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 t oak(config)#int e0 oak(config-if)#
Interface Config Commands • ip address • sets ip address & subnet mask • format: ip address x.x.x.x (address) y.y.y.y (mask) oak#conf t oak(config)#int e0 oak(config-if)#ip address 192.168.4.1 255.255.255.0 oak(config-if)#
Interface Config Commands • descripton • comment to describe the interface • format: desc [text text text] oak#conf t oak(config)#int e0 oak(config-if)#ip address 192.168.4.1 255.255.255.0 oak(config-if)#desc Oakland LAN oak(config-if)#
Interface Config Commands • no shutdown • brings up an interface that was administratively shut down • format: no shut oak#conf t oak(config)#int e0 oak(config-if)#ip address 192.168.4.1 255.255.255.0 oak(config-if)#desc Oakland LAN oak(config-if)#no shut oak(config-if)#
Interface Config Commands • exit • returns to Global Config mode • format: exit oak#conf t oak(config)#int e0 oak(config-if)#ip address 192.168.4.1 255.255.255.0 oak(config-if)#desc Oakland LAN oak(config-if)#no shut oak(config-if)#exit oak(config)#
Interface 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 eo hayward(config-if)#ip address 192.168.3.1 255.255.255.0 hayward(config-if)#desc This is the Hayward LAN hayward(config-if)#no shut hayward(config)#exit hayward#exit
Global 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 t oak(config)#line con 0 oak(config-line)#
Line Config Commands • login • enables password control for login • format: login oak#conf t oak(config)#line con 0 oak(config-line)login oak(config-line)#
Line Config Commands • password • defines the password for this line • format: password [word] oak#conf t oak(config)#line con 0 oak(config-line)login oak(config-line)#password cisco oak(config-line)#
Line Config Commands • exit • returns to Global Config mode • format: exit oak#conf t oak(config)#line con 0 oak(config-line)login oak(config-line)#password cisco oak(config-line)#exit oak(config)#
Line 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 0 hayward(config-line)#login hayward(config-line)#password cisco hayward(config-line)#line vty 0 4 hayward(config-line)#login hayward(config-line)#password cisco hayward(config-line)#exit hayward#^Z Notice the change here
Additional 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 t oak(config)#line con 0 oak(config-line)logging synchronous oak(config-line)#
Additional 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 t oak(config)#line con 0 oak(config-line)login oak(config-line)#password cisco oak(config-line)logging synchronous oak(config-line)#
Global config: changing to Router Config • router rip • selects the dynamic routing protocol • format: router [protocol] (rip or igrp as appropriate) oak#conf t oak(config)#router rip oak(config-router)#
Router Config Commands • network • sets the networks on which the protocol will send and receive updates • format: network x.x.x.x oak#conf t oak(config)#router rip oak(config-router)#network 192.168.4.0 oak(config-router)#network 10.0.0.0 oak(config-router)#
Router Config Commands • exit • returns to Global Config mode • format: exit oak#conf t oak(config)#router rip oak(config-router)#network 192.168.4.0 oak(config-router)#network 10.0.0.0 oak(config-router)#exit oak(config)#
Router 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 rip hayward(config-router)#network 10.0.0.0 hayward(config-router)#network 192.168.3.0 hayward(config-router)#exit hayward(config)#exit hayward#exit
“No” Commands • To remove or reverse any command, type the command again, preceded by no oak#conf t oak(config)#no router rip oak(config)#
“No” 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 rip hayward(config)#exit hayward#sh ru
“No” Command - Practice • Earlier, you set the ethernet 0 • IP address and subnet mask • description • Now try using the no command to remove them. • Answer: hayward(config)#int e0 hayward(config-if)#no ip address hayward(config-if)#no desc hayward(config-if)#exit hayward(config)#exit hayward#sh ru
Additive 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
Additive Editing - Results of Loading a Config on Top of a Current Config 2. New Config Loaded from NVRAM or TFTP + = 1. Current Running Config in RAM 3. Resulting Running Config in RAM ! 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 ! hostname oakland ! enable password cisco ! banner motd $Shutdown 4PM$ ! ip route 0.0.0.0 0.0.0.0 s1! ! ! ! hostname oakland ! 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 ! hostname oakland ! enable password cisco Will the resulting config include a static ip route? 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 rip routing?