frr version 8.1 frr defaults traditional hostname G no ipv6 forwarding ! interface eth1 description C-eth3 ip address 10.10.10.22/30 ip ospf cost 100 exit ! interface eth2 description D-eth4 ip address 10.10.10.30/30 ip ospf cost 10 exit ! interface eth3 description R1-eth3 ip address 203.0.113.9/30 exit ! interface lo ip address 10.10.0.6/32 ip ospf passive exit ! router bgp 65501 bgp router-id 10.10.0.6 no bgp ebgp-requires-policy neighbor 10.10.0.5 remote-as 65501 neighbor 10.10.0.5 shutdown neighbor 10.10.0.5 update-source lo neighbor 203.0.113.10 remote-as 65503 neighbor 203.0.113.10 update-source eth3 ! address-family ipv4 unicast redistribute ospf metric 10 route-map BGP-to-OSPF neighbor 10.10.0.5 next-hop-self neighbor 203.0.113.10 route-map PREPEND out exit-address-family exit ! router ospf ospf router-id 10.10.0.6 redistribute bgp metric 20 metric-type 1 route-map BGP-to-OSPF network 10.10.0.6/32 area 2 network 10.10.10.0/27 area 2 exit ! ip prefix-list ALLOWED_ROUTES seq 10 permit 10.0.0.0/24 ge 32 ip prefix-list ALLOWED_ROUTES seq 20 permit 192.168.0.0/16 ge 24 ip prefix-list ALLOWED_ROUTES seq 30 deny 0.0.0.0/0 le 32 ! route-map BGP-to-OSPF permit 10 match ip address prefix-list ALLOWED_ROUTES exit ! route-map PREPEND permit 10 set as-path prepend 65501 65501 exit !