实验五:路由器的基本配置:
选用路由器R2620, select options ,实现两个路由器的互联在serial串口模式下。
选用slot 0 serial 0,两路由器互联,
设置一端为DCE数据通信端,R1, serial 0/0
另一端为Dp端数据终端。
首先强调一下以前在交换机上没有用到的东西:
进入到串口模式下:在路由器一上设置如下:
interface serial 0/0
ip address 172.16.1.1 255.255.255.0
clock rate 64000只有在DCE端数据通信端设置时钟频率
no shutdown把端口打开
在另一个路由器上设置如下:
interface serial 0/0
ip address 172.16.1.2 255.255.255.0
no shutdown
然后进行测试:测试如下:
切换到特权模式下:ping 172.16.1.2
正式操作如下:
拓扑图如下:
配置如下:
路由器一设置如下:
Press Enter to Start
Router>
Router>
Router>
Router>
Router>enable
Router#configu terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname r1
r1(config)#exit
r1#exit
Router con0 is now available
Press RETURN to get started.
r1>
r1>
r1>enable
r1#configu terminal
Enter configuration commands, one per line. End with CNTL/Z.
r1(config)#interface serial 0/0
r1(config-if)#ip address 172.16.1.1 255.255.255.0
r1(config-if)#clock rate 64000
r1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINK-3-UPDOWN: Interface Serial0/0, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
路由器二设置如下:
r2
Press Enter to Start
Router>
Router>
Router>
Router>enable
Router#configu terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname r2
r2(config)#exit
r2#configu terminal
Enter configuration commands, one per line. End with CNTL/Z.
r2(config)#interface serial 0/0
r2(config-if)#ip address 172.16.1.2 255.255.255.0
r2(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0/0, changed state to up
测试如下:
r1(config-if)#
r1(config-if)#exit
r1(config)#exit
r1#ping 172.16.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms