MP-BGP完整实验

 

架构图:

R2/R5基本配置:

ip vpn-instance xaf

 ipv4-family

  route-distinguisher 100:1

  vpn-target 100:1 export-extcommunity

  vpn-target 200:1 import-extcommunity

#

bgp 100

 undo default ipv4-unicast

 peer 10.1.5.5 as-number 100

 peer 10.1.5.5 connect-interface LoopBack0

 #

 ipv4-family unicast

  undo synchronization

  undo peer 10.1.5.5 enable

 #

 ipv4-family vpnv4

  policy vpn-target

  peer 10.1.5.5 enable

 #

 ipv4-family vpn-instance xaf

#

ospf 20 router-id 10.1.2.2

 area 0.0.0.0

  network 10.1.2.2 0.0.0.0

  network 10.1.23.2 0.0.0.0

ip vpn-instance xaf

 ipv4-family

  route-distinguisher 200:1

  vpn-target 200:1 export-extcommunity

  vpn-target 100:1 import-extcommunity

#

bgp 100

 undo default ipv4-unicast

 peer 10.1.2.2 as-number 100

 peer 10.1.2.2 connect-interface LoopBack0

 #

 ipv4-family unicast

  undo synchronization

  undo peer 10.1.2.2 enable

 #

 ipv4-family vpnv4

  policy vpn-target

  peer 10.1.2.2 enable

 #

 ipv4-family vpn-instance xaf

#

ospf 20 router-id 10.1.5.5

 area 0.0.0.0

  network 10.1.5.5 0.0.0.0

  network 10.1.45.5 0.0.0.0

1、静态路由

[R2]ip route-static vpn-instance xaf 10.1.1.1 32 10.1.12.1

[R5]ip route-static vpn-instance xaf 10.1.6.6 32 10.1.56.6

R2/R5

bgp 100

ipv4-family vpn-instance xaf

  import-route static

[R1]ip route-static 0.0.0.0 0.0.0.0 10.1.12.2

[R6]ip route-static 0.0.0.0 0.0.0.0 10.1.56.5

数据平面

1、第一层标签MP-BGP分配的,为VPNV4路由分配;

2、以R5为参考点,R2为R1过来的路由信息分配标签给R5

3、在R5上,收到VPNV4的路由信息。

<R5>dis bgp vpnv4 all routing-table label

 BGP Local router ID is 10.1.45.5

 Status codes: * - valid, > - best, d - damped,

               h - history,  i - internal, s - suppressed, S - Stale

               Origin : i - IGP, e - EGP, ? - incomplete

 Total number of routes from all PE: 2

 Route Distinguisher: 100:1

        Network           NextHop           In/Out Label

 *>i    10.1.1.1          10.1.2.2          NULL/1029       R2分的标签(出标签,令居分配给我的)

  

 Route Distinguisher: 200:1

        Network           NextHop           In/Out Label

 *>     10.1.6.6          10.1.56.6         1029/NULL

 VPN-Instance xaf, Router ID 10.1.45.5:

 Total Number of Routes: 1

        Network           NextHop           In/Out Label

 *>i    10.1.1.1          10.1.2.2          NULL/1029

同理:

<R2>dis bgp vpnv4 all routing-table label

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值