设为首页收藏本站language 语言切换
查看: 2049|回复: 1
收起左侧

BCP桥接,基于PPTP隧道 懂的进

[复制链接]
发表于 2013-8-7 14:12:41 | 显示全部楼层 |阅读模式
RouterOS支持BCP(Bridge Control Protocol),即在PPP、PPTP、L2TP和PPPoE接口上的桥接。BCP运行桥接以太网数据通过PPP连接。BCP allows to bridge Ethernet packets through the PPP link. BCP建立后独立于PPP隧道,将不会与任何PPPIP地址接口有关系,桥接和路由能发生在同一独立的时间。BCP能用于替代EoIP+VPN隧道或者基于无线的WDS连接。
BCP (Bridge Control Protocol)需要在两边同时启用才能工作(PPP服务器和PPP客户端)。MikroTik RouterOS可以应用于其他的PPP设备,要求这个设备支持标准的BCP协议。
配置事例
我们需要相互连接2个远程办公室,并让他们在一个以太网内工作。我们要求使用加密(encryption)保护2个办公室直接的数据交换。
如下图,我有2个办公室,办公室1设置为PPTP服务器,办公室2 设置为PPTP客户端。下面通过winboxCLI介绍配置:
图片1.png
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_localMAC地址
现在我们能分配本地和公网地址到相应的接口上:
/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 profilesecret的配置非常简单-仅分配用户名和密码,并指定profilebridge选项。PPP桥接不需要任何IP地址,但正常的PPP是必需的,所以要指定localremote 地址在服务器上。
/ppp profile add name=ppp_bridging bridge=bridge_local use-encryption=yes
/ppp secret add profile=ppp_bridging name=ppp1 password=ppp1
当桥接的PPP隧道需要通过二层(MAC)数据包头部信息,由于默认的接口MTUPPTP1460)不能满足这个的通讯,所以为确保适用运用环境,建议不用考虑MTU值,通过在服务器的MRRU选项设置更高的值。
MRRU允许启用支持单连接协商的多重链路,奋力数据包到多个通道,因此增加MTUMRU(支持65535字节)
/interface pptp-server server set enabled=yes mrru=1600
Office2配置
首先我们需要建立桥,并确定桥将有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_localMAC地址。
现在我们能分配本地和公网地址到相应的接口上:
/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=no
BCP winbox配置
Office1配置
Bridge配置
bridge 中添加一个桥,并设置rstp
图片2.png
port中,添加桥接的接口,我们添加ether1port用于连接内网:
图片3.png
设置静态的MAC-address:
图片4.png
分配IP addresses,
图片5.png
创建PPP profile,并设置bridge参数,
图片6.png
添加PPP客户端
图片7.png
启用PPTP-server,
图片8.png
Office2配置
客户端路由器配置相同,只是你需要配置并启用PPTP客户端。
添加PPTP client,
图片9.png


 楼主| 发表于 2013-8-8 13:53:37 | 显示全部楼层
自己给自己顶一个
沙发 2013-8-8 13:53:37 回复 收起回复
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-13 00:18 , Processed in 0.059915 second(s), 22 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表