编辑和帮助功能
可以使用Cisco高级的编辑功能来帮助配置路由器。
在任意提示符下键入一个问号。(?),都将会得到在当前提示符下所有命令的清单。
下面是查找以某个字母开头的快捷方式命令:
Router(config)#i
interface ip ipx isis
在一个命令串中找下一个命令,可以先键入前面的命令然后输入一个问号:
Router(config)#interface
Async Async interface
BVI Bridge-Group Virtual Interface
CTunnel CTunnel interface
Dialer Dialer interface
Ethernet IEEE 802.3
Group-Async Async Group interface
Lex Lex interface
Loopback Loopback interface
Multilink Multilink-group interface
Null Null interface
Serial Serial
Tunnel Tunnel interface
Vif PGM Multicast Host interface
Virtual-Template Virtual Template interface
Virtual-TokenRing Virtual TokenRing
range interface range command
Router(config)#interface serial
<0-1> Serial interface number
Router(config)#interface serial 0
<cr>
Router(config-if)#
增强的编辑命令
命令 含义
CTRL+A 移动光标到本行的开始处
CTRL+E 移动光标到本行的结尾处
ESC+B 往回移动一个字
CTRL+F 向前移动一个字符
ESC+F 向前移动一个字
CTRL+D 删除某个单一字符
BACKSPACE 删除某个单一字符
CTRL+R 重新显示一行
CTRL+U 删除一行
CTRL+W 删除一个字
CTRL+Z 结束配置模式并返回执行(EXEC)模式
TAB 完成输入一个命令
获取基本的路由信息
Router#sh version
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.2(27), RELEASE SOFTWARE (fc3)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Tue 02-Nov-04 22:01 by kellmill
Image text-base: 0x0307D390, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
BOOTLDR: 3000 Bootstrap Software (IGS-RXBOOT), Version 10.2(8a), RELEASE SOFTWARE (fc1)
Router uptime is 17 minutes
System returned to ROM by power-on
System image file is "flash:c2500-js-l.122-27.bin"
cisco 2500 (68030) processor (revision D) with 16384K/2048K bytes of memory.
Processor board ID 02096577, with hardware revision 00000000
Bridging software.
X.25 software, Version 3.0.0.
SuperLAT software (copyright 1990 by Meridian Technology Corp).
TN3270 Emulation software.
1 Ethernet/IEEE 802.3 interface(s)
2 Serial network interface(s)
32K bytes of non-volatile configuration memory.
16384K bytes of processor board System flash (Read ONLY)
Configuration register is 0x2142
设置口令
启用口令
可以在全局配置模式下设置启用口令:
Router(config)#enable
last-resort Define enable action if no TACACS servers respond
password Assign the privileged level password
secret Assign the privileged level secret
use-tacacs Use TACACS to check enable passwords
辅助口令
要配置辅助接口口令,需要进入到全局配置模式并输入Line aux 。
Router(config)#line aux
<0-0> First Line number
Router(config)#line aux 0
Router(config-line)#password 12345
Router(config-line)#login
Router(config-line)#
控制台口令
要设置控制台口令,使用line console 0命令。
Router(config)#line console 0
Router(config-line)#password 12345
Router(config-line)#login
Telnet口令
要为Telnet访问路由器设置用户模式口令,是用line vty命令。
Router(config)#line vty 0
<1-197> Last Line number
<cr>
Router(config)#line vty 0 4
Router(config-line)#password 12345
Router(config-line)#login
Router(config-line)#
加密你的口令
在默认时只有启用加密口令是加密的,为了安全,需要手工配置用户模式口令和启用口令。
要实现口令加密,需要在全局模式下使用service password-encryption命令。
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#service password-encryption
Router(config)#
信息的可信度的。
标志区
使用标志区是为那些拨号到你的互联网络中的用户提供了一个安全的提示。
在Cisco路由器上设置一个标志区,这样当任一用户登录到路由器上或远程访问路由器时,标志区显示你希望他们看到的信息。
设置标志区,是用banner motd命令
Router(config)#banner motd #
Enter TEXT message. End with the character '#'.
Welcome to Hu Lian Shen Zhou
#
Router(config)#exit
现在显示出来的就是刚才设置的标志区:
Welcome to Hu Lian Shen Zhou
User Access Verification
Password:
路由器接口
接口配置是路由器很重要的配置,没有接口,路由器整个是没用的。
不同的路由器使用不同的方式来选择接口的使用。
Router(config)#int
Async Async interface
BVI Bridge-Group Virtual Interface
CTunnel CTunnel interface
Dialer Dialer interface
Ethernet IEEE 802.3
Group-Async Async Group interface
Lex Lex interface
Loopback Loopback interface
Multilink Multilink-group interface
Null Null interface
Serial Serial
Tunnel Tunnel interface
Vif PGM Multicast Host interface
Virtual-Template Virtual Template interface
Virtual-TokenRing Virtual TokenRing
range interface range command