当前位置: 首页 > news >正文

CCNA课程实验-13-PPPoE

目录

  • 实验条件
    • 网络拓朴
    • 需求
  • 配置实现
    • 基础配置
      • 模拟运营商`ISP`配置
      • ISP的DNS配置
      • 出口路由器`OR`基础配置
      • PC1基础配置
    • 出口路由器`OR`配置
      • `PPPOE拨号`
      • 创建NAT(PAT端口复用)
    • `PC1`测试结果

实验条件

网络拓朴

在这里插入图片描述

需求

  1. OR使用PPPoE的方式向ISP发送拨号的用户名和密码,用户名:SPOTO 密码:SPOTO123,ISP没有告知使用哪种认证方式,拨号成功后自动获取IP信息,以及本地自动生成一条默认路由指向ISP;
  2. 配置PAT实现PC1能ping通ISP上的8.8.8.8;# 配置实现

配置实现

基础配置

模拟运营商ISP配置

  1. 先创建用户库
  2. 再创建虚拟接口模板
    a. 配置虚拟接口模板的IP地址
    b. 指定封装ppp协议
    c. 指定认证协商协议(PAP/CHAP)
    d. NCP阶段, IP地址下发配置
  3. 用BBA组与虚拟接口模板关联
  4. 进入物理接口关联到BBA组
// 创建用户账号信息
ISP(config)#username cisco password ccie
// 创建ip地址池,可以是一个地址也可以是一个范围的地址
// 该地址池也可以用ip dhcp pool ipspool来创建,和dhcp服务共用池
ISP(config)#ip local pool ccieips 202.101.1.10// 创建虚拟接口模板
ISP(config)#int virtual-template 1
// 需要在虚拟接口上配置IP地址,而不是在物理接口上
ISP(config-if)#ip address 202.101.1.1 255.255.255.0
// LCP,链路层协商,在虚拟接口封装PPP协议
ISP(config-if)#encapsulation ppp
// 指定认证的协议
ISP(config-if)#ppp authentication pap
// NCP,网络层协商 从地址池中获取地址, 用来下发IP地址
ISP(config-if)#peer default ip address pool ccieips
// 配置空闲时长, 超过自动断开,单位秒
ISP(config-if)#ppp timeout idle ?<1-4294967>  Idle timeout value in seconds
// 做以一个优化 因为PPPoE会额外的添加8字节的开销,防止超过MTU导致丢包
ISP(config-if)#ip mtu 1492
ISP(config-if)#no shutdown 
ISP(config-if)#exit// 用BBA组与虚拟接口模板关联
ISP(config)#bba-group pppoe ISP
ISP(config-bba-group)#virtual-template 1
ISP(config-bba-group)#exitISP(config)#int e0/1
ISP(config-if)#no shutdown 
ISP(config-if)#pppoe enable group ISP
ISP(config-if)#exit

ISP的DNS配置

// 启用DNS服务
ISP(config)#ip dns server
// 添加解析记录
ISP(config)#ip host www.test.local 8.8.8.8
ISP(config)#int e0/0
ISP(config-if)#ip address 8.8.8.8 255.255.255.0
ISP(config-if)#no shutdown
ISP(config-if)#

出口路由器OR基础配置

配置dhcp服务

OR(config)#ip dhcp pool HOME
OR(dhcp-config)#network 192.168.10.0 255.255.255.0
OR(dhcp-config)#default-route 192.168.10.254
OR(dhcp-config)#dns-server 8.8.8.8 
OR(dhcp-config)#exit
OR(config)#ip dhcp excluded-address 192.168.10.254OR(config)#int e0/0
OR(config-if)#ip address 192.168.10.254 255.255.255.0 
OR(config-if)#no shutdown
OR(config-if)#

PC1基础配置

PC1(config)#no ip routing
PC1(config)#int e0/0
PC1(config-if)#ip address dhcp
PC1(config-if)#no shutdown

出口路由器OR配置

PPPOE拨号

  1. 先创建拨号口
    a. LCP
    b. 认证(PAP、CHAP)
    c. 下发默认地址
    d. NCP
    e. 创建拨号池
  2. 进入物理接口与上面创建的拨号池关联
// 先创建拨号口
OR(config-if)#int dialer 1
// LCP阶段指定封装PPP协议
OR(config-if)#encapsulation ppp
// 修正包大小
OR(config-if)#ip mtu 1492
// ip地址协商
OR(config-if)#ip address negotiated
// NCP阶段 添加一条默认路由到PPPOE服务端
OR(config-if)#ppp ipcp route default
// 创建拨号池
OR(config-if)#dialer pool 1      
OR(config-if)#no shutdown
OR(config-if)#exit// 进入接口关联拨号池
OR(config)#int e0/1
//OR(config-if)#pppoe enable group global 
OR(config-if)#pppoe-client dial-pool-number 1
OR(config-if)#no shutdown 

创建NAT(PAT端口复用)

OR(config-if)#int dialer 1
OR(config-if)#ip nat outside
OR(config-if)#int e0/0
OR(config-if)#ip nat inside
OR(config-if)#exit     
OR(config)#ip access-list standard NAT-PAT
OR(config-std-nacl)#permit 192.168.10.0 0.0.0.255
OR(config-std-nacl)#exit
OR(config)#ip nat inside source list NAT-PAT interface dialer 1 overload
OR(config)#do show ip nat translations

PC1测试结果

PC1#ping www.test.local
Translating "www.test.local"...domain server (8.8.8.8) [OK]Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
PC1#

OR路由器

OR(config)#do show ip route                                             
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2ia - IS-IS inter area, * - candidate default, U - per-user static routeo - ODR, P - periodic downloaded static route, H - NHRP, l - LISPa - application route+ - replicated route, % - next hop overrideGateway of last resort is 101.1.1.254 to network 0.0.0.0S*    0.0.0.0/0 [1/0] via 101.1.1.254101.0.0.0/32 is subnetted, 2 subnets
C        101.1.1.1 is directly connected, Dialer1
C        101.1.1.254 is directly connected, Dialer1192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.10.0/24 is directly connected, Ethernet0/0
L        192.168.10.254/32 is directly connected, Ethernet0/0
OR(config)#do show ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
icmp 101.1.1.1:0       192.168.10.1:0     8.8.8.8:0          8.8.8.8:0
OR(config)# 

相关文章:

  • node插件MongoDB(四)—— 库mongoose 的个性话读取(字段筛选、数据排序、数据截取)(四)
  • django|报错SQLite 3.8.3 or later is required的解决方案
  • 【数据结构】树与二叉树(十):二叉树的先序遍历(非递归算法NPO)
  • cefsharp 93.1.140 如何在js中暴露c#类
  • MySQL的索引和复合索引
  • SpringBoot中required a bean of type ‘java.lang.String‘ that could not be found问题
  • RabbitMQ集群配置以及负载均衡配置
  • 【Linux】tree命令的独特用法
  • Python实战:绘制直方图的示例代码,数据可视化获取样本分布特征
  • 数据分析实战 | 逻辑回归——病例自动诊断分析
  • 【GIT】Git中的Gui介绍,使用Git中的ssh协议介绍,使用使用idea集成Git
  • Java中的的default关键字 Java虚拟扩展方法(Java Virtual Extension Method,JVEM)
  • IDEA中常用的调试快捷键
  • debian/ubuntu/windows配置wiregurad内网服务器(包含掉线自启动)
  • KVM切换器与NVR的完美结合,实现高效便捷的视频监控管理
  • Apache的基本使用
  • create-react-app项目添加less配置
  • JavaScript 奇技淫巧
  • JavaScript对象详解
  • leetcode讲解--894. All Possible Full Binary Trees
  • Storybook 5.0正式发布:有史以来变化最大的版本\n
  • 观察者模式实现非直接耦合
  • 官方新出的 Kotlin 扩展库 KTX,到底帮你干了什么?
  • 经典排序算法及其 Java 实现
  • 开发了一款写作软件(OSX,Windows),附带Electron开发指南
  • 聊聊redis的数据结构的应用
  • 免费小说阅读小程序
  • 十年未变!安全,谁之责?(下)
  • 使用agvtool更改app version/build
  • C# - 为值类型重定义相等性
  • ​ 轻量应用服务器:亚马逊云科技打造全球领先的云计算解决方案
  • #NOIP 2014# day.1 T3 飞扬的小鸟 bird
  • #大学#套接字
  • #控制台大学课堂点名问题_课堂随机点名
  • #数学建模# 线性规划问题的Matlab求解
  • (ctrl.obj) : error LNK2038: 检测到“RuntimeLibrary”的不匹配项: 值“MDd_DynamicDebug”不匹配值“
  • (env: Windows,mp,1.06.2308310; lib: 3.2.4) uniapp微信小程序
  • (考研湖科大教书匠计算机网络)第一章概述-第五节1:计算机网络体系结构之分层思想和举例
  • (免费领源码)Java#ssm#MySQL 创意商城03663-计算机毕业设计项目选题推荐
  • (三)Hyperledger Fabric 1.1安装部署-chaincode测试
  • (五)大数据实战——使用模板虚拟机实现hadoop集群虚拟机克隆及网络相关配置
  • (五)关系数据库标准语言SQL
  • (原創) 博客園正式支援VHDL語法著色功能 (SOC) (VHDL)
  • .equals()到底是什么意思?
  • .NET/C# 反射的的性能数据,以及高性能开发建议(反射获取 Attribute 和反射调用方法)
  • .NET4.0并行计算技术基础(1)
  • .net实现客户区延伸至至非客户区
  • [ vulhub漏洞复现篇 ] JBOSS AS 5.x/6.x反序列化远程代码执行漏洞CVE-2017-12149
  • [ 蓝桥杯Web真题 ]-Markdown 文档解析
  • [1525]字符统计2 (哈希)SDUT
  • [BUG]vscode插件live server无法自动打开浏览器
  • [codevs 1515]跳 【解题报告】
  • [Firefly-Linux] RK3568修改控制台DEBUG为普通串口UART
  • [HOW TO]如何在iPhone应用程序中发送邮件
  • [LeetCode] Merge Two Sorted Lists