让网维变得简单,快速,准确。拒绝浪费时间,解放出更多的时间陪陪家人。 注册 | 登陆

ROS路由VPLS+BGP基础应用

 

假设某总公司R1的LAN1需要和分公司R2的LAN3进行L2桥接,并且LAN1和LAN3在同一个网段,要求LAN1和LAN3里的终端机器可以互相访问,支持MAC通讯,支持IPX通讯。(当然前提是LAN1和LAN3里的终端和终端之间IP不能冲突。)如果ISP禁止R1和R2之间进行BGP通讯需要先嵌套一个加密隧道,PPTP,L2TP,SSTP...等等都行。

按照如下配置关键内容即可实现需求,效果如图。

R1配置(部分关键配置示例):
  1. /interface bridge  
  2. add auto-mac=yes disabled=no forward-delay=15s name=LAN1-LAN3 priority=0x8000 protocol-mode=none transmit-hold-count=6  
  3. /interface bridge port  
  4. add bridge=LAN1-LAN3 interface=LAN1  
  5. /routing bgp instance  
  6. add as=65510 client-to-client-reflection=yes disabled=no ignore-as-path-len=no \  
  7.     name=65510 out-filter="" redistribute-connected=no redistribute-ospf=no \  
  8.     redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes \  
  9.     router-id=1.1.1.1 routing-table=""  
  10. /routing bgp peer  
  11. add address-families=ip,l2vpn as-override=no default-originate=never disabled=\  
  12.     no hold-time=3m in-filter="" instance=65510 multihop=no name=65511 \  
  13.     nexthop-choice=default out-filter="" passive=no remote-address=1.1.1.2 \  
  14.     remote-as=65511 remove-private-as=no route-reflect=no tcp-md5-key="" ttl=\  
  15.     default use-bfd=no  
  16. /interface vpls bgp-vpls add bridge=LAN1-LAN3 bridge-cost=20 export-route-targets=1:1 import-route-targets=1:1 name=1 route-distinguisher=1:1 site-id=1  
R2配置(部分关键配置示例):
  1. /interface bridge  
  2. add auto-mac=yes disabled=no forward-delay=15s name=LAN3-LAN1 priority=0x8000 protocol-mode=none transmit-hold-count=6  
  3. /interface bridge port  
  4. add bridge=LAN3-LAN1 interface=LAN3  
  5. /routing bgp instance  
  6. add as=65511 client-to-client-reflection=yes disabled=no ignore-as-path-len=no \  
  7.     name=65511 out-filter="" redistribute-connected=no redistribute-ospf=no \  
  8.     redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes \  
  9.     router-id=1.1.1.2 routing-table=""  
  10. /routing bgp peer  
  11. add address-families=ip,l2vpn as-override=no default-originate=never disabled=\  
  12.     no hold-time=3m in-filter="" instance=65511 multihop=no name=65510 \  
  13.     nexthop-choice=default out-filter="" passive=no remote-address=1.1.1.1 \  
  14.     remote-as=65510 remove-private-as=no route-reflect=no tcp-md5-key="" ttl=\  
  15.     default use-bfd=no  
  16. /interface vpls bgp-vpls add bridge=LAN3-LAN1 bridge-cost=20 export-route-targets=1:1 import-route-targets=1:1 name=1 route-distinguisher=1:1 site-id=2

Tags: ros, vpls, bgp, 桥接, bridge

« 上一篇 | 下一篇 »

 

3条记录访客评论

熊博士老师是有偿设置的,给部分代码已经很不错了,剩下的要我们自己去思考人生的。。。。哈

Post by 11 on 2017, May 3, 11:52 AM 引用此文发表评论 #1

引用 Ali 说过的话:
后面的都不给了么

关键配置能看明白,就能顺利配置完成 。其他的配置都和这个方案没多大联系。

Post by 熊茂祥 on 2015, June 23, 1:39 PM 引用此文发表评论 #2

后面的都不给了么

Post by Ali on 2015, June 23, 1:15 PM 引用此文发表评论 #3


发表评论

评论内容 (必填):