Configure Inter-VRF Redistribution Policies

Configure redistribution entries to allow a protocol to announce routes of a certain source type, for example, static, RIP, or direct.

Before you begin

  • Ensure the routing protocols are globally enabled.

  • You must configure the route policy, if required.

  • Ensure the VRFs exist.

  • You must create the route policy and prefix list under the source VRF context.

Note

Note

The route policies treat permit and deny rules differently for inbound and outbound traffic.
  • For an in-policy (RIP, BGP) or an accept policy (OSPF) using a route-map, if a particular route is not explicitly denied in the accept policy or in-policy with the route-map, then the route is implicitly allowed.

  • For an out-policy (RIP, BGP) or a redistribute policy (RIP, OSPF, BGP) using a route-map, even if a particular route is not explicitly allowed in the redistribution policy or out-policy with the route-map, then the route is implicitly denied.

  • In order to permit or deny only explicit routes, configure a policy with additional sequences, where, the last sequence permits all routes that are not explicitly permitted or denied.

Procedure

  1. Enter VRF Router Configuration mode for a specific VRF context:

    enable

    configure terminal

    router vrf WORD<1-16>

  2. Create the redistribution instance:

    ip <bgp|ospf|rip> redistribute <bgp|direct|ipv6-direct|ipv6-isis|ipv6-static|isis|ospf|ospfv3|rip|static|dvr>

  3. Apply a route policy if required:

    ip <bgp|ospf|rip> redistribute <bgp|direct|ipv6-direct|ipv6-isis|ipv6-static|isis|ospf|ospfv3|rip|static|dvr> route-map <WORD 0-64> [vrf-src <WORD 1-16>]

  4. Use the following variable definitions table to configure other parameters as required.
  5. Enable the redistribution:

    ip <bgp|ospf|rip> redistribute <bgp|direct|ipv6-direct|ipv6-isis|ipv6-static|isis|ospf|ospfv3|rip|static|dvr> enable [vrf-src <WORD 1-16>]

  6. Ensure that the configuration is correct:

    show ip <bgp|ospf|rip> redistribute [vrf WORD<1-16>] [vrfids WORD<0-512>]

    For RIPng, use show ipv6 rip redistribute.

  7. Apply the redistribution:

    ip <bgp|ospf|rip> apply redistribute <bgp|direct|ipv6-direct|ipv6-isis|ipv6-static|isis|ospf|ospfv3|rip|static|dvr> [vrf WORD<1-16>] [vrf-src WORD<1-16>]

Example

Switch:1>enable
Switch:1#config terminal

Log on to the VRF Router Configuration mode:

Switch:1(config)#router vrf test

Create the redistribution instance:

Switch:1(router-vrf)#ip rip redistribute ospf

Enable the redistribution

Switch:1(router-vrf)#ip rip redistribute ospf enable

Ensure that the configuration is correct:

Switch:1(router-vrf)#show ip rip redistribute

Exit to Global Configuration mode:

Switch:1(router-vrf)#exit

Apply the redistribution:

Switch:1(config)#ip rip apply redistribute ospf

Variable definitions

Use the data in the following table to use the redistribution commands.

Variable

Value

<bgp|direct|isis|ospf|rip|static|dvr>

Specifies the type of routes to redistribute—the protocol source.

vrf WORD<1-16>

Specifies the VRF instance.

vrfids WORD<0-512>

Specifies a list of VRF IDs.

vrf-src WORD<1-16>

Specifies the source VRF instance. This parameter is not required for redistribution within the same VRF.

Use the data in the following table to use the ip <bgp|ospf|rip> redistribute <bgp|direct|isis|ospf|rip|static|dvr> command.

Variable

Value

apply [vrf-src WORD<1–16>]

Applies the redistribution configuration.

enable [vrf-src WORD<1–16>]

Enables the OSPF route redistribution instance.

metric <metric-value> [vrf-src WORD<1–16>]

Configures the metric to apply to redistributed routes.

metric-type <type1|type2> [vrf-src WORD<1–16>]

Specifies a type 1 or a type 2 metric. For metric type 1, the cost of the external routes is equal to the sum of all internal costs and the external cost. For metric type 2, the cost of the external routes is equal to the external cost alone.

route-map <WORD 0-64> [vrf-src WORD<1–16>]

Configures the route policy to apply to redistributed routes.

subnets <allow|suppress> [vrf-src WORD<1–16>]

Allows or suppresses external subnet route advertisements when routes are redistributed into an OSPF domain.