l2tov3(二层vpn)以及pppoe(拨号)实验

实现跨互联网pc 1 pc 2在同一网段实现通信

基础ip配置以及连接公网静态路由略

l2tpv3 enable

配置Tunnel接口下L2TPv3参数

[Huawei]int tu0/0/0

[Huawei-Tunnel0/0/0]tunnel-protocol svpn  //切换模式

[Huawei-Tunnel0/0/0]encapsulation l2tpv3 static

[Huawei-Tunnel0/0/0]l2tpv3 local session-id 1   //自身id

[Huawei-Tunnel0/0/0]l2tpv3 remote session-id 3  // 对端id

[Huawei-Tunnel0/0/0]tunnel-source 12.1.1.1

[Huawei-Tunnel0/0/0]tunnel-destination 23.1.1.3

[Huawei-GigabitEthernet0/0/0]link-bridge Tunnel 0/0/0 tagged //将内网端口和tu绑定

R3看着注释范过来就好

需要加密参考gre隧道加密 配置代码相同

sever: 配置全局地址池

[Huawei]ip pool abc

[Huawei-ip-pool-abc]network 10.1.2.0 mask  255.255.255.0  //创建一个client地址池

[Huawei-ip-pool-abc]gateway-list 10.1.2.1

pppoe认证用户

[PPPoe sever]aaa

[PPPoe sever-aaa]local-user huawei password cipher abc_12345

[PPPoe sever-aaa]local-user huawei service-type ppp

步骤3:配置VT接口,用于pppoe认证并且分配地址

[PPPoe sever]interface  Virtual-Template 1

[PPPoe sever-Virtual-Template1]ip address  10.1.2.1 24  //地址池的网关

[PPPoe sever-Virtual-Template1]ppp authentication-mode chap       

[PPPoe sever-Virtual-Template1]remote address pool abc

提示:以太网接口不支持ppp协议,需要配置虚拟接口VT接口。

步骤4:在以太网接口使能pppoe功能并绑定VT接口1

[PPPoe sever]interface  g0/0/2  //绑定内部接口下发地址

[PPPoe sever-GigabitEthernet0/0/2]pppoe-server bind virtual-template 1

步骤5:配置AR1的pppoe client拨号功能

[PPPoe client]interface Dialer 0

[PPPoe client-Dialer0]dialer user huawei // 使能共享DDC功能

[PPPoe client-Dialer0]dialer bundle 1 //指定该dialer口的dialer bundle

[PPPoe client-Dialer0]ppp chap user huawei //配置服务端分配的用户名

[PPPoe client-Dialer0]ppp chap password cipher abc_12345//配置服务端分配的密码

[PPPoe client-Dialer0]ip address  ppp-negotiate //使用ppp协商获取ip地址

步骤6:建立pppoe会话

[PPPoe client]interface  g0/0/1

[PPPoe client-GigabitEthernet0/0/1]pppoe-client dial-bundle-number 1 //绑定dialer口的dialer

[PPPoe client]ip route-static  0.0.0.0 0.0.0.0 Dialer 0 (记住发向公网一定要有路由)

[PPPoe client]acl  2000  //pc1 是10.1.10 网段

[PPPoe client-acl-basic-2000]rule  permit  source  10.1.1.0 0.0.0.255

[PPPoe client]interface Dialer 0

[PPPoe client-Dialer0]nat outbound 2000

[PPPoe sever]acl  2000

[PPPoesever]rule  permit  source  any

[PPPoe sever]int g0/0/0

[PPPoe sever]nat outbound 2000

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值