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隧道,將不會與任何PPP的IP地址接口有關系,橋接和路由能發生在同一獨立的時間。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服務器,辦公室2 設置為PPTP客戶端。下面通過winbox和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=1600
首先我們需要建立橋,並確定橋將有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=no
Office1配置
Bridge配置
在bridge 中添加一個橋,並設置rstp:
在port中,添加橋接的接口,我們添加ether1到port用於連接內網:
設置靜態的MAC-address:
分配IP addresses,
創建PPP profile,並設置bridge參數,
添加PPP客戶端
啟用PPTP-server,
Office2配置
客戶端路由器配置相同,只是你需要配置並啟用PPTP客戶端。
添加PPTP client,