|
一、硬件连接
1、设备:Cisco 2500系列路由器两台
Pc机两台 以太网反转线、交叉线各两条 以太网口转串口接头两个
DCE—DTE 背对背连接线一条
2、连接:用一台2500router充当DCE局端,另一台充当DTE终端,所以用背对背线将router1的s0与router2的s1相连
分别用两条以太网反转线连接router的console口,另一端通过转接头连接到pc串口上
二、pc上启用超级终端
开始—附件—通讯—超级终端
连接时使用:选择连接到pc的串口位置,如com1
设置每秒位数:9600 或使用默认值
三、命令行界面(CLI)操作
Would you like to enter the initial configuration dialog? [yes]:no
Would you like to terminate autoinstall? [yes]:enter
四、对router1进行关于DCE的IOS设置
1、控制台口令
Router>en
Router#conf t
Router(config)#line con 0
Router(config-line)#login
Router(config-line)#password 123
Router(config-line)#^z
Router#show run ------明文
Router#exit
Press RETURN to get started.
Password: -------输入123
Router>
2、启用口令
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#enable password 456
Router(config)#enable secret 789
Router(config)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#show run
enable secret 5 $sdf$6978yhg$jnb76sd --------加密的
enable password 456 --------明文
注:当加密口令被设置后启用口令无效,且两个口令不能相同
Router>en
Enter password: --------输入456(无效)
Enter password: --------输入789
Router#
3、telnet口令
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password 123456
Router(config-line)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#show run
line vty 0 4
login
password 123456 ----------明文
4、接口设置
A 串口设置
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int s0 ------------------进入端口设置
Router(config-if)#ip address 172.16.0.1 255.255.255.0-------配置IP
Router(config-if)#no shut -----------------打开端口
%LINK-3-UPDOWN: Interface Serial0, changed state to up
%LINK-3-UPDOWN: Interface Serial0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
Router(config-if)#clock rate ?
<300-4000000> Choose clockrate from list above
1000000
1200
125000
1300000
148000
19200
2000000
2400
250000
38400
4000000
4800
500000
56000
64000
72000
800000
9600
Router(config-if)#clock rate 64000 ---------------设置时钟频率
Router(config-if)#bandwidth ?
<1-10000000> Bandwidth in kilobits
Router(config-if)#bandwidth 64 --------------设置端口分配带宽
Router(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#show int s0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 172.16.0.1/24
MTU 1500 bytes, BW 64 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Router#show run
Building configuration...
interface Serial0
ip address 172.16.0.1 255.255.255.0
no ip directed-broadcast
clock rate 64000
!
B 以太网口设置
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int e0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shut
Router(config-if)#^Z
%SYS-5-CONFIG_I: Configured from console by console
Router#show int e0
Ethernet0 is up, line protocol is up
Hardware is Lance, address is 000C.5285.1811 (bia 000C.5285.1811)
Internet address is 192.168.0.1/24
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive set (10 sec)
Router#show ip int brief -------------察看端口摘要
Interface IP-Address OK? Method Status Protocol
Serial0 172.16.0.1 YES unset up up
Serial1 unassigned YES unset administratively down down
Serial2 unassigned YES unset administratively down down
Ethernet0 192.168.0.1 YES unset up up
5主机名
Router(config)#hostname DCE
DCE(config)#
6、察看并保存设置
DCE#copy run start
Destination filename [startup-config]?
Building configuration...
[OK]
五、对router2进行关于DTE的IOS设置
对DTE的设置基本与DCE相同
不同处有;
1、DTE不需要时钟频率设置
2、串口s1:ip地址设置为172.16. 0.2
以太网口e0:ip设置为192.168.0.2
3、主机名设置为DTE
六、验证配置
1、DCE#ping 172.16..0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
2、DCE#telnet 192.168.0.2
注:此时DTE端必须同时设置启用口令及远程登录口令,当DCE端输入远程登录口令后才能登陆。
3、用交叉线分别将router上的以太网口与pc上网卡nic连接起来
对两台连接到router上的pc分别设置ip
网上邻居---属性-----网络----tcp/ip----属性
Pc1:192.168.0.3
Pc2:192.168.0.4
打开DOS
在pc1中输入ping 192.168.0.1 telnet 192.168.0.1 进行验证 |
|