Export and Import map

We can selectively import/export vpnv4 prefix to a VRF using import/export map.

Below is the summary;

Export Map;

  • We can match a prefix using access-list and set the extended community RT to a specific value. The Export RTs configured on the VRF mode is replaced by this RT configured on route-map.
  • we need to use “additive” option in set, if we need to add the RT to the already available RTs without replacing.

Eg:

R2#show run | sec vrf
ip vrf one
rd 1:1
export map 1
route-target export 11:11
route-target import 11:11
R2#show access-lists
Standard IP access list 1
10 permit 100.100.100.100 (4 matches)
R2#
R2#show route-map
route-map 1, permit, sequence 10
Match clauses:
ip address (access-lists): 1
Set clauses:
extended community RT:123:123 additive
Policy routing matches: 0 packets, 0 bytes
R2#

R2#show ip bgp vpnv4 all 100.100.100.100

<snip>

Extended Community: RT:11:11  RT:123:123

R2#

Import Map;
  • If we configure an import map using a route-map which matches specific RT, below checks are made;
  • the incoming vpnv4 prefix should at least have one RT similar to the import RT/s configured on VRF mode *and*  should match the RT/s configured in the route-map

R5#show run | sec vrf

ip vrf one

rd 1:1

import map 1

route-target export 11:11

route-target import 11:11

R5#show route-map

route-map 1, permit, sequence 10

Match clauses:

extcommunity (extcommunity-list filter):1

Set clauses:

Policy routing matches: 0 packets, 0 bytes

R5#show ip extcommunity-list

Standard extended community-list 1

10 permit RT:123:123

R5#

R5#show ip bgp vpnv4 all 100.100.100.100

<snip>

Extended Community: RT:11:11 RT:123:123

R5#

R5#show ip bgp vpnv4 all 12.1.1.0   <<<<<<<< This prefix has the import RT configured on VRF ‘one’.But still it will not be installed in VRF table as import map RT is not matching.

<snip>

Extended Community: RT:11:11 OSPF DOMAIN ID:0x0005:0x000000020200

R5#

R5#show ip bgp vpnv4 vrf one 100.100.100.100

BGP routing table entry for 1:1:100.100.100.100/32, version 33

Paths: (1 available, best #1, table one)

R5#show ip bgp vpnv4 vrf one 12.1.1.0

% Network not in table

R5#

HTH,

Venkat

Advertisements
This entry was posted in mpls and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s