!
hostname r2
password zebra
log file /tmp/r2-frr.log
!
interface r2-eth0
 ip address 10.0.2.2/24
 ip ospf hello-interval 1
 ip ospf dead-interval 4
!
interface r2-eth1
 ip address 10.0.20.2/24
 ip ospf hello-interval 1
 ip ospf dead-interval 4
!
ip route 0.0.0.0/0 10.0.20.1
!
interface r2-eth2 vrf ray
 ip address 10.0.40.2/24
 ip ospf hello-interval 1
 ip ospf dead-interval 4
!
ip forwarding
!
vrf ray
 ip protocol bgp route-map rmap
 exit-vrf
!
router ospf
  ospf router-id 10.0.255.2
  redistribute bgp
  network 10.0.2.0/24 area 0
  network 10.0.20.0/24 area 0
!
router ospf vrf ray
  ospf router-id 10.0.255.1
  redistribute bgp
  network 10.0.40.0/24 area 0
!

router bgp 99
  no bgp ebgp-requires-policy
  address-family ipv4 unicast
    redistribute connected
    redistribute ospf
    import vrf ray
  !
!
router bgp 99 vrf ray
  no bgp ebgp-requires-policy
  address-family ipv4 unicast
    redistribute connected
    redistribute ospf
    import vrf default
  !
!
!!!!!!!!!!!!!!!!!!!!!
! VRFs neno and ray subnets
ip prefix-list nets seq 5 permit 10.0.3.0/24
ip prefix-list nets seq 10 permit 10.0.30.0/24
ip prefix-list nets seq 15 permit 10.0.4.0/24
ip prefix-list nets seq 20 permit 10.0.40.0/24
ip prefix-list nets seq 25 deny any
!
route-map rmap permit 10
  match ip address prefix-list nets
  exit
!
