华为 路由交换之PPPoE

CHAP

CHAP
挑战握手协议,通过3次握手发送MD5之后的校验值来进行认证。
发送的是MD5之后的校验值,但是配置依旧需要配置用户名和密码

PPPoE概述

发现阶段:获取对方以太网地址,以及确定唯一的PPPoE会话。
会话阶段:包括两部分,PPP街上阶段和PPP报文传输阶段
会话终结阶段:会话建立以后任意时刻,发送报文结束PPPoE会话

一、客户端会以广播形式发送PADI的报文来发现接入的服务器
二、所有的PPPoE服务器在收到PADI报文之后,将客户端请求的服务于自己能够提供的服务进行比较,如果可以提供,则单播回复PADO报文
三、PPPoE客户端选择最优先收到的PADO报文对应的PPPoE服务器,并单播发送一个PADR报文
四、PPPoE服务器生成唯一的PPPoE Session ID,并发送PADS报文给客户端,会话建立成功

PPPoE实现

1、服务器端:

aaa
[Server-R2-aaa]local-user hcie1 password cipher hcie1
[R2-aaa]local-user hcie1 service-type ppp
!
ip pool PPPoE1 //创建地址池
network 202.100.1.0 mask 255.255.255.0 //分配的IP地址
dns-list 114.114.114.114 8.8.8.8
!
interface Virtual-Template1 //创建逻辑的虚拟模版接口
ppp authentication-mode chap
remote address pool PPPoE1
ip address 202.100.1.1 255.255.255.0
#
interface GigabitEthernet0/0/0
pppoe-server bind Virtual-Template 1

2、客户端(传统VPN中的VPDN):

dialer-rule
dialer-rule 1 ip permit
!
interface Dialer1 //创建拨号接口
link-protocol ppp
ppp chap user hcie1
ppp chap password cipher heic1
ip address ppp-negotiate //地址的获取方式从对端服务器得到
dialer user QYT
dialer bundle 1
dialer-group 1
!
interface GigabitEthernet0/0/0
pppoe-client dial-bundle-number 1 //物理接口和逻辑接口绑定
<R1-Gateway>display ip int bri
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 4

Interface IP Address/Mask Physical Protocol
Dialer1 202.100.1.254/32 up up(s)       // 重点在于逻辑接口是否工作,物理接口在协议上是down的是正确的!
GigabitEthernet0/0/0 unassigned up down
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned up down
NULL0 unassigned up up(s)
Serial1/0/0 unassigned up up
Serial1/0/1 unassigned down down
<R1-Gateway>display pppoe-client session summary
PPPoE Client Session:
ID Bundle Dialer Intf Client-MAC Server-MAC State
1 1 1 GE0/0/0 00e0fcc246b1 00e0fc8e7a48 UP

PPPoE的优化:

1)MTU

mtu 1492

2)MSS

tcp adjust-mss 1200

3)DNS
拨号接口下:

ppp ipcp dns admit-any
ppp ipcp dns request

4)静态默认路由

[R1-Gateway]ip route-static 0.0.0.0 0.0.0.0 Dialer 1 // 由于dial1接口是一个PPP的接口
原文地址:https://www.cnblogs.com/jasonminghao/p/12439639.html