hostname R1
interface GigabitEthernet 0/0
no switchport
ip address 12.0.0.1 255.255.255.0
interface GigabitEthernet 0/2
interface Loopback 0
ip address 1.1.1.1 255.255.255.255
router bgp 1
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 12.0.0.2 remote-as 100
address-family ipv4
network 1.1.1.1 mask 255.255.255.255
neighbor 12.0.0.2 activate
exit-address-family
hostname R2
ip vrf 1
rd 1:100
route-target export 100:200
route-target import 200:100
mpls ip
interface GigabitEthernet 0/0
no switchport
ip vrf forwarding 1
ip address 12.0.0.2 255.255.255.0
interface GigabitEthernet 0/1
no switchport
ip address 23.0.0.2 255.255.255.0
ip ospf 100 area 0
mpls ip
label-switching
interface Loopback 0
ip address 2.2.2.2 255.255.255.255
ip ospf 100 area 0
router bgp 100
bgp log-neighbor-changes
bgp graceful-restart restart-time 120
bgp graceful-restart stalepath-time 360
bgp graceful-restart
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback 0
neighbor 7.7.7.7 remote-as 200
neighbor 7.7.7.7 ebgp-multihop 255
neighbor 7.7.7.7 update-source Loopback 0
address-family ipv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 next-hop-self
neighbor 4.4.4.4 send-label