2 Replies Latest reply: Apr 22, 2019 4:29 PM by MiltonVieira RSS

    Route-Policy + community-set

    MiltonVieira

      Hi guys,

       

      I'm testing route-policy with IOS-XRv and writing a RPL where only customers marked with community 100:100 would be advertised to a peer (it's not working).

      In this same route-policy, I've a community 100:888 that if the route comes with this community it is not advertised with no-export parameter (working fine).

      At the end of the RPL if I change from drop to pass, it works and the peer 200.200.200.2 receives with the 3 correct communities. If someone know where I'm failing I will be happy for that.

      !

       

      RP/0/0/CPU0:XRV3-RR#show rpl route-policy TO-NEIGHBOR-IPV4

      Mon Apr 22 04:44:11.078 UTC

      route-policy TO-TIWS-IPV4

        if community matches-any INTERNAL-CUSTOMERS then

          pass

        endif

        if community matches-any COMM-LIST-NO-NEIGHBOR-ONLY-NATIONAL then

          drop

        endif

        drop

      end-policy

      !

      RP/0/0/CPU0:XRV3-RR#

      #

      #

      RP/0/0/CPU0:XRV3-RR#show rpl route-policy TO-NEIGHBOR-IPV4 inline

      Mon Apr 22 04:44:14.478 UTC

       

      route-policy TO-NEIGHBOR-IPV4

        if community matches-any (100:100) then

          pass

        endif

        if community matches-any (100:888) then

          drop

        endif

        drop

      end-policy

      !

      RP/0/0/CPU0:XRV3-RR#

      #

      #

      RP/0/0/CPU0:XRV3-RR#show rpl community-set INTERNAL-CUSTOMERS

      Mon Apr 22 05:22:55.239 UTC

      community-set INTERNAL-CUSTOMERS

        100:100

      end-set

      !

      RP/0/0/CPU0:XRV3-RR#

      #

      #

      RP/0/0/CPU0:XRV3-RR#show bgp 8.8.8.8

      Mon Apr 22 04:44:21.887 UTC

      BGP routing table entry for 8.8.8.0/24

      Versions:

        Process           bRIB/RIB  SendTblVer

        Speaker                152         152

      Last Modified: Apr 18 03:18:46.350 for 4d01h

      Paths: (1 available, best #1)

        Advertised to update-groups (with more than one peer):

          0.2

        Advertised to peers (in unique update groups):

          1.1.1.1        

        Path #1: Received by speaker 0

        Advertised to update-groups (with more than one peer):

          0.2

        Advertised to peers (in unique update groups):

          1.1.1.1        

        15169, (Received from a RR-client)

          17.17.17.17 (metric 40) from 17.17.17.17 (7.7.7.7)

            Origin incomplete, metric 151, localpref 100, valid, internal, best, group-best

            Received Path ID 0, Local Path ID 0, version 152

            Community: 100:100 100:300 15169:15169

      RP/0/0/CPU0:XRV3-RR#

      #

      #

      RP/0/0/CPU0:XRV3-RR#show running-config router bgp 100 neighbor 200.200.200.2

      Mon Apr 22 04:44:44.326 UTC

      router bgp 100

      neighbor 200.200.200.2

        remote-as 555

        bfd fast-detect

        address-family ipv4 unicast

         send-community-ebgp

         route-policy FROM_TIWS_IPV4 in

         route-policy TO-NEIGHBOR-IPV4 out

         send-extended-community-ebgp

      RP/0/0/CPU0:XRV3-RR#

      #

      #

      RP/0/0/CPU0:XRV3-RR#show bgp neighbor 200.200.200.2 advertised-routes

      Mon Apr 22 04:45:14.854 UTC

      RP/0/0/CPU0:XRV3-RR#