广域网学习

PPPoE技术(拨号上网)

PPPoE PPP over Ethernet ,以太网承载 PPP 协议)是一种把 PPP 帧封装到以太网帧中的链路层协议。
PPPoE 可以使以太网网络中的多台主机连接到远端的宽带接入服务器。

 应用场景

PPPoE 组网结构采用 Client/Server 模型, PPPoE 的客户端为 PPPoE Client PPPoE 的服务器端为
PPPoE Server。
PPPoE Client PPPoE Server 发起连接请求, PPPoE Server PPPoE Client 提供接入控制、认证等功能。

 配置案例:

PPPoE Server配置:
1 、完成 PPPoE 认证用户
[PPPoE Server]aaa
[PPPoE Server-aaa]local-user user1@system password cipher password@system
[PPPoE Server-aaa]local-user user1@system service-type ppp
2 、创建并配置 VT(Virtual-Template ,虚拟模版 )
[PPPoE Server]interface Virtual-Template 1
[PPPoE Server-Virtual-Template1]ppp authentication-mode chap      //配置Server方作为认证方,使用chap认证方式
[PPPoE Server-Virtual-Template1]ip address 12.0.0.2 32            //因为公网地址必须保证唯一性
[PPPoE Server-Virtual-Template1]remote address pool PPPoE_pool    //调用地址池,为Client分配地址
(不配该命令,如果是Server直连终端,则需要配置)
[PPPoE Server-Virtual-Template1]ppp ipcp dns 8.8.8.8              //配置PPPoE Server为PPPoE Client指定DNS服务器地址
3 、配置地址池
[PPPoE Server]ip pool PPPoE_pool
[PPPoE Server-ip-pool-PPPoE_pool]network 12.0.0.0 mask 24
[PPPoE Server-ip-pool-PPPoE_pool]gateway-list 12.0.0.2
4 、在以太网接口启动 PPPoE Server 功能
[PPPoE Server]interface GigabitEthernet 0/0/0
[PPPoE Server-GigabitEthernet0/0/0]pppoe-server bind virtual-template 1         //绑定VT接口与物理接口

PPPoE Client配置:

1 、配置 Dialer 接口 --- 拨号程序接口
[PPPoE Client]interface Dialer 1
[PPPoE Client-Dialer1]dialer user user1                            //使能共享DCC功能和指定对端用户名,必须与对端配置的PPP用户名一致,该名称对端可不设置
[PPPoE Client-Dialer1]dialer bundle 1                              //设定拨号程序捆绑包
[PPPoE Client-Dialer1]ppp chap user user1@system
[PPPoE Client-Dialer1]ppp chap password cipher password@system     //配置本地作为被认证方,以及账号密码信息
[PPPoE Client-Dialer1]ip address ppp-negotiate                     //配置由对端分配IP地址

2、建立PPPoE会话

[PPPoE Client]interface GigabitEthernet 0/0/0
[PPPoE Client-GigabitEthernet0/0/0]pppoe-client dial-bundle-number 1        //指定PPPoE会话所对应的Dialer bundle。

3、配置NAT,使内部用户可以上网---注意配置NAT时出接口是PPPOE创建的虚拟接口

[PPPoE Client]acl 2000
[PPPoE Client-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[PPPoE Client]interface Dialer 1
[PPPoE Client-Dialer1]nat outbound 2000

4、配置到PPPoE Server的静态路由

[PPPoE Client]ip route-static 0.0.0.0 0 Dialer 1
[CLIENT]ip route-static 0.0.0.0 0 100.0.0.1

VPN虚拟专用网

 

为实现分公司和公司总部联系:

1.NAT:可以利用两次NAT实现私网访问互联网的需求但是不安全。

2.物理专线:成本和地理位置本身的限制。

3.VPN:虚拟专用网。(核心是隧道技术)(隧道的核心是封装技术)

GRE通用路由封装技术

1.配置缺省,VPN配置前提

[r1]ip route-static 0.0.0.0 0 12.0.0.2

2.GRE配置

[r1]interface Tunnel 0/0/0                    //创建隧道接口
[r1-Tunnel0/0/0]ip address 192.168.3.1 24     //接口配置IP地址,注意是私网IP地址
[r1-Tunnel0/0/0]tunnel-protocol gre           //定义隧道封装协议GRE
[r1-Tunnel0/0/0]source 12.0.0.1               //定义隧道源地址
[r1-Tunnel0/0/0]destination 23.0.0.2          //定义隧道目的地址

3.配置路由

[r1]ip route-static 192.168.2.0 24 192.168.3.2

4.测试

[r1]ping -a 192.168.1.1 192.168.2.1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值