Task 4.2 - Alternate Solution Using Export Maps

Hi,

 

I noticed the SG solution was different to mine, admittedly the SG version is simpler, but I really thought they would have used export maps. Usually when your rd is 100:5 and you're exporting with route-target 100:5 you would also want to import route-target 100:5... Anyway here's my alternate solution:

 

! *** ROUTER 5 ***
!
ip prefix-list LOOPBACK-105 seq 5 permit 172.16.5.0/24
!
route-map EXPORT permit 10
 match ip address prefix-list LOOPBACK-105
 set extcommunity rt  100:6
!
ip vrf VPN_A
 rd 100:5
 export map EXPORT
 route-target export 100:5
 route-target import 100:5
!
ip vrf VPN_B
 rd 100:6
 route-target export 100:6
 route-target import 100:6
!
interface Loopback105
 ip vrf forwarding VPN_A
 ip address 172.16.5.5 255.255.255.0
!
router bgp 100
 address-family vpnv4
  neighbor 150.1.6.6 activate
  neighbor 150.1.6.6 send-community extended
 exit-address-family
 !       
 address-family ipv4 vrf VPN_A
  redistribute connected
end


! *** ROUTER 6 ***
!
ip prefix-list LOOPBACK-106 seq 5 permit 192.168.6.0/24
!
route-map EXPORT permit 10
 match ip address prefix-list LOOPBACK-106
 set extcommunity rt  100:5
!
ip vrf VPN_A
 rd 100:5
 route-target export 100:5
 route-target import 100:5
!
ip vrf VPN_B
 rd 100:6
 export map EXPORT
 route-target export 100:6
 route-target import 100:6
!
interface Loopback106
 ip vrf forwarding VPN_B
 ip address 192.168.6.6 255.255.255.0
!
router bgp 100
 address-family vpnv4
  neighbor 150.1.5.5 activate
  neighbor 150.1.5.5 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf VPN_B
  redistribute connected
end

 

With this solution, the VRF VPN_A on router 6 still receives the VPN_A route to 172.16.5.0/24, and vice versa for VRF VPN_B on router 5 for subnet 192.168.6.0/24 while still meeting the task requirements.

Comments

  • ip prefix-list LOOPBACK-105 seq 5 permit 172.16.5.0/24
    !
    route-map EXPORT permit 10
     match ip address prefix-list LOOPBACK-105
     set extcommunity rt  100:6
    !
    ip vrf VPN_A
     rd 100:5
     export map EXPORT
     route-target export 100:5
     route-target import 100:5
    !
    ip vrf VPN_B
     rd 100:6
     route-target export 100:6
     route-target import 100:6
    !
    interface Loopback105
     ip vrf forwarding VPN_A
     ip address 172.16.5.5 255.255.255.0
    !
    router bgp 100
     address-family vpnv4
      neighbor 150.1.6.6 activate
      neighbor 150.1.6.6 send-community extended
     exit-address-family
     !       
     address-family ipv4 vrf VPN_A
      redistribute connected
    end

    Thats right, this solutions is correct and valid but this solution seems to be more complex.

  • Mine was similar...

    The major parts:

    R5:
    ip vrf VPN_A
     rd 100:5
     export map LOOP
     route-target export 100:5
     route-target import 100:5
     route-target import 100:66

     address-family vpnv4
      neighbor 150.1.6.6 activate
      neighbor 150.1.6.6 send-community extended
     exit-address-family

     address-family ipv4 vrf VPN_A
      network 172.16.5.0 mask 255.255.255.0
     exit-address-family

    route-map LOOP permit 10
     match ip address prefix-list LOOPBACK
     set extcommunity rt  100:55
    !
    route-map LOOP permit 20
     set extcommunity rt  100:5

    ip prefix-list LOOPBACK seq 5 permit 172.16.5.0/24

    (same for R6 but using 100:66 for it's loopback)

    Works as per SG.

Sign In or Register to comment.