schemas-microsoft-com:
office:
office"/>
方法一:
默认情况下,R6从AS1学到VPNv4的路由再通告给R10(RR)时,下一跳地址为R4的F0/0的地址,但是R10学到VPNv4路由的下一跳地址不可达,所以在R4和R6上分别将tunnel的互联地址重新分发到IGP中,这样R10才通将VPNv4的路由传递给R9。
在标签交换方面,下一跳地址不改变,就不会重新分配标签。
如R9学到的VPNv4的路由分配out标签是由R4分配的。
R9#showipcefvrftest11.11.11.11
11.11.11.11/32,version34,epoch0,cachedadjacency192.168.2.9
0packets,0bytes
taginformationset,allrewritesowned
localtag:
VPNroutehead
fasttagrewritewithFa0/0,192.168.2.9,tagsimposed{840427}
via192.168.0.5,0dependencies,recursive
nexthop192.168.2.9,FastEthernet0/0via192.168.0.5/32(Default)
validcachedadjacency
tagrewritewithFa0/0,192.168.2.9,tagsimposed{840427}
R11#traceroute12.12.12.12
Typeescapesequencetoabort.
Tracingtherouteto12.12.12.12
110.0.0.160msec140msec168msec
2192.168.1.2[MPLS:
Labels232/643Exp0]1008msec1028msec936msec
3192.168.1.6[MPLS:
Labels332/643Exp0]840msec1004msec816msec
4192.168.1.10[MPLS:
Labels426/643Exp0]888msec836msec768msec
5192.168.0.6[MPLS:
Label643Exp0]768msec812msec1176msec //只有单层标签
6192.168.2.2[MPLS:
Labels717/939Exp0]888msec932msec936msec
7192.168.2.6[MPLS:
Labels813/939Exp0]792msec740msec816msec
810.0.0.5[AS20][MPLS:
Label939Exp0]796msec688msec984msec
910.0.0.6[AS20]1032msec884msec984msec
R11#
R4和R6上只保存本AS内的VPNv4的路由。
R4#showmplsforwarding-table
Local Outgoing Prefix Bytestag Outgoing NextHop
tag tagorVC orTunnelId switched interface
416 Untagged 6.6.6.6/32 0 Fa0/0 192.168.0.2
417 110 1:
1:
10.0.0.0/30 610 Fa1/1 192.168.1.9
418 Poptag 192.168.1.16/30 0 Fa1/1 192.168.1.9
419 Poptag 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 Poptag 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 Poptag 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#showmplsforwarding-table
Local Outgoing Prefix Bytestag Outgoing NextHop
tag tagorVC orTunnelId switched interface
608 Untagged 4.4.4.4/32 0 Fa0/0 192.168.0.1
609 Poptag 192.168.0.1/32 0 Fa0/0 192.168.0.1
610 Poptag 192.168.2.12/30 0 Fa1/0 192.168.2.2
611 Poptag 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 Poptag 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 Poptag 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.168.20.0/24 \
0 Fa1/0 192.168.2.2
R4的配置:
hostnameR4
!
boot-start-marker
boot-end-marker
!
!
ipsubnet-zero
!
!
ipcef
noipdomain-lookup
mplslabelrange400499
mplslabelprotocolldp
!
!
!
interfaceLoopback0
ipaddress4.4.4.4255.255.255.255
noipdirected-broadcast
!
interfaceTunnel0
ipaddress192.168.0.5255.255.255.252
noipdirected-broadcast
mplsbgpforwarding
tunnelsourceLoopback0
tunneldestination6.6.6.6
!
interfaceFastEthernet0/0
ipaddress192.168.0.1255.255.255.252
noipdirected-broadcast
mplsbgpforwarding
!
interfaceFastEthernet1/0
noipaddress
noipdirected-broadcast
shutdown
duplexhalf
speedauto
!
interfaceFastEthernet1/1
ipaddress192.168.1.10255.255.255.252
noipdirected-broadcast
duplexhalf
speedauto
tag-switchingip
!
routerospf1
log-adjacency-changes
redistributeconnectedsubnets
network4.4.4.40.0.0.0area0
network192.168.1.80.0.0.3area0
!
routerbgp1
nobgpdefaultroute-targetfilter
bgplog-neighbor-changes
neighbor5.5.5.5remote-as1
neighbor5.5.5.5update-sourceLoopback0
neighbor192.168.0.6remote-as2
!
address-familyipv4
neighbor5.5.5.5activate
noneighbor192.168.0.6activate
noauto-summary
nosynchronization
exit-address-family
!
address-familyvpnv4
neighbor5.5.5.5activate
neighbor5.5.5.5send-communityboth
neighbor192.168.0.6activate
neighbor192.168.0.6send-communityboth
exit-address-family
!
ipclassless
iproute6.6.6.6255.255.255.255192.168.0.2
!
!
!
control-plane
!
!
linecon0
exec-timeout00
stopbits1
lineaux0
stopbits1
linevty04
login
!
nocnsaaaenable
R6的配置:
hostnameR6
!
boot-start-marker
boot-end-marker
!
!
ipsubnet-zero
!
!
ipcef
noipdomain-lookup
mplslabelrange600699
mplslabelprotocolldp
!
!
!
interfaceLoopback0
ipaddress6.6.6.6255.255.255.255
noipdirected-broadcast
!
interfaceTunnel0
ipaddress192.168.0.6255.255.255.252
noipdirected-broadcast
mplsbgpforwarding
tunnelsourceLoopback0
tunneldestination4.4.4.4
!
interfaceFastEthernet0/0
ipaddress192.168.0.2255.255.255.252
noipdirected-broadcast
mplsbgpforwarding
!
interfaceFastEthernet1/0
ipaddress192.168.2.1255.255.255.252
noipdirected-broadcast
duplexhalf
speedauto
tag-switchingip
!
interfaceFastEthernet1/1
noipaddress
noipdirected-broadcast
shutdown
duplexhalf
speedauto
!
routerodr
!
routerospf1
log-adjacency-changes
redistributeconnectedsubnets
network6.6.6.60.0.0.0area0
network192.168.2.00.0.0.3area0
!
routerbgp2
nosynchronization
nobgpdefaultroute-targetfilter
bgplog-neighbor-changes
neighbor10.10.10.10remote-as2
neighbor10.10.10.10update-sourceLoopback0
neighbor192.168.0.5remote-as1
noauto-summary
!
address-familyvpnv4
neighbor10.10.10.10activate
neighbor10.10.10.10send-communityboth
neighbor192.168.0.5activate
neighbor192.168.0.5send-communityboth
exit-address-family
!
ipclassless
iproute4.4.4.4255.255.255.255192.168.0.1
!
!
!
tag-switchingtdprouter-idLoopback0
control-plane
!
!
linecon0
exec-timeout00
stopbits1
lineaux0
stopbits1
linevty04
login
!
nocnsaaaenable
end
第二种方法:
采用next-host-self
这时ASBR上同时保存另一个AS的VPN路由,标签也由ASBR分配
R9#showipcefvrftest11.11.11.11
11.11.11.11/32,version37,epoch0,cachedadjacency192.168.2.9
0packets,0bytes
taginformationset,allrewritesowned
localtag:
VPNroutehead
fasttagrewritewithFa0/0,192.168.2.9,tagsimposed{810645}
via6.6.6.6,0dependencies,recursive
nexthop192.168.2.9,FastEthernet0/0via6.6.6.6/32(Default)
validcachedadjacency
tagrewritewithFa0/0,192.168.2.9,tagsimposed{810645}
R6#showmplsforwarding-table
Local Outgoing Prefix Bytestag Outgoing NextHop
tag tagorVC orTunnelId switched interface
608 Untagged 4.4.4.4/32 0 Fa0/0 192.168.0.1
609 Poptag 192.168.0.1/32 0 Fa0/0 192.168.0.1
610 Poptag 192.168.2.12/30 0 Fa1/0 192.168.2.2
611 Poptag 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 Poptag 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 0 Fa1/0 192.168.2.2
642 Poptag 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 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#showmplsforwarding-table
Local Outgoing Prefix Bytesta