C114门户论坛百科APPEN| 举报 切换到宽版

亚星游戏官网

 找回密码
 注册

只需一步,快速开始

短信验证,便捷登录

搜索
查看: 6755|回复: 0

BCP协议的实现 [复制链接]

军衔等级:

亚星游戏官网-yaxin222  新兵

注册:2010-10-11
发表于 2013-8-21 09:51:01 |显示全部楼层
BCP桥接(基于PPTP隧道)RouterOS支撑BCP(Bridge Control Protocol),即在PPP、PPTP、L2TP和PPPoE接口上的桥接。BCP运行桥接以太网数据通过PPP连接。BCP allows to bridge Ethernet packets through the PPP link. BCP建立后独立于PPP隧道,将不会与任何PPP的IP地址接口有关系,桥接和路由能发生在同一独立的时间。BCP能用于替代EoIP+VPN隧道或者基于无线的WDS连接。
BCP (Bridge Control Protocol)需要在两边同时启用才能工作(PPP服务器和PPP客户端)。MikroTik RouterOS可以应用于其他的PPP设备,要求这个设备支撑标准的BCP协议。
配置事例大家需要相互连接2个远程办公室,并让他们在一个以太网内工作。大家要求使用加密(encryption)保护2个办公室直接的数据交换。
如下图,我有2个办公室,办公室1设置为PPTP服务器,办公室2 设置为PPTP客户端。下面通过winbox和CLI先容配置:

BCP配置(CLI)Office1配置首先大家需要建立一个桥接口,并确保桥接将一直有MAC地址存在。原因很简单,当BCP被使用PPP桥接port中,不会有任何MAC地址生成。
/interface bridge add name=bridge_local protocol-mode=rstp/interface bridge port add bridge=bridge_local interface=ether1_local/interface bridge set bridge_local admin-mac=xx:xx:xx:xx:xx:xx其中xx:xx:xx:xx:xx:xx是ether1_local的MAC地址
现在大家能分配本地和公网地址到相应的接口上:
/ip address add address=192.168.88.1/24 interface=bridge_local/ip address add address=1.1.1.1/24 interface=ether2_public在这个事例中,仅使用PPP做桥接,PPP profile和secret的配置非常简单-仅分配用户名和密码,并指定profile的bridge选项。PPP桥接不需要任何IP地址,但正常的PPP是必需的,所以要指定local和remote 地址在服务器上。
/ppp profile add name=ppp_bridging bridge=bridge_local use-encryption=yes/ppp secret add profile=ppp_bridging name=ppp1 password=ppp1当桥接的PPP隧道需要通过二层(MAC)数据包头部信息,由于默认的接口MTU(PPTP是1460)不能满足这个的通讯,所以为确保适用运用环境,建议不用考虑MTU值,通过在服务器的MRRU选项设置更高的值。
MRRU允许启用支撑单连接协商的多重链路,奋力数据包到多个通道,因此增加MTU和MRU(支撑65535字节)
/interface pptp-server server set enabled=yes mrru=1600Office2配置首先大家需要建立桥,并确定桥将有MAC地址存在,原因如上提到。
/interface bridge add name=bridge_local protocol-mode=rstp/interface bridge port add bridge=bridge_local interface=ether1_local/interface bridge set bridge_local admin-mac=xx:xx:xx:xx:xx:xx其中xx:xx:xx:xx:xx:xx是ether1_local的MAC地址。
现在大家能分配本地和公网地址到相应的接口上:
/ip address add address=192.168.88.254/24 interface=bridge_local/ip address add address=2.2.2.2/24 interface=ether2_public配置PPP Profile,回应在服务器端的配置
/ppp profile add name=ppp_bridging bridge=bridge_local use-encryption=yes创建一个pptp-client接口,不要忘记配置MRRU选项,确保二层帧能通过PPP隧道。
/interface pptp-client add profile=ppp_bridging mrru=1600 connect-to=1.1.1.1 user=ppp1 password=ppp1 disabled=noBCP winbox配置Office1配置Bridge配置
在bridge 中添加一个桥,并设置rstp:

在port中,添加桥接的接口,大家添加ether1到port用于连接内网:

设置静态的MAC-address:

分配IP addresses,

创建PPP profile,并设置bridge参数

添加PPP客户端

启用PPTP-server,

Office2配置客户端路由器配置相同,只是你需要配置并启用PPTP客户端。
添加PPTP client,

举报本楼

您需要登录后才可以回帖 登录 | 注册 |

手机版|C114 ( 沪ICP备12002291号-1 )|联系大家 |网站地图  

GMT+8, 2024-9-25 00:41 , Processed in 0.162920 second(s), 15 queries , Gzip On.

Copyright © 1999-2023 C114 All Rights Reserved

Discuz Licensed

回顶部
XML 地图 | Sitemap 地图