广域网学习
PPPoE技术(拨号上网)
PPPoE ( PPP over Ethernet ,以太网承载 PPP 协议)是一种把 PPP 帧封装到以太网帧中的链路层协议。
PPPoE 可以使以太网网络中的多台主机连接到远端的宽带接入服务器。
应用场景
PPPoE 组网结构采用 Client/Server 模型, PPPoE 的客户端为 PPPoE Client , PPPoE 的服务器端为
PPPoE Server。
PPPoE Client 向 PPPoE Server 发起连接请求, PPPoE Server 为 PPPoE Client 提供接入控制、认证等功能。


配置案例:
PPPoE Server 配置:
1 、完成 PPPoE 认证用户
[PPPoE Server]aaa
[PPPoE Server-aaa]local-user user1@system password cipher password@system
[PPPoE Server-aaa]local-user user1@system service-type ppp
2 、创建并配置 VT(Virtual-Template ,虚拟模版 )
[PPPoE Server]interface Virtual-Template 1
[PPPoE Server-Virtual-Template1]ppp authentication-mode chap //配置Server方作为认证方,使用chap认证方式
[PPPoE Server-Virtual-Template1]ip address 12.0.0.2 32 //因为公网地址必须保证唯一性
[PPPoE Server-Virtual-Template1]remote address pool PPPoE_pool //调用地址池,为Client分配地址
(不配该命令,如果是Server直连终端,则需要配置)
[PPPoE Server-Virtual-Template1]ppp ipcp dns 8.8.8.8
-------配置PPPoE Server为PPPoE Client指定DNS服务器地址
3 、配置地址池
[PPPoE Server]ip pool PPPoE_pool
[PPPoE Server-ip-pool-PPPoE_pool]network 12.0.0.0 mask 24
[PPPoE Server-ip-pool-PPPoE_pool]gateway-list 12.0.0.2
4 、在以太网接口启动 PPPoE Server 功能
[PPPoE Server]interface GigabitEthernet 0/0/0
[PPPoE Server-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1 ---- 绑定
VT 接口与物理接口
PPPoE Client 配置
1 、配置 Dialer 接口 --- 拨号程序接口
[PPPoE Client]interface Dialer 1
[PPPoE Client-Dialer1]dialer user user1
----- 使能共享 DCC 功能和指定对端用户名,必须与对端配置的 PPP 用户名一致,该名称对端可不设置
[PPPoE Client-Dialer1]dialer bundle 1
----- 设定拨号程序捆绑包
[PPPoE Client-Dialer1]ppp chap user user1@system
[PPPoE Client-Dialer1]ppp chap password cipher password@system
---- 配置本地作为被认证方,以及账号密码信息
[PPPoE Client-Dialer1]ip address ppp-negotiate
----- 配置由对端分配 IP 地址
2 、建立 PPPoE 会话
[PPPoE Client]interface GigabitEthernet 0/0/0
[PPPoE Client-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1
------ 指定 PPPoE 会话所对应的 Dialer bundle 。
3 、配置 NAT ,使内部用户可以上网 --- 注意配置 NAT 时出接口是 PPPOE 创建的虚拟接口
[PPPoE Client]acl 2000
[PPPoE Client-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[PPPoE Client]interface Dialer 1
[PPPoE Client-Dialer1]nat outbound 2000
4 、配置到 PPPoE Server 的静态路由
[PPPoE Client]ip route-static 0.0.0.0 0 Dialer 1
[CLIENT]ip route-static 0.0.0.0 0 100.0.0.1