路由器PPPOE拨号配置

简介:
实验拓扑图
 
 
IP地址规划
客户机:192.168.1.1 255.255.255.0
R1:
f0/0 192.168.1.254 255.255.255.0
R2:
f1/0 1.1.1.1 255.255.255.0
 
基本配置步骤:
 
R1
Router>en
Router#conf t
Router(config)#hostname R1
R1(config)#int f1/0   
R1(config-if)#pppoe enable  
R1(config-if)#pppoe-client dial-pool-number 1
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int dialer 1
R1(config-if)#ip address negotiated 
R1(config-if)#encapsulation ppp
R1(config-if)#ppp pap sent-username xiaowu password xiaowu
R1(config-if)#ppp authentication pap callin
R1(config-if)#mtu 1492
R1(config-if)#dialer pool 1
R1(config-if)#end
R1#conf t
R1(config)#int f0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no sh
R1(config-if)#end
R1#
 
==========================================================
 
R2
Router>en
Router#conf t
Router(config)#hostname R2
R2(config)#vpdn enable 
R2(config)#vpdn-group 1
R2(config-vpdn)#accept-dialin
R2(config-vpdn-acc-in)#protocol pppoe
R2(config-vpdn-acc-in)#virtual-template 1
R2(config-vpdn-acc-in)#end
R2#conf t
R2(config)#int virtual-template 1
R2(config-if)#ip address 1.1.1.1 255.255.255.0
R2(config-if)#encapsulation ppp
R2(config-if)#peer default ip address pool xiaowu
R2(config-if)#ppp authentication pap
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#ip local pool xiaowu 100.1.1.1 100.1.1.100
R2(config)#username xiaowu password xiaowu
R2(config)#int f1/0
R2(config-if)#pppoe enable 
R2(config-if)#no sh
R2(config-if)#end
R2#
 
 
观察路由表
 
R1
 
R1#show ip route 
*Mar 28 13:36:57.495: %SYS-5-CONFIG_I: Configured from console by console
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Dialer1
     100.0.0.0/32 is subnetted, 1 subnets
C       100.1.1.1 is directly connected, Dialer1
C    192.168.1.0/24 is directly connected, FastEthernet0/0
R1#
 
===========================================================
 
R2
 
R2#show ip route 
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Virtual-Access1.1
     100.0.0.0/32 is subnetted, 1 subnets
C       100.1.1.1 is directly connected, Virtual-Access1.1
R2#
 
我们所配置100.0.0.0网段已经被注入到对方,这就是PPP的一个特点,连接PPP的一条线路的两端无需是同一个网段,NCP会自动将对端注入到路由之中。当然,这样配置完成仅仅是拨号成功,客户端依然不能上网,需要做NAT,准确的说是PAT,这里面就不做演示了。


本文转自 Jhuster 51CTO博客,原文链接:http://blog.51cto.com/xwnet/143153,如需转载请自行联系原作者
相关文章
|
资源调度
除了nrm-pm,还有哪些工具可以管理多个包管理器的源?
除了nrm-pm,还有哪些工具可以管理多个包管理器的源?
655 127
|
前端开发 开发工具 iOS开发
原创Electron38.2+Vite7+Vue3+Pinia3+ArcoDesign客户端os管理系统模板
2025最新版原创研发Electron38.2+Vite7+Vue3 setup+ArcoDesign+Echarts仿MacOS/Wins风格桌面客户端OS系统解决方案。
693 10
|
存储 缓存 监控
Redis分区的核心原理与应用实践
Redis分区通过将数据分散存储于多个节点,提升系统处理高并发与大规模数据的能力。本文详解分区原理、策略及应用实践,涵盖哈希、范围、一致性哈希等分片方式,分析其适用场景与性能优势,并探讨电商秒杀、物联网等典型用例,为构建高性能、可扩展的Redis集群提供参考。
681 0
|
Python
pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)
pip安装包报错Could not find a version that satisfies the requirement pymysql (from versions: none)
1801 1
|
安全 生物认证 Android开发
深入探索iOS与Android操作系统的安全性差异
本文旨在通过对比分析iOS和Android两大主流移动操作系统在安全性方面的差异,揭示它们各自的安全机制、面临的挑战以及用户如何提升自身设备的安全保护。通过对系统架构、应用审核机制、数据加密方式及隐私政策的深入探讨,本文为读者提供了一个全面了解两大平台安全性的视角,并提出了实用的安全建议。
1457 29
qwen2.5 7b w8a8量化推理
qwen2.5 7B模型的a8w8量化推理
1036 0
|
人工智能 IDE Go
体验了下豆包MarsCode编程助手,惊艳到我了!
豆包 MarsCode 是一款 AI 编程助手,提供智能代码补全等功能,支持多种编程语言及 IDE,涵盖代码解释、审查与修复等辅助功能,旨在提升开发效率。其支持线上编辑器,无需搭建环境即可运行代码,体验接近本地 VS Code。尽管部分功能解释略显不足,但整体表现出色,可无缝替代 GitHub Copilot,适合希望提高开发效率的程序员使用。无论是在本地还是线上,MarsCode 都能显著提升编程体验。
2702 2
体验了下豆包MarsCode编程助手,惊艳到我了!
|
搜索推荐 算法 数据可视化
深入解析冒泡排序算法
深入解析冒泡排序算法
468 5
|
网络架构
5-8|什么样子的IP是内网地址
5-8|什么样子的IP是内网地址
|
Ubuntu Linux Shell
在Linux中,如何使用shell脚本判断某个服务是否正在运行?
在Linux中,如何使用shell脚本判断某个服务是否正在运行?