cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
296
Views
0
Helpful
1
Replies

Importing prefixes learned [from BGP under a VRF] [to the Global Routing Table]

john.salcedo1
Level 1
Level 1

The topology is pretty simple. There are 2 routers interconnected via g2/0.

R1 Configuration:

vrf definition VRF-X
 rd 1:1
 !
 address-family ipv4
  export map RM-VRF-TO-GLOBAL
  route-target export 1:1
  route-target import 1:1
 exit-address-family

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
 vrf forwarding VRF-X
 ip address 1.1.1.2 255.255.255.255

interface GigabitEthernet2/0
 vrf forwarding VRF-X
 ip address 10.0.0.1 255.255.255.252

 

router bgp 1
 bgp log-neighbor-changes
 !
 address-family ipv4 vrf VRF-X
  neighbor 10.0.0.2 remote-as 2
  neighbor 10.0.0.2 activate
 exit-address-family

ip prefix-list VRF-TO-GLOBAL seq 5 permit 0.0.0.0/0
ip prefix-list VRF-TO-GLOBAL seq 10 permit 50.50.50.50/32

route-map RM-VRF-TO-GLOBAL permit 10
 match ip address prefix-list VRF-TO-GLOBAL

 

R2 Configuration:

interface Loopback0
 ip address 50.50.50.50 255.255.255.255

interface GigabitEthernet2/0
 ip address 10.0.0.2 255.255.255.0

router bgp 2
 bgp log-neighbor-changes
 redistribute connected
 neighbor 10.0.0.1 remote-as 1
 neighbor 10.0.0.1 default-originate

 

R1 Verification:

R1#sho ip route vrf VRF-X 0.0.0.0

Routing Table: VRF-X
Routing entry for 0.0.0.0/0, supernet
  Known via "bgp 1", distance 20, metric 0, candidate default path
  Tag 2, type external
  Last update from 10.0.0.2 00:21:49 ago
  Routing Descriptor Blocks:
  * 10.0.0.2, from 10.0.0.2, 00:21:49 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 2
      MPLS label: none

 

R1#show ip route 0.0.0.0
% Network not in table

 

Could anybody please tell me what am I missing here?

 

1 Reply 1

Martin Hruby
Level 1
Level 1

Hello John

I would recommend that on R1 you replace the export map definition with the following and include "ipv4 unicast":

vrf definition temp
 rd 1:1
 !
 address-family ipv4
  export ipv4 unicast map RM-VRF-TO-GLOBAL

Let us know if that works for you.

Best regards,
Martin

Review Cisco Networking for a $25 gift card