拓扑:

PE-CE使用ISIS_MPLS

 

PE1配置;

ip vrf r1
rd 100:1
route-target export 100:1
route-target import 100:1
route-target import 100:3
!
mpls label range 100 199
mpls label protocol ldp
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/2
ip vrf forwarding r1
ip address 16.1.1.1 255.255.255.0
ip router isis r1
!
interface Serial2/2
ip address 12.1.1.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
!
router ospf 100
mpls ldp autoconfig area 0
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
!
router isis r1
vrf r1
net 49.0001.0000.0000.0001.00
log-adjacency-changes all
redistribute bgp 100
!
router bgp 100
bgp router-id 1.1.1.1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 100
neighbor 3.3.3.3 update-source Loopback0
!
address-family ipv4
no synchronization
no auto-summary
exit-address-family
!
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf r1
no synchronization
redistribute isis r1 level-1-2
exit-address-family
!
ip bgp-community new-format
!
mpls ldp router-id Loopback0

p配置:

mpls label range 200 299
mpls label protocol ldp
!
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Serial2/2
ip address 12.1.1.2 255.255.255.0
encapsulation ppp
serial restart-delay 0
!
interface Serial2/3
ip address 23.1.1.2 255.255.255.0
encapsulation ppp
serial restart-delay 0
!
router ospf 100
mpls ldp autoconfig area 0
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0
!
mpls ldp router-id Loopback0

PE2配置:

ip vrf r3
rd 100:3
route-target export 100:3
route-target import 100:3
route-target import 100:1
!
mpls label range 300 399
mpls label protocol ldp
!
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/2
ip vrf forwarding r3
ip address 38.1.1.3 255.255.255.0
ip router isis r3
!
interface Serial2/3
ip address 23.1.1.3 255.255.255.0
encapsulation ppp
serial restart-delay 0
!
router ospf 100
mpls ldp autoconfig area 0
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 23.1.1.0 0.0.0.255 area 0
!
router isis r3
vrf r3
net 49.0002.0000.0000.0003.00
log-adjacency-changes all
redistribute bgp 100
!
router bgp 100
bgp router-id 3.3.3.3
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
!
address-family ipv4
no synchronization
no auto-summary
exit-address-family
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf r3
no synchronization
redistribute isis r3 level-1-2
exit-address-family
!
ip bgp-community new-format
!
mpls ldp router-id Loopback0

CE1配置:

interface Loopback0
ip address 6.6.6.6 255.255.255.255
ip router isis
!
interface Ethernet0/2
ip address 16.1.1.6 255.255.255.0
ip router isis
!
router isis
net 49.0001.0000.0000.0006.00
log-adjacency-changes all

CE2配置:

interface Loopback0
ip address 8.8.8.8 255.255.255.255
ip router isis
!
interface Ethernet0/2
ip address 38.1.1.8 255.255.255.0
ip router isis
!
router isis
net 49.0002.0000.0000.0008.00
log-adjacency-changes all

验证:

PE-CE使用ISIS_MPLS _02

说明:

这个配置在PE-CE之间的ISIS是层1层2的形式,有兴趣可以验证PE-CE之间L2和L1的形式,非常简单,在这里不给出。