Configuration Router and Switch
Configuration Router and Switch
Step 1: Conect to the router
Console into the router and enter privileged EXEC mode using the
enable command.
Router> enable
Router#
Step 2: Erase the startup configuration file from NVRAM.
Type the erase startup-config command to remove the startup configuration
from nonvolatile random-access memory (NVRAM).
Router# erase startup-config
Erasing the nvram filesystem will remove all configuration files!
Continue? [confirm]
[OK]
Erase of nvram: complete
Router#
Step 3: Reload the router
Issue the reload command to remove an old configuration from memory. When
prompted to Proceed with reload, press Enter to confirm the reload. Pressing
any other key will abort the reload.
Router# reload
Proceed with reload? [confirm]
*Nov 29 18:28:09.923: %SYS-5-RELOAD: Reload requested by
console. Reload Reason: Reload Command.
Step 4: Bypass the initial configuration dialog.
After the router reloads, you are prompted to enter the initial configuration
dialog. Enter no and press Enter.
Would you like to enter the initial configuration dialog?
[yes/no]: no
Step 5: Terminate the autoinstall program.
You will be prompted to terminate the autoinstall program. Respond yes and then press Enter.
Would you like to terminate autoinstall? [yes]: yes
Router>
Password Settings on the Line
To specify a password on a line, use the password command in the line
configuration mode. To enable password verification during login, use the login
command in the line configuration mode.
Configuration Procedure
In this example, a password is configured for all users who attempt to use the
console.
Step 1. In the privileged EXEC message (or "enable"), enter the configuration
mode and then switch to the line configuration mode using the following
commands. Note that the message changes to reflect the current mode.
router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
router(config) # line con 0
router(config-line)#
Step 2. Set the password and enable password verification during login.
router(config-line)#password cisco
router(config-line)#login
Step 3. Exit setup mode
router(config-line)#end
router#%SYS-5-CONFIG_I: Configured from console by console.
Note: Do not save the configuration changes for line with 0 until your ability to log
in is verified.
Note: In the configuration of the line console, login is a mandatory configuration
command to enable password verification during login. Console authentication
requires the password and login commands for proper operation.
Verify Configuration
Examine the router configuration to verify that the commands have been entered
correctly:
The show running-config command shows the current router configuration
router# show running-config
Building configuration... ...
! --- Lines omitted for brevity !
line con 0 password letmei
login line 1 8 line aux 0 line vty 0 4 !
End
Initialize the Switch and Reload
Step 1: Connect to the switch.
Console into the switch and enter privileged EXEC mode.
Switch> enable
Switch#
Step 2: Determine if there have been any virtual local-area networks
(VLANs) created.
Use the show flash command to determine if any VLANs have been created on the
switch.
Switch# show flash
Directory of flash:/
2 -rwx 1919 Mar 1 1993 00:06:33 +00:00 private-config.text
3 -rwx 1632 Mar 1 1993 00:06:33 +00:00 config.text
4 -rwx 13336 Mar 1 1993 00:06:33 +00:00 multiple-fs
5 -rwx 11607161 Mar 1 1993 02:37:06 +00:00 c2960-lanbasek9-
mz.150-2.SE.bin
6 -rwx 616 Mar 1 1993 00:07:13 +00:00 vlan.dat
32514048 bytes total (20886528 bytes free)
Switch#
Step 3: Delete the VLAN file.
a. If the vlan.dat file was found in flash, then delete this file.
Switch# delete vlan.dat
Delete filename [vlan.dat]?
You will be prompted to verify the file name. At this point, you can change the file name or
just press Enter if you have entered the name correctly.
b. When you are prompted to delete this file, press Enter to confirm the deletion. (Pressing
any other key will abort the deletion.)
Delete flash:/vlan.dat? [confirm]
Switch#
Step 4: Erase the startup configuration file.
Use the erase startup-config command to erase the startup configuration file
from NVRAM. When you are prompted to remove the configuration file, press Enter to
confirm the erase. (Pressing any other key will abort the operation.)
Switch# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue?
[confirm]
[OK]
Erase of nvram: complete
Switch#
Step 5: Reload the switch.
Reload the switch to remove any old configuration information from memory. When you
are prompted to reload the switch, press Enter to proceed with the reload. (Pressing any
other key will abort the reload.)
Switch# reload
Proceed with reload? [confirm]
Note: You may receive a prompt to save the running configuration prior to reloading the
switch. Type no and press Enter.
System configuration has been modified. Save? [yes/no]: no
Step 6: Bypass the initial configuration dialog.
After the switch reloads, you should see a prompt to enter the initial configuration
dialog. Type no at the prompt and press Enter.
Would you like to enter the initial configuration dialog? [yes/no]: no
Switch>