!
feature bgp
feature ospf
!
! Prefix Equivalence Classes
!
ip prefix-list prefix-0-equivalence-class-pl seq 1 permit 200.0.1.0/24
ip prefix-list prefix-0-equivalence-class-pl seq 2 permit 200.0.2.0/23 eq 24
ip prefix-list prefix-0-equivalence-class-pl seq 3 permit 200.0.4.0/23 eq 24
!
!
! Interfaces
!
interface Ethernet8/1
  no switchport
  ip address 10.128.0.1/30
  ip ospf cost 100
  ip router ospf 10 area 0
  ip ospf dead-interval 5
  ip ospf hello-interval 1
  no shutdown
exit
!
interface Ethernet8/2
  no switchport
  ip address 10.128.0.5/30
  ip ospf cost 100
  ip router ospf 10 area 0
  ip ospf dead-interval 5
  ip ospf hello-interval 1
  no shutdown
exit
!
interface Ethernet8/3
  no switchport
  ip address 10.128.0.9/30
  ip ospf cost 100
  ip router ospf 10 area 0
  ip ospf dead-interval 5
  ip ospf hello-interval 1
  no shutdown
exit
!
interface Ethernet8/4
  no switchport
  ip address 10.192.0.1/30
  ip ospf cost 1
  ip router ospf 10 area 0
  ip ospf dead-interval 5
  ip ospf hello-interval 1
  no shutdown
exit
!
interface Loopback0
  ip address 10.0.0.1/32
  ip ospf cost 1
  ip router ospf 10 area 0
  no shutdown
exit
!
! Static Routes
!
!
! OSPF
!
router ospf 10
  router-id 10.0.0.1
  maximum-paths 1
exit
!
! BGP
!
route-map neighbor-R1-in permit 65535
exit
route-map neighbor-R1-out permit 65535
exit
route-map neighbor-R2-in permit 65535
exit
route-map neighbor-R2-out permit 65535
exit
route-map neighbor-R3-in permit 65535
exit
route-map neighbor-R3-out permit 65535
exit
route-map neighbor-R0_ext_4-in permit 65535
exit
route-map neighbor-R0_ext_4-out permit 65535
exit
!
router bgp 65535
  router-id 10.0.0.1
  neighbor 10.0.1.1 remote-as 65535
    update-source Loopback0
    address-family ipv4 unicast
      weight 100
      next-hop-self
      route-map neighbor-R1-in in
      route-map neighbor-R1-out out
      send-community both
      soft-reconfiguration inbound
    exit
  exit
  neighbor 10.0.2.1 remote-as 65535
    update-source Loopback0
    address-family ipv4 unicast
      weight 100
      next-hop-self
      route-map neighbor-R2-in in
      route-map neighbor-R2-out out
      send-community both
      soft-reconfiguration inbound
    exit
  exit
  neighbor 10.0.3.1 remote-as 65535
    update-source Loopback0
    address-family ipv4 unicast
      weight 100
      next-hop-self
      route-map neighbor-R3-in in
      route-map neighbor-R3-out out
      send-community both
      soft-reconfiguration inbound
    exit
  exit
  neighbor 10.192.0.2 remote-as 4
    update-source Ethernet8/4
    address-family ipv4 unicast
      weight 100
      next-hop-self
      route-map neighbor-R0_ext_4-in in
      route-map neighbor-R0_ext_4-out out
      soft-reconfiguration inbound
    exit
  exit
  address-family ipv4 unicast
    network 10.0.0.0/8
  exit
exit
!
ip route 10.0.0.0/8 null 0
!
! Route-Maps
!
route-map neighbor-R0_ext_4-in permit 32778
  match ip address prefix-list prefix-0-equivalence-class-pl
  set weight 10
exit
!
ip prefix-list neighbor-R0_ext_4-in-32788-pl seq 1 permit 100.0.1.0/24
route-map neighbor-R0_ext_4-in permit 32788
  match ip address prefix-list neighbor-R0_ext_4-in-32788-pl
  set weight 20
exit
!
ip prefix-list neighbor-R0_ext_4-in-32798-pl seq 1 permit 100.0.1.0/24
ip prefix-list neighbor-R0_ext_4-in-32798-pl seq 2 permit 200.0.1.0/24
ip prefix-list neighbor-R0_ext_4-in-32798-pl seq 3 permit 200.0.2.0/23 eq 24
ip prefix-list neighbor-R0_ext_4-in-32798-pl seq 4 permit 200.0.4.0/23 eq 24
route-map neighbor-R0_ext_4-in permit 32798
  match ip address prefix-list neighbor-R0_ext_4-in-32798-pl
  set weight 30
exit
