!
interface lo
 ip address 172.16.255.1/32
 ip address 172.16.255.2/32
 ip address 172.16.255.3/32
 ip address 172.16.255.4/32
 ip address 172.16.255.5/32
 ip address 172.16.255.6/32
!
interface r1-eth0
 ip address 192.168.0.1/24
!
ip forwarding
!
router bgp 65001
 no bgp ebgp-requires-policy
 neighbor 192.168.0.2 remote-as external
 neighbor 192.168.0.2 timers 1 3
 neighbor 192.168.0.2 timers connect 1
 address-family ipv4
  redistribute connected
  neighbor 192.168.0.2 route-map r2 out
 exit-address-family
!
ip prefix-list p1 seq 5 permit 172.16.255.1/32
ip prefix-list p3 seq 5 permit 172.16.255.3/32
ip prefix-list p4 seq 5 permit 172.16.255.4/32
ip prefix-list p5 seq 5 permit 172.16.255.5/32
ip prefix-list p6 seq 5 permit 172.16.255.6/32
!
route-map r2 permit 10
 match ip address prefix-list p1
 set extcommunity rt 65001:1 65001:2
route-map r2 permit 20
 match ip address prefix-list p3
 set extcommunity rt 65001:3
route-map r2 permit 30
 match ip address prefix-list p4
 set extcommunity rt 65001:10 65001:12 65001:13
exit
route-map r2 permit 40
 match ip address prefix-list p5
 set extcommunity rt 65001:13 65001:14
exit
route-map r2 permit 50
 match ip address prefix-list p6
 set extcommunity rt 65001:16 65001:17 65001:18 65001:19
exit
route-map r2 permit 60
exit
!
