ROS支持BCP桥接(基于PPP隧道)

RouterOS支持BCP(Bridge Control Protocol),即在PPP、PPTP、L2TP和PPPoE接口上的桥接。

BCP allows to bridge Ethernet packets through the PPP link. 

BCP要求两端的设备均为ROS,有一方为win是没用的。

BCP (Bridge Control Protocol) should be enabled on both sides (PPP server and PPP client) to make it work. MikroTik RouterOS can be used with other PPP device, that supports BCP accordingly to the standards, but BCP enabled is necessary.

ROS可以跟其他的PPP设备跑BCP协议,但是其他的PPP设备必须支持BCP并且启用。

BCP运行桥接以太网数据通过PPP连接。

BCP建立后独立于PPP隧道,将不会与任何PPPIP地址接口有关系,桥接和路由能发生在同一独立的时间。BCP能用于替代EoIP+VPN隧道或者基于无线的WDS连接。 

BCP (Bridge Control Protocol)需要在两边同时启用才能工作(PPP服务器和PPP客户端)。MikroTik RouterOS可以应用于其他的PPP设备,要求这个设备支持标准的BCP协议。 

原文:

http://techbbs.zol.com.cn/2/51_16823.html

配置事例

我们需要相互连接2个远程办公室,并让他们在一个以太网内工作。我们要求使用加密(encryption)保护2个办公室直接的数据交换。

如下图,我有2个办公室,办公室1设置为PPTP服务器,办公室设置为PPTP客户端。下面通过winboxCLI介绍配置: 

BCP的桥接,基于PPTP隧道,懂得来看看图片1

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 

 

BCP的桥接,基于PPTP隧道,懂得来看看图片2

 

port中,添加桥接的接口,我们添加ether1port用于连接内网: 

 

BCP的桥接,基于PPTP隧道,懂得来看看图片3

 

设置静态的MAC-address:

 

BCP的桥接,基于PPTP隧道,懂得来看看图片4

 

分配IP addresses, 

 

BCP的桥接,基于PPTP隧道,懂得来看看图片5

 

创建PPP profile,并设置bridge参数

 

BCP的桥接,基于PPTP隧道,懂得来看看图片6

 

添加PPP客户端 

BCP的桥接,基于PPTP隧道,懂得来看看图片7

启用PPTP-server, 

BCP的桥接,基于PPTP隧道,懂得来看看图片8

Office2配置 

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

添加PPTP client, 

 

BCP的桥接,基于PPTP隧道,懂得来看看图片9

原文地址:https://www.cnblogs.com/itfat/p/12668526.html