• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C SR6600 SR6600-X系列路由器 典型配置案例集-R8128-6W101

38-H3C SR6600_SR6600-X路由器 PPP典型配置案例

本章节下载  (391.66 KB)

docurl=/cn/Service/Document_Software/Document_Center/Home/Routers/00-Public/Configure/Typical_Configuration_Example/H3C_SR6600_SR6600-X_CE(V7)-R7607-2683/202208/1674330_30005_0.htm

38-H3C SR6600_SR6600-X路由器 PPP典型配置案例

H3C SR6600/SR6600-X系列路由器

PPP配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2022 新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。

本文档中的信息可能变动,恕不另行通知。



1  特性简介

本文档介绍PPP协议相关的典型配置举例。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解了PPP、MP、PPPoE、DHCP协议。

3  MP+CHAP配置举例

3.1  组网需求

图1所示,设备Device A和Device B的Serial2/1/0和Serial2/1/1分别对应连接,使用MP-Group的方式建立MP链路,每个PPP链路使用CHAP进行认证。

图1 终端描述符捆绑MP组网图

 

3.2  使用版本

本举例是在R8128版本上进行配置和验证的。

3.3  配置注意事项

·     配置采用CHAP认证时两端的用户名和密码必须一致。

·     Serial接口配置完成之后,需要执行undo shutdown命令开启接口。

·     创建PPP用户需要在local-user命令的class关键字后面选择network参数。

3.4  配置步骤

3.4.1  配置Device A

(1)     为Device B创建本地用户,设置本地用户的服务类型为PPP

<DeviceA> system-view

[DeviceA] local-user userb class network

[DeviceA-luser-network-userb] password simple hello

[DeviceA-luser-network-userb] service-type ppp

[DeviceA-luser-network-userb] quit

(2)     配置串口Serial2/1/0,通过缺省的ISPsystemRotuer B进行CHAP认证。

[DeviceA] interface serial 2/1/0

[DeviceA-Serial2/1/0] link-protocol ppp

[DeviceA-Serial2/1/0] ppp authentication-mode chap domain system

[DeviceA-Serial2/1/0] quit

(3)     配置串口Serial2/1/1,通过缺省的ISPsystemRotuer B进行CHAP认证。

[DeviceA] interface serial 2/1/1

[DeviceA-Serial2/1/1] link-protocol ppp

[DeviceA-Serial2/1/1] ppp authentication-mode chap domain system

[DeviceA-Serial2/1/1] quit

(4)     在系统缺省的ISPsystem下,配置PPP用户使用本地认证方案。

[DeviceA] domain system

[DeviceA-isp-system] authentication ppp local

(5)     创建MP-group接口,配置相应的IP地址。

<DeviceA> system-view

[DeviceA] interface mp-group 2/0/0

[DeviceA-MP-group2/0/0] ip address 1.1.1.1 24

[DeviceA-MP-group2/0/0] quit

(6)     配置串口Serial2/1/0加入MP-Group 3/0/1并开启接口。

[DeviceA] interface serial 2/1/0

[DeviceA-Serial2/1/0] ppp mp mp-group 2/0/0

[DeviceA-Serial2/1/0] shutdown

[DeviceA-Serial2/1/0] undo shutdown

[DeviceA-Serial2/1/0] quit

(7)     配置串口Serial2/1/1加入MP-Group 3/0/1并开启接口。

[DeviceA] interface serial 2/1/1

[DeviceA-Serial2/1/1] ppp mp mp-group 2/0/0

[DeviceA-Serial2/1/1] shutdown

[DeviceA-Serial2/1/1] undo shutdown

[DeviceA-Serial2/1/1] quit

3.4.2  配置Device B

(1)     配置串口Serial2/1/0,封装的链路层协议为PPP,并配置采用CHAP认证时Device B的用户名和设置缺省的CHAP认证密码。

<DeviceB> system-view

[DeviceB] interface serial 2/1/0

[DeviceB-Serial2/1/0] link-protocol ppp

[DeviceB-Serial2/1/0] ppp chap user userb

[DeviceB-Serial2/1/0] ppp chap password simple hello

[DeviceB-Serial2/1/0] quit

(2)     配置串口Serial2/1/1,封装的链路层协议为PPP,并配置采用CHAP认证时Device B的用户名和设置缺省的CHAP认证密码。

[DeviceB] interface serial 2/1/1

[DeviceB-Serial2/1/1] link-protocol ppp

[DeviceB-Serial2/1/1] ppp chap user userb

[DeviceB-Serial2/1/1] ppp chap password simple hello

[DeviceB-Serial2/1/1] quit

(3)     创建MP-group接口,配置相应的IP地址。

[DeviceB] interface mp-group 2/0/0

[DeviceB-MP-group2/0/0] ip address 1.1.1.2 24

[DeviceB-MP-group2/0/0] quit

(4)     配置串口Serial2/1/0加入MP-Group 3/0/1并开启接口。

[DeviceB] interface serial 2/1/0

[DeviceB-Serial2/1/0] link-protocol ppp

[DeviceB-Serial2/1/0] ppp mp mp-group 2/0/0

[DeviceB-Serial2/1/0] shutdown

[DeviceB-Serial2/1/0] undo shutdown

[DeviceB-Serial2/1/0] quit

(5)     配置串口Serial2/1/1加入MP-Group 3/0/1并开启接口。

[DeviceB] interface serial 2/1/1

[DeviceB-Serial2/1/1] link-protocol ppp

[DeviceB-Serial2/1/1] ppp mp mp-group 2/0/0

[DeviceB-Serial2/1/1] shutdown

[DeviceB-Serial2/1/1] undo shutdown

[DeviceB-Serial2/1/1] quit

3.5  验证配置

(1)     在Device A上查看MP的相关信息。

[DeviceA] display ppp mp

Template: MP-group2/0/0

max-bind: 16, fragment: enabled, min-fragment: 128

  Master link: MP-group2/0/0, Active members: 2, Bundle Multilink

  Peer's endPoint descriptor: MP-group2/0/0

  Sequence format: long (rcv)/long (sent)

  Bundle Up Time: 2017/07/22  16:51:40:835

  0 lost fragments, 5 reordered, 0 unassigned, 0 interleaved

  Sequence: 4 (rcv)/5 (sent)

  Active member channels: 2 members

        Serial2/1/0                 Up-Time:2017/07/22  16:51:40:836

        Serial2/1/1                 Up-Time:2017/07/22  16:51:53:542

(2)     在Device A上查看MP-group2/0/0接口的相关信息。

[DeviceA] display interface mp-group 2/0/0

MP-group2/0/0

Current state: UP

Line protocol state: UP

Description: MP-group2/0/0 Interface

Bandwidth: 128kbps

Maximum Transmit Unit: 1500

Hold timer: 10 seconds

Internet Address is 1.1.1.1/24 Primary

Link layer protocol: PPP

LCP: opened, MP: opened, IPCP: opened

Physical: MP, baudrate: 128000 bps

Output queue - Urgent queuing: Size/Length/Discards 0/100/0

Output queue - Protocol queuing: Size/Length/Discards 0/500/0

Output queue - FIFO queuing: Size/Length/Discards 0/75/0

Last clearing of counters: Never

Last 300 seconds input rate: 1 bytes/sec, 8 bits/sec, 0 packets/sec

Last 300 seconds output rate: 1 bytes/sec, 8 bits/sec, 0 packets/sec

Input: 8 packets, 466 bytes, 0 drops

Output: 8 packets, 456 bytes, 0 drops

(3)     在DeviceA上ping对端IP地址。

[DeviceA] ping 1.1.1.2

Ping 1.1.1.2 (1.1.1.2): 56 data bytes, press CTRL_C to break

56 bytes from 1.1.1.2: icmp_seq=0 ttl=255 time=25.749 ms

56 bytes from 1.1.1.2: icmp_seq=1 ttl=255 time=25.751 ms

56 bytes from 1.1.1.2: icmp_seq=2 ttl=255 time=25.521 ms

56 bytes from 1.1.1.2: icmp_seq=3 ttl=255 time=25.512 ms

56 bytes from 1.1.1.2: icmp_seq=4 ttl=255 time=25.599 ms

--- Ping statistics for 1.1.1.2 ---

5 packets transmitted, 5 packets received, 0.0% packet loss

round-trip min/avg/max/std-dev = 25.512/25.626/25.751/0.105 ms

<DeviceA>%Jul 22 17:08:22:460 2017 DeviceA PING/6/PING_STATISTICS: Ping statisti

cs for 1.1.1.2: 5 packets transmitted, 5 packets received, 0.0% packet loss, rou

nd-trip min/avg/max/std-dev = 25.512/25.626/25.751/0.105 ms.

3.6  配置文件

·     Device A:

#

interface Serial2/1/0

 ppp authentication-mode chap domain system

 ppp mp MP-group2/0/0

#

interface Serial2/1/1

 ppp authentication-mode chap domain system

 ppp mp MP-group2/0/0

#

interface MP-group2/0/0

 ip address 1.1.1.1 255.255.255.0

#

local-user 123 class network

 password cipher $c$3$5ulb/vg58eiBIm5EnilnsZ2cS2Cmwg==

 service-type ppp

 authorization-attribute user-role network-operator

#

·     Device B:

#

interface Serial2/1/0

 ppp chap password cipher $c$3$4kD4T3bLZ/lngijhEKIS70/oTbNSkw==

 ppp chap user 123

 ppp mp MP-group2/0/0

#

interface Serial2/1/1

 ppp chap password cipher $c$3$mVlcV3W+YQBgmxKePKpZV9tTcaFhXg==

 ppp chap user 123

 ppp mp MP-group2/0/0

#

interface MP-group2/0/0

 ip address 1.1.1.2 255.255.255.0

#

4  PPPoE Server通过远端DHCP服务器为用户分配IP地址配置举例

4.1  组网需求

图2所示,某小区通过PPPoE方式拨号上网,小区用户的主机Host A通过PPPoE方式拨号到Device A上,Device A作为小区的PPPoE Server为用户提供接入控制和CHAP认证服务,并且通过Device B为主机分配IP地址。

图2 PPPoE Server配置组网图

 

4.2  使用版本

本举例是在R8128版本上进行配置和验证的

4.3  配置注意事项

·     配置采用CHAP认证时两端的用户名和密码必须一致。

·     创建PPP用户需要在local-user命令的class关键字后面选择network参数。

4.4  配置步骤

1. 配置Device A

(1)     配置GigabitEthernet2/0/1接口IP地址为10.1.1.1,GigabitEthernet2/0/2接口IP地址为3.1.1.2。

<DeviceA> system-view

[DeviceA] interface gigabitethernet 2/0/1

[DeviceA-GigabitEthernet2/0/1] ip address 10.1.1.1 24

[DeviceA-GigabitEthernet2/0/1] quit

[DeviceA] interface gigabitethernet 2/0/2

[DeviceA-GigabitEthernet2/0/2] ip address 3.1.1.2 24

[DeviceA-GigabitEthernet2/0/2] quit

(2)     配置虚拟模板接口10的参数,采用CHAP认证对端,使用DHCP地址池pool1为用户分配IP地址,配置本端的IP地址。

<DeviceA> system-view

[DeviceA] interface virtual-template 10

[DeviceA-Virtual-Template10] ppp authentication-mode chap domain system

[DeviceA-Virtual-Template10] ip address 1.1.1.1 32

[DeviceA-Virtual-Template10] quit

(3)     在GigabitEthernet2/0/1接口上启用PPPoE Server协议,将该以太网接口与虚拟模板接口10绑定。

[DeviceA] interface gigabitethernet 2/0/1

[DeviceA-GigabitEthernet2/0/1] pppoe-server bind virtual-template 10

[DeviceA-GigabitEthernet2/0/1] quit

(4)     启用DHCP服务。

[DeviceA] dhcp enable

(5)     启用DHCP中继的用户地址表项记录功能。

[DeviceA] dhcp relay client-information record

(6)     创建中继地址池pool1,指定匹配该地址池的DHCPv4客户端所在的网段地址,并指定中继地址池对应的DHCP服务器地址。

[DeviceA] dhcp server ip-pool pool1

[DeviceA-dhcp-pool-pool1] gateway-list 2.2.2.2 export-route

[DeviceA-dhcp-pool-pool1] remote-server 3.1.1.1

[DeviceA-dhcp-pool-pool1] quit

(7)     配置与DHCP服务器连接的GigabitEthernet2/0/2接口的IP地址。

[DeviceA] interface gigabitethernet 2/0/2

[DeviceA-GigabitEthernet2/0/2] ip address 3.1.1.2 24

[DeviceA-GigabitEthernet2/0/2] quit

(8)     配置PPPoE用户。

[DeviceA] local-user user1 class network

[DeviceA-luser-network-user1] password simple pass1

[DeviceA-luser-network-user1] service-type ppp

[DeviceA-luser-network-user1] quit

# 在系统缺省的ISP域system下,配置域用户使用本地认证方案

[DeviceA] domain system

[DeviceA-isp-system] authentication ppp local

[DeviceA-isp-system] authorization-attribute ip-pool pool1

[DeviceA-isp-system] quit

2. 配置Device B

(1)     配置GigabitEthernet2/0/2接口IP地址为3.1.1.1。

<DeviceA> system-view

 [DeviceA] interface gigabitethernet 2/0/2

[DeviceA-GigabitEthernet2/0/2] ip address 3.1.1.1 24

[DeviceA-GigabitEthernet2/0/2] quit

(2)     启用DHCP服务。

<DeviceB> system-view

[DeviceB] dhcp enable

(3)     创建DHCP地址池pool1,配置为DHCP客户端分配的IP地址网段和网关地址。

[DeviceB] dhcp server ip-pool pool1

[DeviceB-dhcp-pool-pool1] network 2.2.2.0 24

[DeviceB-dhcp-pool-pool1] gateway-list 2.2.2.1

[DeviceB-dhcp-pool-pool1] quit

(4)     配置与PPPoE Server连接的GigabitEthernet2/0/2接口的IP地址。

[DeviceB] interface gigabitethernet 2/0/2

[DeviceB-GigabitEthernet2/0/2] ip address 3.1.1.1 24

[DeviceB-GigabitEthernet2/0/2] quit

(5)     配置到PPPoE Server的静态路由。

[DeviceB] ip route-static 2.2.2.0 24 3.1.1.2

3. 4. 验证配置

(1)     鼠标右键单击“网上邻居”,选择属性,进入网络连接界面。

图3 网络连接界面

 

(2)     选择“创建一个新的连接”,进入新建连接向导界面,单击<下一步>按钮。

(3)     选择“连接到Internet(C)”选项,单击<下一步>按钮。

图4 选择网络连接类型界面

 

(4)     选择“手动设置我的连接”,单击<下一步>按钮。

图5 准备好界面

 

(5)     选择“用要求用户名和密码的宽带连接来连接”,单击<下一步>按钮。

图6 Internet连接界面

 

(6)     输入一个ISP名称,单击<下一步>按钮。或者直接单击<下一步>按钮跳过。

图7 连接名界面

 

(7)     选择“任何人使用”,单击<下一步>按钮。

图8 可用连接界面

 

(8)     输入用户名和密码,分别为user1和pass1。单击<下一步>按钮。

图9 Internet账户信息界面

 

(9)     单击<完成>按钮,出下如下界面,单击<连接>按钮。

图10 宽带连接界面

 

(10)     再次双击网络连接里的宽带连接,显示如下图,表示已连接成功。

图11 连接成功界面

 

当Host使用用户名user1、密码pass1,通过PPPoE接入Device A后,Device B通过DHCPv4协议为Host分配一个IP地址。

显示DHCP中继Device A的用户地址表项信息。

[DeviceA] display dhcp relay client-information

Total number of client-information items: 1

Total number of dynamic items: 1

Total number of temporary items: 0

IP address       MAC address      Type        Interface            VPN name

2.2.2.1          3408-0499-b48c   Dynamic     VA0                  N/A

显示DHCP服务器Device B的DHCP地址绑定信息。

[DeviceA] display dhcp server ip-in-use

IP address       Client identifier/    Lease expiration      Type

                 Hardware address

2.2.2.1          0033-3430-382e-3034-  Jul 24 16:28:57 2017  Auto(C)

                 3939-2e62-3438-632d-

                 5641-30

4.5  配置文件

·     Device A:

#

 dhcp enable

 dhcp relay client-information record

#

dhcp server ip-pool pool1

 gateway-list 2.2.2.10 2.2.2.20 export-route

 remote-server 3.1.1.1

#

interface Virtual-Template10

 ppp authentication-mode chap domain system

 ip address 1.1.1.1 255.255.255.0

#

interface GigabitEthernet2/0/1

 port link-mode route

 pppoe-server bind virtual-template 10

#

interface GigabitEthernet2/0/2

 port link-mode route

 ip address 3.1.1.2 255.255.255.0

#

domain system

 authorization-attribute ip-pool pool1

 authentication ppp local

#

local-user user1 class network

 password cipher $c$3$rgL97ckhgtCEhbMs1yy7lxMp2yVuIOk8

 service-type ppp

 authorization-attribute user-role network-operator

·     Device B:

#

 dhcp enable

#

dhcp server ip-pool pool1

#

dhcp server ip-pool pool1

 gateway-list 2.2.2.1

 network 2.2.2.0 mask 255.255.255.0

#

interface GigabitEthernet2/0/2

 port link-mode route

 ip address 3.1.1.1 255.255.255.0

#

ip route-static 2.2.2.0 24 3.1.1.2

#

5  相关资料

·     H3C SR6600 SR6600-X 路由器 二层技术-广域网接入配置指导-R0106

·     H3C SR6600 SR6600-X 路由器 二层技术-广域网接入命令参考-R0106

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们