cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1450
Views
0
Helpful
7
Replies

Problems on Exporting routes to another VRF

omarquez
Level 1
Level 1

I'd appreciate it if someone can tell me what needs to be fixed below for me to export subnets from VRF customer1 to VRF mpls-monitor. Right now I see private /30 routes on the route table of customer1 VRF but nothing is exported to the route table of the mpls-monitor VRF.

ip vrf customer1

rd 1:119

export map from-rd119

route-target export 1:119

route-target import 1:119

ip vrf mpls-monitor

rd 1:100

route-target export 1:100

route-target import 1:100

route-map from-rd119 permit 10

match ip address prefix-list rfc-1918

set extcommunity rt 1:100 additive

!

route-map from-rd119 permit 20

match ip address default

ip prefix-list rfc-1918 seq 10 permit 10.0.0.0/8 ge 30 le 31

ip access-list standard default

permit any

Below lists the current bgp table of cutomer1:

PE1#show ip bgp v vrf customer1

BGP table version is 184, local router ID is 10.0.1.19

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

r RIB-failure, S Stale

Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

Route Distinguisher: 1:119 (default for vrf customer1)

*>i0.0.0.0 10.1.1.11 0 100 0 ?

* i 10.1.1.11 0 100 0 ?

*>i10.10.119.0/30 10.1.1.11 0 100 0 i

* i 10.1.1.11 0 100 0 i

*>i10.10.119.4/30 10.0.1.13 0 100 0 i

* i 10.0.1.13 0 100 0 i

*>i10.10.119.8/30 10.2.1.11 0 100 0 i

* i 10.2.1.11 0 100 0 i

*>i192.168.0.0 10.1.1.11 0 100 0 ?

* i 10.1.1.11 0 100 0 ?

* i192.168.1.0 10.0.1.13 0 100 0 ?

*>i 10.0.1.13 0 100 0 ?

* i192.168.2.0 10.2.1.11 0 100 0 ?

*>i 10.2.1.11 0 100 0 ?

7 Replies 7

Harold Ritter
Spotlight
Spotlight

This should work just fine. Can you include your BGP configuration.

Thanks,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

Hi Harold, thanks for the quick response.

Here is my BGP config. I am also running 12.4.(3) if the IOS makes any difference.

router bgp 1

no synchronization

no bgp log-neighbor-changes

neighbor rrserver peer-group

neighbor rrserver remote-as 1

neighbor rrserver update-source Loopback1

neighbor rrserver next-hop-self

neighbor 10.0.1.1 peer-group rrserver

neighbor 10.0.1.2 peer-group rrserver

maximum-paths 4

no auto-summary

!

address-family vpnv4

neighbor rrserver send-community extended

neighbor 10.0.1.1 activate

neighbor 10.0.1.2 activate

exit-address-family

!

address-family nsap

maximum-paths 4

no synchronization

exit-address-family

!

address-family ipv4 vrf mpls-monitor

redistribute static

no auto-summary

no synchronization

exit-address-family

!

address-family ipv4 vrf customer1

no auto-summary

no synchronization

exit-address-family

romccallum
Level 4
Level 4

when you do a show route-map or something like show ip prefix-list (trying to do the same as show access-list) do you see any matches being done?

justin.white
Level 1
Level 1

I believe you are missing just one line. Try the following addition:

ip vrf customer1

rd 1:119

export map from-rd119

route-target export 1:100 ; Try this addition...

route-target export 1:119

route-target import 1:119

Hi Justin,

I tried that and had no luck either. From what I understand, the export-map should be able to take of this for me without adding another route-target statement.

There is one thing I notice though. The only routes that I can export are the ones that are connected or static. I have not done a lot of route imports and exports but if this is how it really behaves then I'll just have to configure every PE router for exports.

Hi ..

The problems that you are running into, looks like the same ones I had,

Here is a snap, of my working configuration,

ip vrf Customer1

rd 1:10030

export map Customer1

route-target export 1:10030

route-target import 1:10030

route-target import 1:10053

!

route-map Customer1 permit 10

match ip address 16

set extcommunity rt 1:1 additive

!

access-list 16 permit 10.9.133.128 0.0.0.127

access-list 16 permit 10.9.133.32 0.0.0.3

!

ip vrf Management

rd 1:10053

route-target export 1:10053

route-target import 1:10053

route-target import 1:1

I also had a problem, that routes was learned from iBGP, and was not propagated to eBGP peers.

The reason i set extcommunity to 1:1 additive, and only import 1:1 i my management, is if you export to 1:10053, and you try to import 1:10053 in another VRF, you se all exported networks, i any other vrf where you import you management vrf

Let me know if this works..

-./Peter

From my understanding (someone can clarify this) your route-target community additions work the route are being imported into the BGP VPNV4. Hence, for routes leanrt via iBGP across the VPNV4, the route-target export or the export map command has no effect.

For routes learnt from the PE to CE IGP, or from the static or coonected routes on the PE, the desired route-targets will be applied.

I've never tried this before, but it could work. Create a route-map to match the prefix you want and add the desired community. Then apply the route-map to the VPNV4 session.

ip extcommunity-list 1 permit rt x:y

route-map comm permit 10

match extcommunity 1

set extcommunity rt x:z additive

router bgp x

address-family vpnv4

neigh a.a.a.a route-map comm in