网络工程师Day3--PPPoE配置实验

实验2-2 配置PPPoE客户端

学习目标

掌握PPPoE客户端拨号接口的配置方法

掌握PPPoE客户端认证的配置方法

拓扑图

网络工程师Day3--PPPoE配置实验_第1张图片

场景

企业在运营商开通了高速DSL服务用于支持广域网业务,R1和R3分别十企业分支的边缘路由器,他们通过PPPoE服务器(R2)连接到运营商网络。您需要在企业的边缘路由器上进行PPPoE客户端的配置,让局域网中的主机可以通过PPPoE拨号访问外部资源。

操作步骤

步骤一 实验环境准备

步骤二 配置PPPoE服务器

虽然PPPoE服务器不在企业网络中,但是本实验中仍需要配置PPPoE服务器,以用于认证企业网络的边缘路由器R1和R3.

R2

[R2]ip pool pool1
Info: It's successful to create an IP address pool.
[R2-ip-pool-pool1]network 119.84.111.0 mask 255.255.255.0
[R2-ip-pool-pool1]gateway-list 119.84.111.254
[R2-ip-pool-pool1]quit
[R2]interface Virtual-Template 1
[R2-Virtual-Template1]ppp authentication-mode chap
[R2-Virtual-Template1]ip add 119.84.111.254 255.255.255.0	
[R2-Virtual-Template1]remote address pool pool1
[R2-Virtual-Template1]quit

在R2的G 0/0/0接口绑定虚拟模板

[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1
[R2-GigabitEthernet0/0/0]quit

为PPPoE被认证方创建合法的账号密码

[R2]aaa
[R2-aaa]local-user huawei1 password cipher huawei123
Info: Add a new user.
[R2-aaa]local-user huawei1 service-type ppp
[R2-aaa]local-user huawei2 password cipher huawei123
Info: Add a new user.
[R2-aaa]local-user huawei2 service-type ppp
[R2-aaa]quit

步骤三 配置PPPoE客户端

将R1配置成PPPoE客户端,需要在R1上创建拨号接口并开启PPP认证功能。配置PPP被认证方的用户名和密码(必须和PPPoE服务器上一致)

[R1]dialer-rule
[R1-dialer-rule]dialer-rule 1 ip permit
[R1-dialer-rule]quit
[R1]interface dialer 1
[R1-Dialer1]dialer user user1
[R1-Dialer1]dialer-group 1
[R1-Dialer1]dialer bundle 1
[R1-Dialer1]ppp chap user huawei1
[R1-Dialer1]ppp chap password cipher huawei123
[R1-Dialer1]dialer timer idle 300
INFO:  The configuration will become effective after link reset.
[R1-Dialer1]dialer queue-length 8
[R1-Dialer1]ip address ppp-negotiate
[R1-Dialer1]quit

将PPPoE拨号接口绑定到出接口

[R1]interface g 0/0/0
[R1-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
[R1-GigabitEthernet0/0/0]quit

配置本端到PPPoE服务器的缺省静态路由

[R1]ip route-static 0.0.0.0 0.0.0.0 dialer 1

将R3配置为PPPoE客户端,配置步骤同R1

改动之处在于

[R1-Dialer1]ppp chap user huawei1

步骤四 验证配置结果

执行 display pppoe-server session all命令,查看PPPoE会话的状态和配置信息

display pppoe-server session all
SID Intf  State OIntf  RemMAC LocMAC
1   Virtual-Template1:0   UPGE0/0/000e0.fcd7.18f2 00e0.fc01.6244
2   Virtual-Template1:1   UPGE0/0/000e0.fc8c.5146 00e0.fc01.6244

查看R1和R3上的拨号接口的信息,并确认拨号接口能够从PPPoE服务器获取IP地址

R1

 display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 3

Interface IP Address/Mask  Physical   Protocol  
Dialer1   119.84.111.253/32up up(s) 
GigabitEthernet0/0/0  unassigned   up down  
GigabitEthernet0/0/1  unassigned   down   down  
GigabitEthernet0/0/2  unassigned   down   down  
NULL0 unassigned   up up(s) 

R3

[R3]dis ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 3

Interface IP Address/Mask  Physical   Protocol  
Dialer1   119.84.111.252/32up up(s) 
GigabitEthernet0/0/0  unassigned   up down  
GigabitEthernet0/0/1  unassigned   down   down  
GigabitEthernet0/0/2  unassigned   down   down  
NULL0 unassigned   up up(s) 

你可能感兴趣的:(网络工程师)