http://ccna.edufly.cn/CCNAziliao/5711.html

CCNA实验教程:启动一台路由器

2013010411451547.jpg 

路由器模式概述
1、用户执行模式(User executive mode)  R1>
用户执行模式只能完成最基本和最简单的检查和测试(如ping、traceroute)、远程访问。
2、特权执行模式(Privileged executive mode)
特权执行模式可以完成详细检查和测试以及调试(Debugging)、远程访问、文件操作。
R1>enable
Password:
R1#disable       #退出特权模式
3、配置模式(Configuration Mode)
1)全局配置模式(Global configuration mode)
对整个路由器配置生效在全局配置模式下完成。
R1#config t    
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#exit/end/CTRL+C/CTRL+Z
2)接口配置模式(Interface Configuration Mode):
R1(config)#interface f0/0
R1(config-if)#exit
3)线路配置模式(Line Configuration Mode:)
R1(config)#line console 0
R1(config-line)#exit
命令提示符:默认情况下,每个提示符都以设备名称开头。命令提示符中设备名称后的部分用于表明状态。




CCNA实验教程之路由器的基本配置

2013010511494012.jpg 

1、配置路由器的标识
1)配置路由器的主机名(默认是Router)
Router>enable
Router#confi t
Router(config)#hostname R1
R1(config)#do show run
2)配置路由器的登录标语(Banner)
R1(config)#banner motd #You have entered a secured system .Authorized access only !#
2、线路配置模式下的其它命令:
1)配置执行超时的时间(默认是10分钟)
(config)#line console 0
(config-line)#exec-timeout 0 0
(config-line)#line vty 0 15
(config-line)#exec-timeout 0 0
2)配置日志的同步
Router(config)#line console 0
Router(config-line)#logging synchronous




CCNA实验教程:配置路由器的接口

2013010511513705.jpg 

配置以太网接口
1、登录接口配置IP地址并激活接口(接口默认是关闭的)
R1(config)#interface f0/0
R1(config-if)#ip address 192.168.0.1 255.255.255.0
R1(config-if)#no shutdown
2、测试配置结果:
R1(config-if)#do ping 192.168.0.234
Server0:\>ping 192.168.0.1
3、检查配置:
R1(config-if)#do show run interface f0/0
R1(config-if)#do show interface f0/0
R1(config-if)#do show ip interface brief
4、删除接口IP地址并关闭接口
R1(config)#interface f0/0
R1(config-if)#no ip address
R1(config-if)#shutdown

配置串行接口
1、登录接口配置IP地址并激活接口(接口默认是关闭)
R1(config)#int s0/0/0
R1(config-if)#ip address 192.168.21.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#int s0/0/0
R2(config-if)#ip address 192.168.21.2 255.255.255.0
R2(config-if)#no shutdown
2、测试结果:R1#ping 192.168.21.2
3、检查配置:
R1(config-if)#do show run interface s0/0/0
R1(config-if)#do show interface s0/0/0
R1(config-if)#do show ip interface brief
4、将路由器的DCE端口配置时钟速率(单位是bps)
查看接口是DTE或者是DCE:R1#show controllers s0/0
R1(config-if)#clock rate 2000000

5、配置串行接口的带宽(单位是Kbps)
(逻辑带宽,默认是1.544Mbps)
R1(config)#interface s0/0/0
R1(config-if)#bandwidth 2000

R2(config)#int s0/0/0
R2(config-if)#bandwidth 2000




CCNA学习资料之路由器的安全配置

2013011009435967.jpg 

1、配置路由器的口令
1)配置控制台端口(Console Port)登录口令
R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
测试配置结果:退出登录,重新登录测试是否需要口令验证
检查配置:AS-1#show run
2)配置Telnet登录口令
R1(config)#line vty 0 15
R1(config-line)#password cisco
R1(config-line)#login
测试配置结果:退出登录,重新Telnet登录测试是否需要口令验证
检查配置:AS-1#show run
3)配置特权口令
R1(config)#enable secret cisco      MD5加密口令
R1(config)#enable password cisco1   明文显示口令
测试结果:退出到用户模式,重新登录特权模式测试是否验证口令
检查配置:AS-1#show run
两种方式同时配置enable secret生效
4)加密明文口令
R1(config)#service password-encryption
检查配置:AS-1#show run
2、配置登录标语
R1(config)#banner motd #Access for authorized users only#
测试配置结果:退出登录,重新登录测试是有提示信息
检查配置:R1#show run
3、保存配置
R1#copy run start




CCNA学习资料之路由器的SSH登录

2013011009452752.jpg 

配置SSH:IOS软件必须具有加密功能(IOS映像文件名称中包含K8或K9才支持)
步骤 1. 使用 hostname 命令配置路由器的主机名。
R1(config)#hostname DS-1
步骤 2. 使用 ip domain-name命令配置路由器的主机域。
R1(config)#