cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1887
Views
5
Helpful
2
Replies

Routing Policy Options for RIP

I was reading the documentation in ASR9010, and we can redistribute bgp into rip, with a route-policy applied where we match communities, right?

http://www.cisco.com/en/US/docs/routers/asr9000/software/routing/configuration/guide/rcasr9krip.html#wp1009407

Routing Policy Options for RIP

Route policies comprise series of statements and expressions that are bracketed with the route-policy and end-policy keywords. Rather than a collection of individual commands (one for each line), the statements within a route policy have context relative to each other. Thus, instead of each line being an individual command, each policy or set is an independent configuration object that can be used, entered, and manipulated as a unit.

Each line of a policy configuration is a logical subunit. At least one new line must follow the then, else, and end-policy keywords. A new line must also follow the closing parenthesis of a parameter list and the name string in a reference to an AS path set, community set, extended community set, or prefix set. At least one new line must precede the definition of a route policy, AS path set, community set, extended community set, or prefix set. One or more new lines can follow an action statement. One or more new lines can follow a comma separator in a named AS path set, community set, extended community set, or prefix set. A new line must appear at the end of a logical unit of policy expression and may not appear anywhere else.

However when I try to apply the route-policy, returns an error.

See the following configuration:

RP/0/RSP0/CPU0:EC-XPTO1#sh run route-policy XXX-bgp-to-rip

Thu Mar 15 14:08:42.861 WET

route-policy XXX-bgp-to-rip

  if destination in default-route then

    pass

  elseif community matches-any (81:81) then

    pass

  endif

end-policy

!

RP/0/RSP0/CPU0:EC-XPTO1(config)#router rip

RP/0/RSP0/CPU0:EC-XPTO1(config-rip)# vrf XXX

RP/0/RSP0/CPU0:EC-XPTO1(config-rip-vrf)#redistribute bgp 34 route-policy XXX-bgp-to-rip

RP/0/RSP0/CPU0:EC-XPTO1(config-rip-vrf)#commit

% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed' from this session to view the errors

RP/0/RSP0/CPU0:EC-XPTO1(config-rip-vrf)#ex

RP/0/RSP0/CPU0:EC-XPTO1(config-rip)#ex   

RP/0/RSP0/CPU0:EC-XPTO1(config)#sh configuration failed

Thu Mar 15 14:10:06.587 WET

!! SEMANTIC ERRORS: This configuration was rejected by

!! the system due to semantic errors. The individual

!! errors with each failed configuration command can be

!! found below.

router rip

vrf XXX

  redistribute bgp 34 route-policy XXX-bgp-to-rip

!!% Could not find entry in list: Policy [ccam-bgp-to-rip] uses the 'community' attribute. There is no 'community' attribute at the rip redistribution attach point.

!

!

End


Can you help please?

Thanks for all.

1 Accepted Solution

Accepted Solutions

JoaoPatrx
Level 1
Level 1

Since your route-policy uses communities, which are invalid to rip, you cannot attach it to router rip.

As a workaround you can match your community routes and tag them using table-policy on router bgp. Then on router rip you can redistribute bgp with the route-policy of your desire. Here's an example, matching bgp routes with community 99:99 and tag them with 1234 then redistribute to rip.

community-set client-to-rip

   99:99

end-set

route-policy client-to-rip

   if community matches-any client-to-rip then

     set tag 1234

   else

     pass

   endif

end-policy

route-policy client-to-rip-bgp

   if tag eq 1234 then

     pass

   else

     drop

   endif

end-policy

router bgp 66666

  vrf client

   rd 66666:2222

   label-allocation-mode per-ce

   address-family ipv4 unicast

    maximum-paths eibgp 2

    table-policy client-to-rip

    redistribute connected

    redistribute static

    redistribute rip

router rip

  vrf client

   interface GigabitEthernet0/2/0/1.8

   !

   timers basic 15 45 45 50

   redistribute bgp 66666 route-policy client-to-rip-bgp

   redistribute static

   redistribute connected

   default-metric 1

  !

View solution in original post

2 Replies 2

JoaoPatrx
Level 1
Level 1

Since your route-policy uses communities, which are invalid to rip, you cannot attach it to router rip.

As a workaround you can match your community routes and tag them using table-policy on router bgp. Then on router rip you can redistribute bgp with the route-policy of your desire. Here's an example, matching bgp routes with community 99:99 and tag them with 1234 then redistribute to rip.

community-set client-to-rip

   99:99

end-set

route-policy client-to-rip

   if community matches-any client-to-rip then

     set tag 1234

   else

     pass

   endif

end-policy

route-policy client-to-rip-bgp

   if tag eq 1234 then

     pass

   else

     drop

   endif

end-policy

router bgp 66666

  vrf client

   rd 66666:2222

   label-allocation-mode per-ce

   address-family ipv4 unicast

    maximum-paths eibgp 2

    table-policy client-to-rip

    redistribute connected

    redistribute static

    redistribute rip

router rip

  vrf client

   interface GigabitEthernet0/2/0/1.8

   !

   timers basic 15 45 45 50

   redistribute bgp 66666 route-policy client-to-rip-bgp

   redistribute static

   redistribute connected

   default-metric 1

  !

Joao,

Thank you for all

Reguards