华为PPPoE配置指南
本帖最后由 小乔 于 2022-4-25 09:55 编辑PPPoE简介
介绍PPPoE的定义和目的。
定义
PPPoE(PPP over Ethernet)协议是一种把PPP帧封装到以太网帧中的链路层协议。PPPoE可以使以太网网络中的多台主机连接到远端的宽带接入服务器。
目的
运营商希望把一个站点上的多台主机连接到同一台远程接入设备,同时接入设备能够提供与拨号上网类似的访问控制和计费功能。在众多的接入技术中,把多个主机连接到接入设备的最经济的方法就是以太网,而PPP协议可以提供良好的访问控制和计费功能,于是产生了在以太网上传输PPP报文的技术,即PPPoE。
PPPoE利用以太网将大量主机组成网络,通过一个远端接入设备连入因特网,并运用PPP协议对接入的每个主机进行控制,具有适用范围广、安全性高、计费方便的特点。
配置设备作为PPPoE Server示例
组网需求如图4-13所示,局域网内主机与设备直连,设备作为PPPoE Server,企业网内的主机需要通过PPPoE拨号接入Internet。用户在主机上安装拨号软件,每个主机单独使用一个帐号进行拨号上网。用户需求如下:
[*]PPPoE Server为主机动态分配IP地址。
[*]PPPoE Server通过AAA本地认证认证主机用户。
[*]PPPoE Server为主机分配DNS服务器地址。
图4-13设备作为PPPoE Server组网图
https://download.huawei.com/mdl/image/download?uuid=25280159d250492cb5be54d404140dad
配置思路采用如下的配置思路:
[*]配置通过使用全局地址池给对端分配地址,实现PPPoE Server为主机动态分配IP地址。
[*]配置PPPoE认证用户,实现PPPoE Server对用户主机的认证。
[*]配置PPPoE Server为对端设备指定DNS服务器的IP地址。
操作步骤
配置全局地址池pool1
<Huawei> system-view
sysname Router
ip pool pool1
network 192.168.10.0 mask 255.255.255.0
gateway-list 192.168.10.1
quit
配置PPPoE认证用户
aaa
authentication-scheme system_a
authentication-mode local
quit
authorization-scheme system_a
quit
domain system
authentication-scheme system_a
authorization-scheme system_a
quit
local-user user1@system password
Please configure the login password (8-128)
It is recommended that the password consist of at least 2 types of characters, i
ncluding lowercase letters, uppercase letters, numerals and special characters.
Please enter password:
Please confirm password:
Info: Add a new user.
local-user user1@system service-type ppp
quit
创建并配置VT
interface virtual-template 1
ppp authentication-mode chap domain system
ip address 192.168.10.1 255.255.255.0
remote address pool pool1
ppp ipcp dns 10.10.10.10 10.10.10.11
quit
在以太网接口GE1/0/0上启用PPPoE Server功能
interface gigabitethernet 1/0/0
undo portswitch
pppoe-server bind virtual-template 1
quit
quit
验证配置结果
# 以上配置完成后,可以在PPPoE Server和PPPoE Client上分别验证配置结果。
PPPoE Client
各主机安装PPPoE Client拨号软件后,配置好用户名和密码(此处为user1@system和huawei2012)就能使用PPPoE协议,拨号连接PPPoE Server。
PPPoE Server
在PPPoE Server上可以执行display pppoe-server session all命令,显示PPPoE会话的状态信息和配置信息。根据显示信息判断会话状态是否正常(状态为UP表示正常)、配置是否正确(是否和之前的数据规划和组网一致)。
<Router> display pppoe-server session all
Total Session: 1
SID Intf State OIntf RemMAC LocMAC
1 Virtual-Template1 UP GE1/0/0 00e0.fc03.0201 0819.a6cd.0680
配置文件
设备作为PPPoE Server的配置文件
#
sysname Router
#
ip pool pool1
gateway-list 192.168.10.1
network 192.168.10.0 mask 255.255.255.0
#
aaa
authentication-scheme system_a
authorization-scheme system_a
domain system
authentication-scheme system_a
authorization-scheme system_a
local-user user1@system password cipher %^%#9T`|L}K(4#J3k=+I8SiJrsM:RO[iy@Uuc:LTQJ,1%^%#
local-user user1@system privilege level 0
local-user user1@system service-type ppp
#
interface Virtual-Template1
ppp authentication-mode chap domain system
remote address pool pool1
ppp keepalive retry-times 2
ppp ipcp dns 10.10.10.10 10.10.10.11
timer hold 30
ip address 192.168.10.1 255.255.255.0
#
interface GigabitEthernet1/0/0
undo portswitch
pppoe-server bind Virtual-Template 1
#
return
**** Hidden Message *****
谢谢分享 32423423423
页:
[1]