1、Mpls vpn跨域optionB有两种方式Mpls vpn跨域optionB有两种方式:第一种方式为ASBR之间通过单跳MP-EBGP,ASBR之间必须直联第二种方式为ASBR之间通过多跳MP-EBGP,ASBR之间必须采用tunnel方式,本文只介绍这种方式。Mpls vpn over gre!对于mpls vpn over gre的这种方式,有两种方法可以使VPNv4的下一跳地址在接收路由更新的AS中可达:(1)将ASBR之间的tunnel互联地址重分布到IGP;(2)ASBR在向PE(或RR)传递从另一个AS学到的VPNv4的路由时,下一跳为自已,也就是next-hop-self实验拓
2、扑图如下:方法一:默认情况下,R6从AS1学到VPNv4的路由再通告给R10(RR)时,下一跳地址为R4的F0/0的地址,但是R10学到VPNv4路由的下一跳地址不可达,所以在R4和R6上分别将tunnel的互联地址重新分发到IGP中,这样R10才通将VPNv4的路由传递给R9。在标签交换方面,下一跳地址不改变,就不会重新分配标签。如R9学到的VPNv4的路由分配out标签是由R4分配的。R9# show ip cef vrf test 11.11.11.1111.11.11.11/32, version 34, epoch 0, cached adjacency 192.168.2.90 p
3、ackets, 0 bytes tag information set, all rewrites owned local tag: VPN route head fast tag rewrite with Fa0/0, 192.168.2.9, tags imposed 840 427 via 192.168.0.5, 0 dependencies, recursive next hop 192.168.2.9, FastEthernet0/0 via 192.168.0.5/32 (Default) valid cached adjacencytag rewrite with Fa0/0,
4、 192.168.2.9, tags imposed 840 427R11#traceroute 12.12.12.12Type escape sequence to abort.Tracing the route to 12.12.12.12 1 10.0.0.1 60 msec 140 msec 168 msec 2 192.168.1.2 MPLS: Labels 232/643 Exp 0 1008 msec 1028 msec 936 msec 3 192.168.1.6 MPLS: Labels 332/643 Exp 0 840 msec 1004 msec 816 msec 4
5、 192.168.1.10 MPLS: Labels 426/643 Exp 0 888 msec 836 msec 768 msec 5 192.168.0.6 MPLS: Label 643 Exp 0 768 msec 812 msec 1176 msec /只有单层标签 6 192.168.2.2 MPLS: Labels 717/939 Exp 0 888 msec 932 msec 936 msec 7 192.168.2.6 MPLS: Labels 813/939 Exp 0 792 msec 740 msec 816 msec 8 10.0.0.5 AS 20 MPLS: L
6、abel 939 Exp 0 796 msec 688 msec 984 msec 9 10.0.0.6 AS 20 1032 msec 884 msec 984 msecR11#R4和R6上只保存本AS内的VPNv4的路由。R4#show mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 416 Untagged 6.6.6.6/32 0 Fa0/0 192.168.0.2 417 110 1:1:10.0.
7、0.0/30 610 Fa1/1 192.168.1.9 418 Pop tag 192.168.1.16/30 0 Fa1/1 192.168.1.9 419 Pop tag 192.168.1.4/30 0 Fa1/1 192.168.1.9 420 303 192.168.1.12/30 0 Fa1/1 192.168.1.9 421 300 192.168.1.0/30 0 Fa1/1 192.168.1.9 422 301 1.1.1.1/32 15844 Fa1/1 192.168.1.9 423 302 2.2.2.2/32 0 Fa1/1 192.168.1.9 424 Pop
8、 tag 3.3.3.3/32 0 Fa1/1 192.168.1.9 425 328 5.5.5.5/32 3573 Fa1/1 192.168.1.9 426 Pop tag 192.168.0.6/32 640 Tu0 point2point 427 138 1:1:11.11.11.11/32 5068 Fa1/1 192.168.1.9 428 137 1:1:192.168.10.0/24 0 Fa1/1 192.168.1.9 R6#show mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next H
9、op tag tag or VC or Tunnel Id switched interface 608 Untagged 4.4.4.4/32 0 Fa0/0 192.168.0.1 609 Pop tag 192.168.0.1/32 0 Fa0/0 192.168.0.1 610 Pop tag 192.168.2.12/30 0 Fa1/0 192.168.2.2 611 Pop tag 192.168.2.4/30 0 Fa1/0 192.168.2.2 612 714 192.168.2.16/30 0 Fa1/0 192.168.2.2 613 716 192.168.2.8/3
10、0 0 Fa1/0 192.168.2.2 614 Pop tag 7.7.7.7/32 0 Fa1/0 192.168.2.2 615 715 8.8.8.8/32 0 Fa1/0 192.168.2.2 640 717 9.9.9.9/32 0 Fa1/0 192.168.2.2 641 713 10.10.10.10/32 1216 Fa1/0 192.168.2.2 642 Pop tag 192.168.0.5/32 640 Tu0 point2point 643 939 1:1:12.12.12.12/32 610 Fa1/0 192.168.2.2 644 938 1:1:192
11、.168.20.0/24 0 Fa1/0 192.168.2.2 R4的配置:hostname R4!boot-start-markerboot-end-marker!ip subnet-zero!ip cefno ip domain-lookupmpls label range 400 499mpls label protocol ldp! interface Loopback0 ip address 4.4.4.4 255.255.255.255 no ip directed-broadcast!interface Tunnel0 ip address 192.168.0.5 255.25
12、5.255.252 no ip directed-broadcast mpls bgp forwarding tunnel source Loopback0 tunnel destination 6.6.6.6!interface FastEthernet0/0 ip address 192.168.0.1 255.255.255.252 no ip directed-broadcast mpls bgp forwarding!interface FastEthernet1/0 no ip address no ip directed-broadcast shutdown duplex hal
13、f speed auto! interface FastEthernet1/1 ip address 192.168.1.10 255.255.255.252 no ip directed-broadcast duplex half speed auto tag-switching ip!router ospf 1 log-adjacency-changes redistribute connected subnets network 4.4.4.4 0.0.0.0 area 0 network 192.168.1.8 0.0.0.3 area 0!router bgp 1 no bgp de
14、fault route-target filter bgp log-neighbor-changes neighbor 5.5.5.5 remote-as 1 neighbor 5.5.5.5 update-source Loopback0 neighbor 192.168.0.6 remote-as 2 ! address-family ipv4 neighbor 5.5.5.5 activate no neighbor 192.168.0.6 activate no auto-summary no synchronization exit-address-family ! address-
15、family vpnv4 neighbor 5.5.5.5 activate neighbor 5.5.5.5 send-community both neighbor 192.168.0.6 activate neighbor 192.168.0.6 send-community both exit-address-family!ip classlessip route 6.6.6.6 255.255.255.255 192.168.0.2!control-plane!line con 0 exec-timeout 0 0 stopbits 1line aux 0 stopbits 1lin
16、e vty 0 4 login!no cns aaa enableR6的配置:hostname R6!boot-start-markerboot-end-marker!ip subnet-zero!ip cefno ip domain-lookupmpls label range 600 699mpls label protocol ldp! interface Loopback0 ip address 6.6.6.6 255.255.255.255 no ip directed-broadcast!interface Tunnel0 ip address 192.168.0.6 255.25
17、5.255.252 no ip directed-broadcast mpls bgp forwarding tunnel source Loopback0 tunnel destination 4.4.4.4!interface FastEthernet0/0 ip address 192.168.0.2 255.255.255.252 no ip directed-broadcast mpls bgp forwarding!interface FastEthernet1/0 ip address 192.168.2.1 255.255.255.252 no ip directed-broa
18、dcast duplex half speed auto tag-switching ip! interface FastEthernet1/1 no ip address no ip directed-broadcast shutdown duplex half speed auto!router odr!router ospf 1 log-adjacency-changes redistribute connected subnets network 6.6.6.6 0.0.0.0 area 0 network 192.168.2.0 0.0.0.3 area 0!router bgp 2
19、 no synchronization no bgp default route-target filter bgp log-neighbor-changes neighbor 10.10.10.10 remote-as 2 neighbor 10.10.10.10 update-source Loopback0 neighbor 192.168.0.5 remote-as 1 no auto-summary ! address-family vpnv4 neighbor 10.10.10.10 activate neighbor 10.10.10.10 send-community both
20、 neighbor 192.168.0.5 activate neighbor 192.168.0.5 send-community both exit-address-family!ip classlessip route 4.4.4.4 255.255.255.255 192.168.0.1!tag-switching tdp router-id Loopback0control-plane!line con 0 exec-timeout 0 0 stopbits 1line aux 0 stopbits 1line vty 0 4 login!no cns aaa enableend第二
21、种方法:采用next-host-self这时ASBR上同时保存另一个AS的VPN路由,标签也由ASBR分配R9# show ip cef vrf test 11.11.11.1111.11.11.11/32, version 37, epoch 0, cached adjacency 192.168.2.90 packets, 0 bytes tag information set, all rewrites owned local tag: VPN route head fast tag rewrite with Fa0/0, 192.168.2.9, tags imposed 810 64
22、5 via 6.6.6.6, 0 dependencies, recursive next hop 192.168.2.9, FastEthernet0/0 via 6.6.6.6/32 (Default) valid cached adjacency tag rewrite with Fa0/0, 192.168.2.9, tags imposed 810 645R6#show mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched
23、interface 608 Untagged 4.4.4.4/32 0 Fa0/0 192.168.0.1 609 Pop tag 192.168.0.1/32 0 Fa0/0 192.168.0.1 610 Pop tag 192.168.2.12/30 0 Fa1/0 192.168.2.2 611 Pop tag 192.168.2.4/30 0 Fa1/0 192.168.2.2 612 714 192.168.2.16/30 0 Fa1/0 192.168.2.2 613 716 192.168.2.8/30 0 Fa1/0 192.168.2.2 614 Pop tag 7.7.7
24、.7/32 0 Fa1/0 192.168.2.2 615 715 8.8.8.8/32 0 Fa1/0 192.168.2.2 640 717 9.9.9.9/32 0 Fa1/0 192.168.2.2 641 713 10.10.10.10/32 0 Fa1/0 192.168.2.2 642 Pop tag 192.168.0.5/32 5068 Tu0 point2point 643 939 1:1:12.12.12.12/32 2956 Fa1/0 192.168.2.2 644 938 1:1:192.168.20.0/24 0 Fa1/0 192.168.2.2 645 427
25、 1:1:11.11.11.11/32 0 Tu0 point2point 646 428 1:1:192.168.10.0/24 0 Tu0 point2point 647 417 1:1:10.0.0.0/30 0 Tu0 point2point R4#show mpls forwarding-table Local Outgoing Prefix Bytes tag Outgoing Next Hop tag tag or VC or Tunnel Id switched interface 416 Untagged 6.6.6.6/32 0 Fa0/0 192.168.0.2 417
26、110 1:1:10.0.0.0/30 4894 Fa1/1 192.168.1.9 418 Pop tag 192.168.1.16/30 0 Fa1/1 192.168.1.9 419 Pop tag 192.168.1.4/30 0 Fa1/1 192.168.1.9 420 303 192.168.1.12/30 0 Fa1/1 192.168.1.9 421 300 192.168.1.0/30 0 Fa1/1 192.168.1.9 422 301 1.1.1.1/32 15844 Fa1/1 192.168.1.9 423 302 2.2.2.2/32 0 Fa1/1 192.1
27、68.1.9 424 Pop tag 3.3.3.3/32 0 Fa1/1 192.168.1.9 425 328 5.5.5.5/32 3573 Fa1/1 192.168.1.9 426 Pop tag 192.168.0.6/32 2680 Tu0 point2point 427 138 1:1:11.11.11.11/32 5068 Fa1/1 192.168.1.9 428 137 1:1:192.168.10.0/24 0 Fa1/1 192.168.1.9 429 644 1:1:192.168.20.0/24 0 Tu0 point2point 448 643 1:1:12.1
28、2.12.12/32 0 Tu0 point2point 449 609 1:1:10.0.0.4/30 0 Tu0 point2point R11#traceroute 12.12.12.12Type escape sequence to abort.Tracing the route to 12.12.12.12 1 10.0.0.1 112 msec 88 msec 100 msec 2 192.168.1.2 MPLS: Labels 205/448 Exp 0 912 msec 884 msec 936 msec 3 192.168.1.6 MPLS: Labels 329/448
29、Exp 0 984 msec 1008 msec 884 msec 4 192.168.1.10 MPLS: Label 448 Exp 0 936 msec 812 msec 888 msec 5 192.168.0.6 MPLS: Label 643 Exp 0 840 msec 764 msec 860 msec /标签由448变成643 6 192.168.2.2 MPLS: Labels 717/939 Exp 0 912 msec 764 msec 1080 msec 7 192.168.2.6 MPLS: Labels 813/939 Exp 0 1008 msec 884 ms
30、ec 864 msec 8 10.0.0.5 AS 20 MPLS: Label 939 Exp 0 744 msec 764 msec 792 msec 9 10.0.0.6 AS 20 864 msec 812 msec 888 msecR4的配置router ospf 1 log-adjacency-changes network 4.4.4.4 0.0.0.0 area 0 network 192.168.1.8 0.0.0.3 area 0!router bgp 1 no bgp default route-target filter bgp log-neighbor-changes neighbor 5.5.5.5 remote-as 1 neighbor 5.5.5.5 update-source Loopback0 neighbor 192.168.0.6 remote-as 2 ! address-family ipv4 neighbor 5.5.5.5 activate no neighbor 192.168.0.6 activate no auto-summary no synchronization exit-address-f
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1