PPPoE 拨号上网实验配置

发布时间:2026/7/12 5:12:09
PPPoE 拨号上网实验配置 一、IP 规划AR2PPPoE 服务器G0/0/0 ↔ AR1PPPoE 客户端G0/0/0互联网段 12.0.0.0/24AR1 G0/0/1 ↔ SW1内网 192.168.1.0/24AR2 环回模拟公网1.1.1.0/24用来测试上网连通性PPPoE 地址池12.0.0.0/24网关 12.0.0.2VT 模板地址内网 PCPC1192.168.1.10/24网关 192.168.1.1PC2192.168.1.20/24网关 192.168.1.1二、AR2PPPoE Server 广域网路由器sysname AR2 # 1.配置AAA认证用户 aaa local-user aa password cipher 123456 local-user aa service-type ppp # 2.创建PPPoE地址池 ip pool PPPoE_pool network 12.0.0.0 mask 24 gateway-list 12.0.0.2 # 3.虚拟模板VT1配置 interface Virtual-Template 1 ppp authentication-mode chap ip address 12.0.0.2 24 remote address pool PPPoE_pool ppp ipcp dns 8.8.8.8 # 4.外网接口绑定VT开启PPPoE Server interface GigabitEthernet 0/0/0 pppoe-server bind virtual-template 1 # 5.模拟公网环回口测试上网 interface LoopBack0 ip address 1.1.1.1 24 # 6.回程静态路由访问内网192.168.1.0路由 ip route-static 192.168.1.0 24 12.0.0.1三、AR1PPPoE Client 内网出口路由器sysname AR1 # 1.内网三层接口对接交换机 interface GigabitEthernet 0/0/1 ip address 192.168.1.1 24 # 2.配置Dialer拨号接口 interface Dialer 1 dialer user aa dialer bundle 1 ppp chap user aa ppp chap password cipher 123456 ip address ppp-negotiate # 3.外网接口绑定Dialer建立PPPoE会话 interface GigabitEthernet 0/0/0 pppoe-client dial-bundle-number 1 # 4.配置ACL匹配内网流量做NAT acl number 2000 rule permit source 192.168.1.0 0.0.0.255 # 5.拨号口配置NAT内网访问公网转换地址 interface Dialer 1 nat outbound 2000 # 6.默认路由所有流量走PPPoE拨号接口 ip route-static 0.0.0.0 0 Dialer 1四、PC 终端参数PC1IP192.168.1.10掩码255.255.255.0网关192.168.1.1DNS8.8.8.8PC2IP192.168.1.20掩码255.255.255.0网关192.168.1.1DNS8.8.8.8五、实验验证命令与现象1. AR1 客户端查看拨号状态正常状态会话 UPDialer1 自动获取到 12.0.0.0 段 IP 地址。2. AR2 服务器查看 PPPoE 在线用户3. 连通性测试AR1 ping 1.1.1.1公网环回通代表拨号链路正常PC1 ping 1.1.1.1通NAT 转换生效内网可访问广域网