特权模式:
sh run --> 查看机器当前正在运行的配置文件
sh sta --> 查看机器启动后的配置文件
sh users --> 查看当前登录用户
sh buffers --> 查看日志信息
sh memory --> 查看内存使用信息
sh process --> 查看历史CPU利用率
sh protocols --> 查看协议的使用情况
sh starcks --> 查看堆栈使用情况
sh version --> 查看系统硬件的配置信息、软件版本、配置文件的名称和来源,以及启动映像

========== 恢复出厂设置 ============
erase nvram: (erase startup-config)

========== 升级IOS ============
copy tftp://服务器地址/*****.bin flash:
reload (特权模式)

========== TFTP来加载配置文件 ============
copy tftp://服务器地址/配置文件名 running-config

========== 基本配置 ============
1. clock set --> 设置显示时间 (特权模式enable)
范例: clock set 14:13:12 7 july 2011 --> 设置当前时间为2011年7月7日14点13分12秒
1.1 sh clock --> 查看当前系统时间(特权模式enable)

2. terminal history size --> 设置历史命令空间 (特权模式enable)
范例: terminal history size 100 --> 设置历史命令空间为100条
2.1 sh history --> 查看以前的操作

3. hostname --> 设置机器名称 (全局配置模式 conf t)
范例: hostname test_01 --> 设置机器名称为test_01

4. ***(config)#service timestamps debug datetime msec --> 标记DEBUG信息(精确到毫秒)

5. ***(config)#service timestamps log datetime msec --> 标记日志信息(精确到毫秒)

========== 用户访问和权限 ============
0. 进入特权模式加密
**>enable --> 进入特权模式
**#conf t --> 进入全局配置模式
**(config)enable secret *** -->设置特权模式密码

1. 设置控制台口访问
**>enable --> 进入特权模式
**#conf t --> 进入全局配置模式
**(config)line console 0 --> 进入控制台口配置
**(config-line)#password **** --> 设置登陆密码
**(config-line)#login -->启用登陆
**(config-line)#exec-timeout 300 0 --> 设置空闲退出时间为5分钟
**(config-line)#exit -->推出全局配置模式
**(config)service password-encryption --> 启动密码加密
**(config)#end --> 结束

2. 设置远程访问
**>enable --> 进入特权模式
**#conf t --> 进入全局配置模式
**(config)line vty 0 4 --> 设置远程登录数量
**(config-line)#password **** --> 设置登陆密码
**(config-line)#login -->启用登陆
**(config-line)#exec-timeout 300 0 --> 设置空闲退出时间为5分钟
**(config-line)#exit -->推出全局配置模式
**(config)service password-encryption --> 启动密码加密
**(config)#end --> 结束

3. 为特定用户设定远程访问(解决端口长期占用问题)
**>enable --> 进入特权模式
**#conf t --> 进入全局配置模式
**(config)access-list 9 permit host ip地址 --> 设置访问列表
**(config)line vty 0 4 --> 设置远程登录数量
**(config-line)#password **** --> 设置登陆密码
**(config-line)#login -->启用登陆
**(config-line)#access-class 9 in --> 添加访问列表
**(config-line)#exec-timeout 300 0 --> 设置空闲退出时间为5分钟
**(config-line)#exit -->推出全局配置模式
**(config)service password-encryption --> 启动密码加密
**(config)#end --> 结束