PPPOE拨号实验(H3C)

一、实验拓扑

二、实验要求

  • 要求R1通过PPPoe拨号的方式获取公网地址
  • 内网部分通过ospf打通,内网访问公网通过easy ip方式实现(仅允许1.0和2.0)

三、实验步骤

local-user 19912341234 class network
#创建用于chap验证的用户
password simple administrator111
service-type ppp 
#服务类型为ppp

domain local 
#创建一个域用于验证方式
authentication ppp local 
#认证方式为本地认证

ip pool pppoe 100.0.0.1 100.0.0.253
#创建用于pppoe拨号分配的地址池

int Virtual-Template 1
#配置ppp模板
ppp authentication-mode chap domain local 
#ppp认证方式为chap验证,并调用域配置
remote address pool pppoe 
#指定使用的地址池
ip add 100.0.0.254 24

int g0/0
pppoe-server bind virtual-template 1 

int l0
ip add 172.16.1.1 24
ip route-static 0.0.0.0 0 100.0.0.2
#用于后续的私网访问公网

########################R2

dialer-group 1 rule ip permit 
#创建拨号访问组,并配置拨号控制规则允许ip报文

int Dialer 0 
#创建拨号接口
ip address ppp-negotiate 
#地址获取方式为ppp协商后server分配的地址
dialer bundle enable 
#使能共享DDR
ppp chap user 19912341234
ppp chap password simple administrator111
#配置用于chap的用户名和密码,与server上的对应
dialer-group 1 
#绑定拨号组1
dialer timer idle 0  
#链路空闲时间为0
dialer timer autodial 60  
#配置DDR自动拨号间隔,更快获得地址

int g0/0
pppoe-client dial-bundle-number 0
#与PPPoE会话相对应的Dialer bundle编号

ip route-static 0.0.0.0 0 Dialer 0
#流量从Dialer 0口出去

acl ba 2000
ru per sou 192.168.1.0 0.0.0.255
ru per sou 192.168.2.0 0.0.0.255
int dialer 0
nat out 2000
#配置easy ip来使私网访问公网

int g0/1
ip add 10.0.0.1 30
int g0/2
ip add 10.0.0.5 30
int l0
ip add 1.1.1.1 32
ospf 1 rou 1.1.1.1
int range g0/1 g0/2 l0
ospf 1 a 0
ospf 1
default-route-advertise 
#配置ospf打通内网,同时引入R1上的默认路由访问公网

########################R1

int g1/0/1
p l r
ip add 10.0.0.2 30
int l0
ip add 33.33.33.33 32
int l10
ip add 192.168.1.1 24
ospf 1 rou 33.33.33.33
int range l0 l10 g1/0/1
ospf 1 a 0

########################S3

int g1/0/1
p l r
ip add 10.0.0.6 30
int l0
ip add 44.44.44.44 32
int l10
ip add 192.168.2.1 24
ospf 1 rou 44.44.44.44
int range l0 l10 g1/0/1
ospf 1 a 0

########################S4

四、实验结果

  • 9
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

一叶轻舟*

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值