L3 MPLS VPN InterAS Option C:MP-eBGP between PEs Non VPN transit

Option C





    在PE之间起MP-ebgp邻居,直接传递客户的vpnv4路由。实现的关键在PE的邻居关系的建立。

    一种方法是在ASBR上宣告PE的环回口路由,然后在ASBR上将学到的对端PE的环回口重分发进IGP;

    另一种方法就是PE和ASBR之间起ipv4 的邻居关系;

    第一种方法在传递的过程中需要2层标签;第二种需要3层标签。


关于标签的传递:R4和R5之间、R5和R6之间、R6和R7之间要为PE环回口的bgp路由分配标签,只能由bgp来分配,就需要在bgp邻居之间send-label。R5和R6之间要运行LDP,并且要环回口建立邻居。

此处仅列出R2、R4、R5

R1的配置为普通PE-CE路由协议

R2的配置:

ip vrf A  

 rd 100:29

 route-target export 100:29

 route-target import 100:29

!

mpls label range 200 299


!

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

!

interface Ethernet0/0

 ip address 23.1.1.2 255.255.255.0

 mpls ip

!

interface Ethernet0/1

 ip vrf forwarding A

 ip address 12.1.1.2 255.255.255.0

!

!         

router eigrp 90

 network 2.2.2.2 0.0.0.0

 network 23.1.1.0 0.0.0.255

 no auto-summary

!

router ospf 110 vrf A

 log-adjacency-changes

 redistribute bgp 100 subnets

 network 12.1.1.0 0.0.0.255 area 0

!

router bgp 100

 no bgp default ipv4-unicast

 bgp log-neighbor-changes

 neighbor 9.9.9.9 remote-as 200

 neighbor 9.9.9.9 ebgp-multihop 255

 neighbor 9.9.9.9 update-source Loopback0

 !

 address-family ipv4

  no synchronization

  no auto-summary

 exit-address-family

 !

 address-family vpnv4

  neighbor 9.9.9.9 activate

  neighbor 9.9.9.9 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf A

  no synchronization

  redistribute ospf 110 vrf A match internal external 1 external 2 nssa-external 1 nssa-external 2

 exit-address-family




R4的关键配置:

mpls label range 400 499


!

interface Loopback0

 ip address 4.4.4.4 255.255.255.255

!

interface Ethernet0/0

 ip address 45.1.1.4 255.255.255.0

 mpls bgp forwarding

!

interface Ethernet0/1

 ip address 34.1.1.4 255.255.255.0

 mpls ip

!

router eigrp 90

 network 4.4.4.4 0.0.0.0

 network 34.1.1.0 0.0.0.255

 redistribute bgp 100 metric 10000 100 255 1 1500 route-map R9

 no auto-summary

!

router bgp 100

 no synchronization

 bgp log-neighbor-changes

 network 2.2.2.2 mask 255.255.255.255

 neighbor 45.1.1.5 remote-as 120

 neighbor 45.1.1.5 send-label

 no auto-summary

!

access-list 1 permit 9.9.9.9

!

route-map R9 permit 10

 match ip address 1

!         


R5:

mpls label range 500 599

interface Loopback0

 ip address 5.5.5.5 255.255.255.255

!

interface Ethernet0/0

 ip address 56.1.1.5 255.255.255.0

 mpls ip

!

interface Ethernet0/1

 ip address 45.1.1.5 255.255.255.0

 mpls bgp forwarding

!

!

router ospf 110

 log-adjacency-changes

 network 5.5.5.5 0.0.0.0 area 0

 network 56.1.1.0 0.0.0.255 area 0

!

router bgp 120

 no synchronization

 bgp log-neighbor-changes

 neighbor 6.6.6.6 remote-as 120

 neighbor 6.6.6.6 update-source Loopback0

 neighbor 6.6.6.6 next-hop-self

 neighbor 6.6.6.6 send-label

 neighbor 45.1.1.4 remote-as 100

 neighbor 45.1.1.4 send-label

 no auto-summary

!

    


R1#traceroute 10.10.10.10 source l0


Type escape sequence to abort.

Tracing the route to 10.10.10.10


  1 12.1.1.2 0 msec 0 msec 0 msec

  2 23.1.1.3 [MPLS: Labels 302/904 Exp 0] 0 msec 0 msec 0 msec

  3 34.1.1.4 [MPLS: Labels 404/904 Exp 0] 0 msec 4 msec 4 msec

  4 45.1.1.5 [MPLS: Labels 503/904 Exp 0] 4 msec 4 msec 4 msec

  5 56.1.1.6 [MPLS: Labels 603/904 Exp 0] 8 msec 4 msec 4 msec

  6 67.1.1.7 [MPLS: Labels 703/904 Exp 0] 4 msec 8 msec 4 msec

  7 78.1.1.8 [MPLS: Labels 801/904 Exp 0] 4 msec 4 msec 8 msec

  8 19.1.1.9 [MPLS: Label 904 Exp 0] 4 msec 4 msec 4 msec

  9 19.1.1.10 4 msec *  0 msec



第二种方法:将PE的环回口用bgp传递,下面仅将左侧的AS用bgp传递,右边还是重分发到IGP,看区别


R1#traceroute 10.10.10.10 sou l0


Type escape sequence to abort.

Tracing the route to 10.10.10.10


  1 12.1.1.2 4 msec 0 msec 0 msec

  2 23.1.1.3 [MPLS: Labels 301/404/904 Exp 0] 0 msec 0 msec 0 msec

  3 34.1.1.4 [MPLS: Labels 404/904 Exp 0] 0 msec 0 msec 0 msec

  4 45.1.1.5 [MPLS: Labels 502/904 Exp 0] 4 msec 0 msec 0 msec

  5 56.1.1.6 [MPLS: Labels 602/904 Exp 0] 0 msec 0 msec 0 msec

  6 67.1.1.7 [MPLS: Labels 703/904 Exp 0] 0 msec 0 msec 0 msec

  7 78.1.1.8 [MPLS: Labels 801/904 Exp 0] 0 msec 4 msec 0 msec

  8 19.1.1.9 [MPLS: Label 904 Exp 0] 0 msec 0 msec 0 msec

  9 19.1.1.10 0 msec *  4 msec


R2和R4的配置如下:


R2:

router bgp 100

 no bgp default ipv4-unicast

 bgp log-neighbor-changes

 neighbor 4.4.4.4 remote-as 100

 neighbor 4.4.4.4 update-source Loopback0

 neighbor 9.9.9.9 remote-as 200

 neighbor 9.9.9.9 ebgp-multihop 255

 neighbor 9.9.9.9 update-source Loopback0

 !

 address-family ipv4

  no synchronization

  neighbor 4.4.4.4 activate

  neighbor 4.4.4.4 send-label

  no auto-summary

 exit-address-family

 !

 address-family vpnv4

  neighbor 9.9.9.9 activate

  neighbor 9.9.9.9 send-community extended

 exit-address-family

 !

 address-family ipv4 vrf A

  no synchronization

  redistribute ospf 110 vrf A match internal external 1 external 2 nssa-external 1 nssa-external 2

 exit-address-family



R4:


router eigrp 90

 network 4.4.4.4 0.0.0.0

 network 34.1.1.0 0.0.0.255

 no auto-summary

router bgp 100

 bgp log-neighbor-changes

 neighbor 2.2.2.2 remote-as 100

 neighbor 2.2.2.2 update-source Loopback0

 neighbor 45.1.1.5 remote-as 120

 !

 address-family ipv4

  no synchronization

  network 2.2.2.2 mask 255.255.255.255

  neighbor 2.2.2.2 activate

  neighbor 2.2.2.2 next-hop-self

  neighbor 2.2.2.2 send-label

  neighbor 45.1.1.5 activate

  neighbor 45.1.1.5 send-label

  no auto-summary

 exit-address-family


本文出自 “每天进步1%” 博客,请务必保留此出处http://jackyan.blog.51cto.com/2589874/1575261

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。