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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM