华为 | 路由器PPP与MP-PPP的配置实例

  • 内容
  • 相关

PPP协议

PPP point to point点到点协议,是二层wan的协议。 连接的建立分为5个阶段分别是:dead阶段、established(LCP链路建立)阶段、authentcation认证阶段、network(网络控制协商参数)的NCP阶段、Terminate结束阶段

ppp分为lcp子层和ncp子层,lcp主要负责链路的建立和拆除、ncp主要负责在lcp建立链路完成后双方进行网络参数的协商,如ip地址、dns等的参数协商。如ipcp就是是包含在ncp子层中的一种专门负责ip协商的协议,ipxcp就是包含在ncp子层中的专门用于协商ipx的协议,因为NCP是一个协议族

WAN常用的点到点L2协议,用途最为广泛的协议,可以承载以太网、IP等多种协议(需要借用Virtual-Template虚拟接口来实现对以太网协议的支持,ip可以直接支持,可以直接在L3层配置ip地址)。

ppp配置

华为路由器AR系列为例,实现PPP的配置,认证采用chap进行。拓扑如下:

AR9为r1作为主认证端,AR10为r2作为被认证端,本例中只是用到ppp所以只使用s4/0/0接口相互连接做ppp链路。

配置如下:

r1认证端配置:

[AR9]system-view               进入全局模式,相当于cosco的enable
[AR9]sysname r1                 改名为r1  
[r1] aaa                               启用aaa配置管理
[r1-aaa]local-user u_ppp  password cipher p_ppp   在aaa数据库中创建一个用户名为u_ppp密码为p_ppp的本地账户
[r1-aaa]local-user u_ppp  service-type ppp            指明aaa这个用户是用作进行ppp认证的
[r1-aaa]quit                      退出
[r1]interface s4/0/0
[r1]link-protocol ppp      为S4/0/0接口在L2层封装PPP协议
[r1]ip address 12.1.1.1 255.255.255.0         为接口配置ip地址
[r1-Serial4/0/0]ppp authentication-mode chap         在主认证端上指明ppp的认证方式为chap
[r1-Serial4/0/0]remote address 12.1.1.22                  给被认证端分配指定的ip(12.1.1.22/24)

r2被认证端:

[r2]interface s4/0/0                         
[r2]link-protocol ppp                                 为S4/0/0接口在L2层封装PPP协议
[r2]ip address ppp-negotiate                    被认证端配置为接口自动向主认证端获取ip地址
[r2-Serial4/0/0]ppp chap user u_ppp           设置用于chap认证的用户名为u_ppp(与主认证端一致)
[r2-Serial4/0/0]ppp chap password simple p_ppp    设置用于chap认证的密码为p_ppp(与主认证端一致)

验证:查看ppp链路状态和查看r2上是否能自动获得r1分配的ip地址

display interface s4/0/0
Serial4/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2019-01-31 09:49:16 UTC-08:00
Description:HUAWEI, AR Series, Serial4/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet protocol processing : disabled
Link layer protocol is PPP
LCP opened, IPCP opened                       这里LCP子层和IPCP子层都open,ppp链路正常建立了
Last physical up time   : 2019-01-31 09:49:13 UTC-08:00
Last physical down time : 2019-01-31 09:49:12 UTC-08:00
Current system time: 2019-01-31 09:56:51-08:00
Physical layer is synchronous, Virtualbaudrate is 64000 bps
Interface is DTE, Cable type is V11, Clock mode is TC
Last 300 seconds input rate 6 bytes/sec 48 bits/sec 0 packets/sec
Last 300 seconds output rate 2 bytes/sec 16 bits/sec 0 packets/sec
display ip interface brief
Interface                         IP Address/Mask      Physical   Protocol 
GigabitEthernet0/0/0              unassigned           down       down     
GigabitEthernet0/0/1              unassigned           down       down     
GigabitEthernet0/0/2              unassigned           down       down     
Serial4/0/0                     12.1.1.22/32         up         up            被认证端的接口自动获取到了ip地址
NULL0                             unassigned           up         up(s)

MP-PPP及配置

MP-PPP是多条ppp链路进行逻辑捆绑的技术,主要用于解决带宽不足、冗余备份链路、提高ppp链路使用的灵活性等方面的问题

配置方面,MP-PPP有三种配置方法:

1使用Virtual-Template虚拟接口,将多条物理链路绑定到VT接口形成MP-PPP

2使用Virtual-Template基于用户名的MP-PPP建立,根据不同的用户名来进行不同的MP-PPP的捆绑(必须配置ppp认证)

3使用MP-group来配置MP-PPP,将多条物理链路捆绑接口加入MP-group组来形成MP-PPP捆绑(多数情况使用MP-group来进行配置,因为MP-group是专门用于MP-PPP的,配置明了,功能灵活)

本例中只介绍使用MP-Group进行MP-PPP的配置,实用配置。

 以上图为例,r1与r2使用链条链路连接,现在为了更好的增加带宽,需要将两条ppp链路捆绑成为一条MP-PPP链路,配置如下:

r1作为主认证方上配置:

1、首先依然是进入aaa增加一个用于ppp认证的用户(u_ppp)和密码(p_ppp)

aaa
local-user ppp password cipher u_ppp
local-user ppp service-type p_ppp

2、创建MP-group接口

interface Mp-group0/0/0
 remote address 12.1.1.22                         为对端的mp-group接口分配ip地址
 ip address 12.1.1.1 255.255.255.0            本接口ip地址,物理接口下就不用在配置ip地址了

3、分别在物理接口下开启ppp的chap认证,并将2条物理链路的接口加入到MP-group组中

interface Serial4/0/0
 link-protocol ppp
 ppp authentication-mode chap        在物理接口下启用ppp认证是因为mp-group接口不支持认证,只能在物理接口下做。
 ppp mp Mp-group 0/0/0                  将物理接口加入mp-group组中
#
interface Serial4/0/1                          同上配置
 link-protocol ppp
 ppp authentication-mode chap
 ppp mp Mp-group 0/0/0
#

r2作为被认证方配置:

interface Mp-group0/0/0
ip address ppp-negotiate                配置mp-group接口为获取ip地址
#
interface Serial4/0/0
 link-protocol ppp
 ppp chap user u_ppp                         被认证端chap认证使用的用户名为u_ppp
 ppp chap password simple p_ppp     被认证端chap认证使用的密码为p_ppp(明文)
 ppp mp Mp-group 0/0/0               将物理接口加入mp-group组中
#
interface Serial4/0/1                         同上
 link-protocol ppp
 ppp chap user u_ppp
 ppp chap password simple p_ppp
 ppp mp Mp-group 0/0/0
#

验证:

display ppp mp
 Mp-group is Mp-group0/0/0
 ===========Sublinks status begin======
 Serial4/0/0 physical UP,protocol UP
 Serial4/0/1 physical UP,protocol UP
 ===========Sublinks status end========
 Bundle Multilink, 2 members, slot 0, Master link is Mp-group0/0/0     包含2条链路
  0 lost fragments, 0 reordered, 0 unassigned,
 sequence 0/0 rcvd/sent
 The bundled sub channels are:                组中包含的ppp接口是:
      Serial4/0/0
      Serial4/0/1
或者查看物理接口,可以看到红色的:
display interface s4/0/0
Serial4/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2019-01-31 09:49:16 UTC-08:00
Description:HUAWEI, AR Series, Serial4/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet protocol processing : disabled
Link layer protocol is PPP
LCP opened, MP opened      说明是属于MP-group组的
Last physical up time   : 2019-01-31 09:49:13 UTC-08:00
Last physical down time : 2019-01-31 09:49:12 UTC-08:00
Current system time: 2019-01-31 09:23:53-08:00
Physical layer is synchronous, Virtualbaudrate is 64000 bps
Interface is DTE, Cable type is V11, Clock mode is TC
Last 300 seconds input rate 6 bytes/sec 48 bits/sec 0 packets/sec
Last 300 seconds output rate 2 bytes/sec 16 bits/sec 0 packets/sec

 您阅读这篇文章共花了:

上一篇:Linux | Linux系统下安装和配置SNMP

下一篇:Windows | 动态磁盘卷:简单卷、跨区卷 、带区卷 、镜像卷 、RAID5卷

本文标签:    

版权声明:本文依据CC-BY-NC-SA 3.0协议发布,若无特殊注明,本文皆为《fishyoung》原创,转载请保留文章出处。

本文链接:华为 | 路由器PPP与MP-PPP的配置实例 - http://www.fishyoung.com/post-216.html