ECO1:

enable
configure
 
hostname ECO1
 
ip vrf GOLD
 rd 2000:1
 route-target both 2000:100
 
ip vrf SILVER
 rd 2000:11
 route-target both 2000:200
 
router ldp
 transport-address ipv4 1.1.1.1
 advertisement-mode downstream-unsolicited
 
router ospf 1 GOLD
 redistribute bgp
 network 11.1.1.1/32 area 0
 network 192.168.0.0 0.0.0.255 area 0
 no capability cspf
 
router ospf 2 SILVER
 redistribute bgp
 network 13.1.1.1/32 area 0
 network 100.0.0.0 0.0.0.255 area 0
 no capability cspf
 
router isis 1
 net 10.0000.0000.0001.00
 
router bgp 2000
 neighbor 3.3.3.3 remote-as 2000
 neighbor 3.3.3.3 update-source 1.1.1.1
 address-family vpnv4 unicast
  neighbor 3.3.3.3 activate
  exit-address-family
 address-family ipv4 vrf GOLD
  redistribute ospf
  exit-address-family
 address-family ipv4 vrf SILVER
  redistribute ospf
  exit-address-family
 
port ge0
 service-instance 4ge0
  encapsulation untagged
 
port ge1
 service-instance 4ge1
  encapsulation untagged
 
port ge2
 service-instance 4ge2
  encapsulation untagged 
 
interface loopback.0
 ip address 1.1.1.1/32
 ip router isis 1
 
interface loopback.1
 ip vrf forwarding GOLD
 ip address 11.1.1.1/32
 
interface loopback.2
 ip vrf forwarding SILVER
 ip address 13.1.1.1/32
 
interface 2ge0
 description To GOLD R1
 ip vrf forwarding GOLD
 connect port ge0 service-instance 4ge0
 ip address 192.168.0.1/24
 
interface 2ge1
 description To SILVER R3
 ip vrf forwarding SILVER
 connect port ge1 service-instance 4ge1
 ip address 100.0.0.1/24
 
interface 2ge2
 description To ECO2
 connect port ge2 service-instance 4ge2
 ip address 10.0.12.1/24
 ip router isis 1
 label-switching
 ldp enable ipv4

ECO2:

enable
configure
 
hostname ECO2
 
router ldp
 transport-address ipv4 2.2.2.2
 advertisement-mode downstream-unsolicited
 
router isis 1
 net 10.0000.0000.0002.00
 
interface loopback.0
 ip address 2.2.2.2/32
 ip router isis 1
 
port ge0
 service-instance 4ge0
  encapsulation untagged
 
port ge1
 service-instance 4ge1
  encapsulation untagged
 
interface 2ge0
 description To ECO1
 connect port ge0 service-instance 4ge0
 ip address 10.0.12.2/24
 ip router isis 1
 label-switching
 ldp enable ipv4
 
interface 2ge1
 description To ECO3
 connect port ge1 service-instance 4ge1
 ip address 10.0.23.2/24
 ip router isis 1
 label-switching
 ldp enable ipv4

ECO 3:

enable
configure
 
hostname ECO3
 
ip vrf GOLD
 rd 2000:3
 route-target both 2000:100
 
ip vrf SILVER
 rd 2000:33
 route-target both 2000:200
 
router ldp
 transport-address ipv4 3.3.3.3
 advertisement-mode downstream-unsolicited
 
router ospf 1 GOLD
 redistribute bgp
 network 32.3.3.3/32 area 0
 network 192.168.1.0 0.0.0.255 area 0
 no capability cspf
 
router ospf 2 SILVER
 redistribute bgp
 network 34.3.3.3/32 area 0
 network 100.0.1.0 0.0.0.255 area 0
 no capability cspf
 
router isis 1
 net 10.0000.0000.0003.00
 
router bgp 2000
 neighbor 1.1.1.1 remote-as 2000
 neighbor 1.1.1.1 update-source 3.3.3.3
 address-family vpnv4 unicast
  neighbor 1.1.1.1 activate
  exit-address-family
 address-family ipv4 vrf GOLD
  redistribute ospf
  exit-address-family
 address-family ipv4 vrf SILVER
  redistribute ospf
  exit-address-family
 
port ge0
 mtu 9728
 service-instance 4ge0
  encapsulation untagged
 
port ge1
 mtu 9728
 service-instance 4ge1
  encapsulation untagged
 
port ge2
 mtu 9728
 service-instance 4ge2
  encapsulation untagged
  
interface loopback.0
 ip address 3.3.3.3/32
 ip router isis 1
 
interface loopback.1
 ip vrf forwarding GOLD
 ip address 32.3.3.3/32
 
interface loopback.2
 ip vrf forwarding SILVER
 ip address 34.3.3.3/32
 
interface 2ge0
 description To GOLD R2
 ip vrf forwarding GOLD
 connect port ge0 service-instance 4ge0
 ip address 192.168.1.1/24
 
interface 2ge1
 description To SILVER R4
 ip vrf forwarding SILVER
 connect port ge1 service-instance 4ge1
 ip address 100.0.1.1/24
 
interface 2ge2
 description To ECO2
 connect port ge2 service-instance 4ge2
 ip address 10.0.23.3/24
 ip router isis 1
 label-switching
 ldp enable ipv4

R1:

configure terminal
 
hostname R1
 
interface Loopback0
 ip address 11.11.11.11 255.255.255.255
 ip ospf 1 area 0
 
interface FastEthernet0/0
 ip address 192.168.0.2 255.255.255.0
 duplex full
 no shutdown
 
router ospf 1
 passive-interface Loopback0
 network 192.168.0.0 0.0.0.255 area 0

R2:

configure terminal
hostname R2
 
interface Loopback0
 ip address 22.22.22.22 255.255.255.255
 ip ospf 1 area 0
 
interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
 duplex full
 no shutdown
 
router ospf 1
 passive-interface Loopback0
 network 192.168.1.0 0.0.0.255 area 0

R3:

configure terminal
hostname R3
 
interface Loopback0
 ip address 33.33.33.33 255.255.255.255
 ip ospf 1 area 0
 
interface FastEthernet0/0
 ip address 100.0.0.2 255.255.255.0
 duplex full
 no shutdown
 
router ospf 1
 passive-interface Loopback0
 network 100.0.0.0 0.0.0.255 area 0

R4:

configure terminal
hostname R4
 
interface Loopback0
 ip address 44.44.44.44 255.255.255.255
 ip ospf 1 area 0
 
interface FastEthernet0/0
 ip address 100.0.1.2 255.255.255.0
 duplex full
 no shutdown
 
router ospf 1
 passive-interface Loopback0
 network 100.0.1.0 0.0.0.255 area 0

Замена соединений CE-PE c OSPF на BGP

ECO 1:

enable
configure
 
no router ospf 1
no router ospf 2
no interface loopback.1
no interface loopback.2
 
router bgp 2000
 address-family ipv4 vrf GOLD
  no redistribute ospf
  neighbor 192.168.0.2 remote-as 100
  neighbor 192.168.0.2 activate
  exit-address-family
 address-family ipv4 vrf SILVER
  no redistribute ospf
  neighbor 100.0.0.2 remote-as 300
  neighbor 100.0.0.2 activate
  exit-address-family

ECO 3:

enable
configure
 
no router ospf 1
no router ospf 2
no interface loopback.1
no interface loopback.2
 
router bgp 2000
 address-family ipv4 vrf GOLD
  no redistribute ospf
  neighbor 192.168.1.2 remote-as 200
  neighbor 192.168.1.2 activate
 address-family ipv4 vrf SILVER
  no redistribute ospf
  neighbor 100.0.1.2 remote-as 400
  neighbor 100.0.1.2 activate
  exit-address-family

R1:

configure terminal
 
no router ospf 1
 
router bgp 100
 network 11.11.11.11 mask 255.255.255.255
 neighbor 192.168.0.1 remote-as 2000

R2:

configure terminal
 
no router ospf 1
 
router bgp 200
 network 22.22.22.22 mask 255.255.255.255
 neighbor 192.168.1.1 remote-as 2000

R3:

configure terminal
 
no router ospf 1
 
router bgp 300
 network 33.33.33.33 mask 255.255.255.255
 neighbor 100.0.0.1 remote-as 2000

R4:

configure terminal
 
no router ospf 1
 
router bgp 400
 network 44.44.44.44 mask 255.255.255.255
 neighbor 100.0.1.1 remote-as 2000