<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/ DTD/wml_1.1.xml">

<wml>
<head>
<meta http-equiv="cache-control" content="max-age=180,private" />
</head>
<card title="ROS路由VPLS+BGP基础应用">
<p>
作者:<a href="index.php?action=showuser&amp;userid=1&amp;hash=">熊茂祥</a><br />时间:2015-05-03 13:38<br />分类:<a href="index.php?action=list&amp;cid=3&amp;hash=">ROS</a><br />标签:<a href="index.php?action=tags&amp;item=ros&amp;hash=">ros</a>, <a href="index.php?action=tags&amp;item=vpls&amp;hash=">vpls</a>, <a href="index.php?action=tags&amp;item=bgp&amp;hash=">bgp</a>, <a href="index.php?action=tags&amp;item=%E6%A1%A5%E6%8E%A5&amp;hash=">桥接</a>, <a href="index.php?action=tags&amp;item=bridge&amp;hash=">bridge</a><br />内容:
 


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

按照如下配置关键内容即可实现需求，效果如图。


R1配置(部分关键配置示例):


    /interface bridge  

    add auto-mac=yes disabled=no forward-delay=15s name=LAN1-LAN3 priority=0x8000 protocol-mode=none transmit-hold-count=6  

    /interface bridge port  

    add bridge=LAN1-LAN3 interface=LAN1  

    /routing bgp instance  

         
    add as=65510 client-to-client-reflection=yes disabled=no ignore-as-path-len=no \  

         
        name=65510 out-filter=&quot;&quot; redistribute-connected=no redistribute-ospf=no \  

         
        redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes \  

         
        router-id=1.1.1.1 routing-table=&quot;&quot;  

         
    /routing bgp peer  

         
    add address-families=ip,l2vpn as-override=no default-originate=never disabled=\  

         
        no hold-time=3m in-filter=&quot;&quot; instance=65510 multihop=no name=65511 \  

         
        nexthop-choice=default out-filter=&quot;&quot; passive=no remote-address=1.1.1.2 \  

         
        remote-as=65511 remove-private-as=no route-reflect=no tcp-md5-key=&quot;&quot; ttl=\  

         
        default use-bfd=no  

         
    /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配置(部分关键配置示例): 




    /interface bridge  

         
    add auto-mac=yes disabled=no forward-delay=15s name=LAN3-LAN1 priority=0x8000 protocol-mode=none transmit-hold-count=6  

         
    /interface bridge port  

         
    add bridge=LAN3-LAN1 interface=LAN3  

         
    /routing bgp instance  

         
    add as=65511 client-to-client-reflection=yes disabled=no ignore-as-path-len=no \  

         
        name=65511 out-filter=&quot;&quot; redistribute-connected=no redistribute-ospf=no \  

         
        redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes \  

         
        router-id=1.1.1.2 routing-table=&quot;&quot;  

         
    /routing bgp peer  

         
    add address-families=ip,l2vpn as-override=no default-originate=never disabled=\  

         
        no hold-time=3m in-filter=&quot;&quot; instance=65511 multihop=no name=65510 \  

         
        nexthop-choice=default out-filter=&quot;&quot; passive=no remote-address=1.1.1.1 \  

         
        remote-as=65510 remove-private-as=no route-reflect=no tcp-md5-key=&quot;&quot; ttl=\  

         
        default use-bfd=no  

         
    /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

    



</p><p>
<a href="index.php?action=comments&amp;articleid=177&amp;hash=">查看评论</a><br />
<a href="index.php?action=login&amp;hash=">立即登陆发表评论</a><br />
</p>
<p><a href="index.php?action=list&amp;hash=">返回日志列表</a><br /><a href="index.php?action=index&amp;hash=">返回主页</a></p>
</card>
</wml>
