Skip to content

docs: Document what address-family ipv4 unicast import vrf route-map <ROUTE-MAP> does #20646

@robinchrist

Description

@robinchrist

It is possible to configure the following:

router bgp AS
 address-family ipv4 unicast
  import vrf route-map foobar
  import vrf myVRF
 exit-address-family

The import vrf route-map foobar doesn't appear to be documented.

I assume this filters all the routes that are imported (one common filter for all VRFs)? Is this correct?

I tested with the following test case:

If I configure

VRF default:
B>* 10.255.11.0/24 [20/0] is directly connected, myVRF (vrf myVRF), weight 1, 00:00:17
B>* 10.255.12.0/24 [20/0] is directly connected, myVRF (vrf myVRF), weight 1, 00:00:17
B>* 10.255.13.0/24 [20/0] is directly connected, myVRF (vrf myVRF), weight 1, 00:00:17

VRF myVRF:
C>* 10.255.11.0/24 is directly connected, br1.1001, weight 1, 22:34:23
K * 10.255.11.0/24 [0/0] is directly connected, br1.1001, weight 1, 23:07:26
C>* 10.255.12.0/24 is directly connected, br1.1002, weight 1, 22:34:23
K * 10.255.12.0/24 [0/0] is directly connected, br1.1002, weight 1, 23:07:13
C>* 10.255.13.0/24 is directly connected, br1.1003, weight 1, 22:34:23
K * 10.255.13.0/24 [0/0] is directly connected, br1.1003, weight 1, 23:07:13

Now configure additionally:

ip prefix-list TEST_PREFIXES_TO_LEAK seq 10 permit 10.255.11.0/24

route-map TestMap1 permit 10
 match ip address prefix-list TEST_PREFIXES_TO_LEAK
exit

router bgp AS
 address-family ipv4 unicast
  import vrf route-map TestMap1
  import vrf myVRF
 exit-address-family

You will now see:

VRF default:
B>* 10.255.11.0/24 [20/0] is directly connected, myVRF (vrf myVRF), weight 1, 00:00:17

VRF myVRF:
C>* 10.255.11.0/24 is directly connected, br1.1001, weight 1, 22:34:23
K * 10.255.11.0/24 [0/0] is directly connected, br1.1001, weight 1, 23:07:26
C>* 10.255.12.0/24 is directly connected, br1.1002, weight 1, 22:34:23
K * 10.255.12.0/24 [0/0] is directly connected, br1.1002, weight 1, 23:07:13
C>* 10.255.13.0/24 is directly connected, br1.1003, weight 1, 22:34:23
K * 10.255.13.0/24 [0/0] is directly connected, br1.1003, weight 1, 23:07:13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions