Configuring RIP to Filter the Received Routes

You can configure an inbound or outbound filtering policy by specifying Access Control Lists (ACLs) and IP address prefix lists to filter routes to be received and advertised. You can also configure a device to receive only the RIP packets from a specified neighbor.

Context

Devices can filter the routing information. To filter the received and advertised routes, you can configure inbound and outbound filtering policies by specifying the ACL and IP prefix list.

You can also configure a device to receive RIP packets from only a specified neighbor.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run rip [ process-id ]

    A RIP process is created, and the RIP view is displayed.

  3. Set the conditions to filter the received routes.

    Run any of the following commands as required:

    • Based on the basic ACL:
      1. Run quit

        Return to the system view.

      2. Run acl { name basic-acl-name { basic | [ basic ] number basic-acl-number } | [ number ] basic-acl-number } [ match-order { config | auto } ]

        The ACL view is displayed.

      3. Run rule [ rule-id ] [ name rule-name ] { deny | permit }

        A rule is configured for the ACL.

        When the rule command is used to configure a filtering rule for a named ACL, only the configurations specified by source and time-range take effect.

        When a filter-policy of a routing protocol is used to filter routes:
        • If the action specified in an ACL rule is permit, a route matching the rule will be accepted or advertised by the system.

        • If the action specified in an ACL rule is deny, a route matching the rule will not be accepted or advertised by the system.

        • If the network segment of a route is not within the range specified in an ACL rule, the route will not be accepted or advertised by the system.

        • If an ACL does not contain any rules, none of the routes matched against the filter-policy that uses this ACL will be accepted or advertised by the system.

        • Routes can be filtered using a blacklist or whitelist:

          If ACL rules are used for matching in configuration order, the system matches the rules in ascending order of their IDs.

          Filtering using a blacklist: Configure a rule with a smaller ID and specify the action deny in this rule to filter out the unwanted routes. Then, configure another rule with a larger ID in the same ACL and specify the action permit in this rule to accept or advertise the other routes.

          Filtering using a whitelist: Configure a rule with a smaller ID and specify the action permit in this rule to permit the routes to be accepted or advertised. Then, configure another rule with a larger ID in the same ACL and specify the action deny in this rule to filter out the unwanted routes.

      4. Run rip [ process-id ]

        A RIP process is created, and the RIP view is displayed.

      5. Run filter-policy { acl-number | acl-name acl-name } import [ interface-type interface-number ]

        An import policy that is based on the basic ACL is configured to filter routes that are received in RIP update packets.

    • Based on the IP prefix list:

      Run filter-policy ip-prefix ip-prefix-name import [ interface-type interface-number ]

      An import policy that is based on the IP prefix list is configured to filter routes that are received in RIP update packets.

  4. Run commit

    The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >