MPLS L3VPN. Взаимодействие между VRF

R2D2

hostname R2D2

!

ip cef

!

interface Loopback0

 ip address 10.22.22.22 255.255.255.255

!

interface FastEthernet0/0

 description To Linkmeup

 ip address 10.22.22.2 255.255.255.252

!

router ospf 1

 network 10.22.22.0 0.0.0.255 area 0

C3PO_1

hostname C3PO_1

!

ip cef

!

interface Loopback0

 ip address 192.168.255.1 255.255.255.255

!

interface FastEthernet0/0

 description To Linkmeup

 ip address 192.168.0.2 255.255.255.0

!

router ospf 1

 network 192.168.0.0 0.0.255.255 area 0

TARS_1

hostname TARS_1

!

ip cef

!

interface Loopback0

 ip address 172.16.255.1 255.255.255.255

!

interface FastEthernet0/0

 ip address 100.0.0.2 255.255.255.252

!

router bgp 64510

 network 172.16.255.1 mask 255.255.255.255

 neighbor 100.0.0.1 remote-as 64500

Linkmeup_R1

hostname Linkmeup_R1

!

ip cef

!

mpls ip

!

ip vrf C3PO

 rd 64500:100

 route-target export 64500:100

 route-target import 64500:100

 route-target import 64500:300

!

ip vrf TARS

 rd 64500:200

 route-target export 64500:200

 route-target import 64500:200

!

interface Loopback0

 ip address 1.1.1.1 255.255.255.255

 ip router isis 1

!

interface FastEthernet0/0

 description To C3PO_Electronic_1

 ip vrf forwarding C3PO

 ip address 192.168.0.1 255.255.255.0

 mpls ip

!

interface FastEthernet0/1

 description To Linkmeup_R2

 ip address 10.0.12.1 255.255.255.0

 ip router isis 1

 mpls ip

!

interface FastEthernet1/0

 description To TARS_1

 ip vrf forwarding TARS

 ip address 100.0.0.1 255.255.255.252

!

router ospf 2 vrf C3PO

 redistribute bgp 64500 subnets

 network 192.168.0.0 0.0.255.255 area 0

!

router isis 1

 net 10.0000.0000.0001.00

!

router isis

 is-type level-1

!

router bgp 64500

 neighbor 3.3.3.3 remote-as 64500

 neighbor 3.3.3.3 update-source Loopback0

 neighbor 3.3.3.3 soft-reconfiguration inbound

 !

 address-family vpnv4

 neighbor 3.3.3.3 activate

 neighbor 3.3.3.3 send-community both

 !

 address-family ipv4 vrf TARS

 redistribute connected

 neighbor 100.0.0.2 remote-as 64510

 neighbor 100.0.0.2 activate

 !

 address-family ipv4 vrf C3PO

 redistribute ospf 2 vrf C3PO match internal

mpls ldp router-id Loopback0

Linkmeup_R2

hostname Linkmeup_R1

!

ip cef

!

mpls ip

!

interface Loopback0

 ip address 2.2.2.2 255.255.255.255

 ip router isis 1

!

interface FastEthernet0/0

 description To Linkmeup_R1

 ip address 10.0.12.2 255.255.255.0

 ip router isis 1

 mpls ip

!

interface FastEthernet0/1

 description To Linkmeup_R3

 ip address 10.0.23.2 255.255.255.0

 ip router isis 1

 mpls ip

!

router isis 1

 net 10.0000.0000.0002.00

mpls ldp router-id Loopback0

Linkmeup_R3

hostname Linkmeup_R1

!

ip cef

!

mpls ip

!

ip vrf C3PO

 rd 64500:100

 route-target export 64500:100

 route-target import 64500:100

 route-target import 64500:300

!

ip vrf R2D2

 rd 64500:300

 route-target export 64500:300

 route-target import 64500:300

 route-target import 64500:100

!

ip vrf TARS

 rd 64500:200

 route-target export 64500:200

 route-target import 64500:200

!

interface Loopback0

 ip address 3.3.3.3 255.255.255.255

 ip router isis 1

!

interface FastEthernet0/0

 description To Linkmeup_R2

 ip address 10.0.23.3 255.255.255.0

 ip router isis 1

 mpls ip

!

interface FastEthernet0/1

 description To C3PO_2

 ip vrf forwarding C3PO

 ip address 192.168.1.1 255.255.255.0

 mpls ip

!

interface FastEthernet1/0

 description To TARS_2

 ip vrf forwarding TARS

 ip address 100.0.1.1 255.255.255.252

!

interface FastEthernet1/1

 description To R2D2

 ip vrf forwarding R2D2

 ip address 10.22.22.1 255.255.255.252

!

router ospf 2 vrf C3PO

 log-adjacency-changes

 redistribute bgp 64500 subnets

 network 192.168.0.0 0.0.255.255 area 0

!

router ospf 3 vrf R2D2

 log-adjacency-changes

 redistribute bgp 64500 subnets

 network 10.22.22.0 0.0.0.3 area 0

!

router isis

!

router isis 1

 net 10.0000.0000.0003.00

!

router bgp 64500

 neighbor 1.1.1.1 remote-as 64500

 neighbor 1.1.1.1 update-source Loopback0

 !

 address-family vpnv4

 neighbor 1.1.1.1 activate

 neighbor 1.1.1.1 send-community both

 !

 address-family ipv4 vrf TARS

 redistribute connected

 neighbor 100.0.1.2 remote-as 64520

 neighbor 100.0.1.2 activate

 !

 address-family ipv4 vrf R2D2

 redistribute ospf 3 vrf R2D2

 !

 address-family ipv4 vrf C3PO

 redistribute ospf 2 vrf C3PO

!

mpls ldp router-id Loopback0

C3PO_2

hostname C3PO_2

!

interface Loopback0

 ip address 192.168.255.2 255.255.255.255

!

interface FastEthernet0/0

 description To Linkmeup

 ip address 192.168.1.2 255.255.255.0

!

router ospf 1

 log-adjacency-changes

 network 192.168.0.0 0.0.255.255 area 0

TARS_2

hostname TARS_2

!

interface Loopback0

 ip address 172.16.255.2 255.255.255.255

!

interface Loopback1

 ip address 10.22.22.22 255.255.255.255

!

interface FastEthernet0/0

 description To Linkmeup

 ip address 100.0.1.2 255.255.255.252

!

router ospf 1

 log-adjacency-changes

 network 10.22.22.22 0.0.0.0 area 0

!

router bgp 64520

 network 10.22.22.22 mask 255.255.255.255

 network 172.16.255.2 mask 255.255.255.255

 neighbor 100.0.1.1 remote-as 64500