ensp-PPPoE实验

实验拓扑如下:
在这里插入图片描述
图片标识错误:PPPoE服务器的ip地址应该是202.100.1.2/24

AR1:
客户端配置

[Huawei]sysname AR1
[AR1]dialer-rule      #进入dialer-rule视图
[AR1-dialer-rule]dialer-rule 1 ip permit #允许ip流量触发拨号
[AR1-dialer-rule]qu
[AR1]interface Dialer 1
May  1 2020 09:16:34-08:00 AR1 %%01IFPDT/4/IF_STATE(l)[0]:Interface Dialer1 has 
turned into UP state.
[AR1-Dialer1]link-protocol ppp     #协议设置为ppp
[AR1-Dialer1]ip address ppp-negotiate    #拨号接口地址从pppoe的服务器写上得到
[AR1-Dialer1]dialer user hcna   #hcna是一个标识    
[AR1-Dialer1]dialer bundle 1    #指定dialer 1 接口的编号(用于和物理接口绑定)
[AR1-Dialer1]qu
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1  #将pppoe拨号接口绑定到出接口
[AR1-GigabitEthernet0/0/0]qu
[AR1]int Dialer 1
[AR1-Dialer1]ppp chap user hcnp   #采用chap认证
[AR1-Dialer1]ppp chap password cipher hcnp123   #账号与密码需要与ISP端设置的账号密码一致
[AR1]ip route-static 0.0.0.0 0 202.100.1.2


[AR1]acl 2000                      #此处做一个nat地址转换,让内网地址通过拨号得到的地址上网
[AR1-acl-basic-2000]rule permit source any 
[AR1-acl-basic-2000]qu
[AR1]int Dialer 1
[AR1-Dialer1]nat outbound 2000

AR2:
服务端配置

<Huawei>system-view 
[Huawei]sysname AR2
[AR2]aaa
[AR2-aaa]local-user hcnp password cipher hcnp123
[AR2-aaa]local-user hcnp service-type ppp
Info: Add a new user.
[AR2-aaa]qu
[AR2]ip pool PPPoE   #配置地址池,用于分发地址
Info: It's successful to create an IP address pool.
[AR2-ip-pool-PPPoE]network 202.100.1.0 mask 24  #华为设置从最高的地址开始分配,所以第一个分配的地址是202.100.1.254
[AR2-ip-pool-PPPoE]excluded-ip-address 202.100.1.2   #因为这个地址是pppoe服务器使用的地址,所以该地址不分发
[AR2-ip-pool-PPPoE]dns-list 8.8.8.8  #配置分发的dns
[AR2-ip-pool-PPPoE]qu
[AR2]interface Virtual-Template 1   #配置虚拟模板和调用模板
May  1 2020 09:14:35-08:00 AR2 %%01IFPDT/4/IF_STATE(l)[0]:Interface Virtual-Temp
late1 has turned into UP state.
[AR2-Virtual-Template1]remote address pool PPPoE
[AR2-Virtual-Template1]ip address 202.100.1.2 24
[AR2-Virtual-Template1]qu
[AR2]interface g0/0/0
[AR2-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1
[AR2-GigabitEthernet0/0/0]ppp authentication-mode chap   #该接口使用chap认证
[AR2]ip route-static 0.0.0.0 0 202.100.1.254

在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值