找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7464|回复: 4

[vpn] 【原创】VPLS+BGP基础应用

[复制链接]
发表于 2015-5-3 13:56:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 9939781 于 2015-5-3 13:58 编辑


                               
登录/注册后可看大图

假设某总公司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="" redistribute-connected=no redistribute-ospf=no \  
        redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes \  
        router-id=1.1.1.1 routing-table=""  
/routing bgp peer  
add address-families=ip,l2vpn as-override=no default-originate=never disabled=\  
        no hold-time=3m in-filter="" instance=65510 multihop=no name=65511 \  
        nexthop-choice=default out-filter="" passive=no remote-address=1.1.1.2 \  
        remote-as=65511 remove-private-as=no route-reflect=no tcp-md5-key="" 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="" redistribute-connected=no redistribute-ospf=no \  
    redistribute-other-bgp=no redistribute-rip=no redistribute-static=yes \  
    router-id=1.1.1.2 routing-table=""  
/routing bgp peer  
add address-families=ip,l2vpn as-override=no default-originate=never disabled=\  
    no hold-time=3m in-filter="" instance=65511 multihop=no name=65510 \  
    nexthop-choice=default out-filter="" passive=no remote-address=1.1.1.1 \  
    remote-as=65510 remove-private-as=no route-reflect=no tcp-md5-key="" 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
routeros
发表于 2015-5-4 10:13:58 | 显示全部楼层
好东西,谢谢分享!
routeros
回复

使用道具 举报

发表于 2015-5-4 14:18:12 | 显示全部楼层
很久沒看到技術文章了,感謝版主先收起來了!
routeros
回复

使用道具 举报

发表于 2015-5-10 23:05:26 | 显示全部楼层
如果不是同一个网段呢?
routeros
回复

使用道具 举报

 楼主| 发表于 2015-5-10 23:57:02 | 显示全部楼层
yjcoke 发表于 2015-5-10 23:05
如果不是同一个网段呢?

PPTP完事,最简单了
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-19 09:40 , Processed in 0.052761 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表