温馨提示:欢迎对技术感兴趣的新手朋友们,希望这些知识点能对大家有帮助。如果有什么不解或疑惑或建议,可留言小编或邮件2355331040@qq.com,我将尽快给予解决。感谢大家的支持和关注,谢谢!!!
拓扑图
图6.1 HDLC和PPP配置实验拓扑图
回顾
上一集讲到实验环境准备、为R1、R2和R3的串行接口配置IP地址、在串行接口上启用HDLC协议。接下来我们将继续下一个步骤配置OSPF、管理串口连接、修改串行接口的封装类型为PPP等操作。
步骤四 配置OSPF
在三台路由器上都启用OSPF路由协议,并发布各自的直连路由。
[R1]ospf 1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 10.0.12.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 10.0.23.0 0.0.0.255
[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 10.0.23.0 0.0.0.255
配置完成后,检查设备是否通过OSPF协议学习到了相应的路由。
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.23.0/24 OSPF 10 3124 D 10.0.12.2 Serial1/0/0
……output omit……
确认相应的路由信息都已通过OSPF协议学习到。
在R1上,执行ping命令,检测R1和R3间的连通性。
<R1>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=254 time=44 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=254 time=39 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=254 time=39 ms
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=254 time=40 ms
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=254 time=39 ms
步骤五 管理串口连接
查看串行接口连接的线缆的类型、接口状态和时钟频率,并修改时钟频率。
<R1>display interface Serial1/0/0
Serial1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2016-03-10 11:25:08
Description:HUAWEI, AR Series, Serial1/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet Address is 10.0.12.1/24
Link layer protocol is nonstandard HDLC
Last physical up time : 2016-03-10 11:23:55
Last physical down time : 2016-03-10 11:23:55
Current system time: 2016-03-10 11:51:12
Physical layer is synchronous, Baudrate is 64000 bps
Interface is DCE, Cable type is V35, Clock mode is DCECLK1
Last 300 seconds input rate 5 bytes/sec 40 bits/sec 0 packets/sec
Last 300 seconds output rate 2 bytes/sec 16 bits/sec 0 packets/sec
…output omit…
回显信息表明R1的S1/0/0接口连接的是DCE线缆,时钟频率是64000bit/s。DCE设备可以控制时钟频率和带宽。
将R1和R2间链路的时钟频率修改为128000bit/s。这一操作需在DCE设备R1上执行。
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]baudrate 128000
配置完成后,查看串行接口的状态,确认时钟频率已修改。
<R1>display interface Serial1/0/0
Serial1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2016-03-10 11:25:08
Description:HUAWEI, AR Series, Serial1/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet Address is 10.0.12.1/24
Link layer protocol is nonstandard HDLC
Last physical up time : 2016-03-10 11:23:55
Last physical down time : 2016-03-10 11:23:55
Current system time: 2016-03-10 11:54:19
Physical layer is synchronous, Baudrate is 128000 bps
Interface is DCE, Cable type is V35, Clock mode is DCECLK1
Last 300 seconds input rate 6 bytes/sec 48 bits/sec 0 packets/sec
Last 300 seconds output rate 4 bytes/sec 32 bits/sec 0 packets/sec
…output omit…
步骤六 修改串行接口的封装类型为PPP
在R1和R2以及R2和R3间修改串行接口使用PPP封装。链路两端必须配置相同的封装类型,否则接口状态会出现“Down”的情况。
[R1]interface Serial 1/0/0
[R1-Serial1/0/0]link-protocol ppp
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R2]interface Serial 1/0/0
[R2-Serial1/0/0]link-protocol ppp
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R2-Serial1/0/0]quit
[R2]interface Serial 2/0/0
[R2-Serial2/0/0]link-protocol ppp
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
[R3]interface Serial 2/0/0
[R3-Serial2/0/0]link-protocol ppp
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]:y
配置完成后,检测链路连通性。
<R2>ping 10.0.12.1
PING 10.0.12.1: 56 data bytes, press CTRL_C to break
Reply from 10.0.12.1: bytes=56 Sequence=1 ttl=255 time=22 ms
Reply from 10.0.12.1: bytes=56 Sequence=2 ttl=255 time=27 ms
Reply from 10.0.12.1: bytes=56 Sequence=3 ttl=255 time=27 ms
Reply from 10.0.12.1: bytes=56 Sequence=4 ttl=255 time=27 ms
Reply from 10.0.12.1: bytes=56 Sequence=5 ttl=255 time=27 ms
<R2>ping 10.0.23.3
PING 10.0.23.3: 56 data bytes, press CTRL_C to break
Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=35 ms
Reply from 10.0.23.3: bytes=56 Sequence=2 ttl=255 time=40 ms
Reply from 10.0.23.3: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 10.0.23.3: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 10.0.23.3: bytes=56 Sequence=5 ttl=255 time=40 ms
如果无法Ping通,请查看接口状态,观察协议状态是否正常。
<R1>display interface Serial1/0/0
Serial1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2016-03-10 12:35:41
Description:HUAWEI, AR Series, Serial1/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet Address is 10.0.12.1/24
Link layer protocol is PPP
LCP opened, IPCP opened
Last physical up time : 2016-03-10 11:57:20
Last physical down time : 2016-03-10 11:57:19
Current system time: 2016-03-10 13:38:03
Physical layer is synchronous, Baudrate is 128000 bps
Interface is DCE, Cable type is V35, Clock mode is DCECLK1
Last 300 seconds input rate 7 bytes/sec 56 bits/sec 0 packets/sec
Last 300 seconds output rate 4 bytes/sec 32 bits/sec 0 packets/sec
…output omit…
下集预告:检查路由表项的变化、在R1和R2间的PPP链路启用PAP认证功能、在R2和R3间的PPP链路启用CHAP认证功能、使用debug命令查看R2和R3之间使用CHAP建立PPP连接的协商过程
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。