Pre-configuration Tasks
None.
Data Preparation
To configure an IP prefix list, you need the following data.
No. Data
1 Name of IP prefix list
2 Matched address range
10.3.2 Configuring an IPv4 Prefix List
An IP prefix list filters routes according to IP address prefixes. An IP address prefix is defined
by the IP address and mask length.
Context
Do as follows on the switch to which the IP prefix list is applied:
Procedure
Step 1 Run:
system-view
The system view is displayed.
Step 2 Run:
ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } ip-address
mask-length [ greater-equal greater-equal-value ] [ less-equal less-equal-value ]
An IPv4 prefix list is configured.
The range of the mask length can be specified as mask-length <= greater-equal-value <= less-
equal-value <= 32. If only greater-equal is specified, the range of the prefix is [greater-equal-
value, 32]; if only less-equal is specified, the range of the prefix is [mask-length, less-equal-
value].
An IPv4 prefix list is identified by its list name. Each prefix list contains multiple entries. Each
entry can independently specify the matching range in the form of the network prefix and identify
it with an index number. For example, the following shows an IPv4 prefix list named abcd:
#
ip ip-prefix abcd index 10 permit 1.0.0.0 8
ip ip-prefix abcd index 20 permit 2.0.0.0 8
During the matching, the system checks the entries identified by the index numbers in an
ascending order. When a route matches an entry, it does not match other entries.
In the S6700, all unmatched routes cannot pass the filtering list. If all entries are in deny mode,
all routes are filtered. It is recommended that you define a permit 0.0.0.0 0 less-equal 32 entry
after multiple entries in deny mode, thus allowing all the other IPv4 routes to pass the IP prefix
list.
S6700 Series Ethernet Switches
Configuration Guide - IP Routing 10 Routing Policy Configuration
Issue 01 (2012-03-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
595