Redes
Configuring a Router
This chapter provides information and commands concerning the following topics:
• Configuring a router, specifically:
— Names
— Passwords
— MOTD banners
— IP host tables
— Saving and erasing your configurations
• show commands to verify the router configurations
Router Modes
Router>
User mode
Router#
Privileged mode
Router(config)#
Globalconfiguration mode
Router(config-if)#
Interface mode
Router(config-subif)#
Subinterface mode
Router(config-line)#
Line mode
Router(config-router)#
Router configuration mode
TIP: There are other modes than these. Not all commands work in all
modes. Be careful. If you type in a command that you know is correct—show
run, for example—and you get an error, make sure that youare in the correct
mode.
PART II CCNA 2
— Interfaces
18
Configuring Passwords
Global Configuration Mode
Router>
Can see config, but not change
Router#
Can see config and move to make
changes
Router#config t
Moves to global config mode
Router(config)#
This prompt indicates that you can
start making changes
Configuring a Router Name
This command works on bothrouters and switches.
h
Router(config)#hostname Cisco
Name can be any word you choose
Cisco(config)#
Configuring Passwords
Works on both routers and switches.
e
Router(config)#enable password cisco
Sets enable password
e
Router(config)#enable secret class
Sets enable secret password
l
Router(config)#line con 0
Enters console-line mode
p
Router(config-line)#passwordconsole
Sets console-line mode password to
console
l
Router(config-line)#login
Enables password checking at login
l
Router(config)#line vty 0 4
Enters vty line mode for all 5 vty
lines
p
Router(config-line)#password telnet
Sets vty password to telnet
l
Router(config-line)#login
Enables password checking at login
show Commands
19
l
Router(config)#line aux0
Enters auxiliary line mode
p
Router(config-line)#password backdoor
Sets auxiliary line mode password to
backdoor
l
Router(config-line)#login
Enables password checking at login
CAUTION: Enable secret password is encrypted by default. Enable password is
not. For this reason, recommended practice is that you never use the enable
password. Use only the enable secret passwordin a router configuration.
CAUTION: You cannot set both enable secret and enable password to the same
password. Doing so defeats the use of encryption.
Password Encryption
s
Router(config)#service passwordencryption
Applies a weak encryption to
passwords
e
Router(config)#enable password cisco
Sets enable password to cisco
l
Router(config)#line con 0
…
pRouter(config-line)#password Cisco
Continue setting passwords as above
…
n
Router(config)#no service passwordencryption
Turns off password encryption
CAUTION: If you have turned on service password encryption, used it, and then
turned it off, any passwords that you have encrypted will stay encrypted. New
passwords will remain unencrypted
show Commands
s
Router#show ?
Lists all showcommands available
s
Router#show interfaces
Displays statistics for all interfaces
s
Router#show interface serial 0
Displays statistics for a specific
interface, in this case Serial 0
s
Router#show ip interface brief
Displays a summary of all
interfaces, including status and IP
address assigned
20
Interface Names
s
Router#show controllers serial 0
Displays statisticsfor interface
hardware. Statistics display if the
clock rate is set and if the cable is
DCE, DTE, or not attached
s
Router#show clock
Displays time set on device
s
Router#show hosts
Displays local host-to-IP address
cache. These are the names and
addresses of hosts on the network to
which you can connect
s
Router#show users
Displays all users connected to
device
s...
Regístrate para leer el documento completo.