R3303-HP HSR6800 Routers Layer 3 - IP Routing Command Reference

512
Examples
# Configure node 10 of routing policy policy2 to permit routes whose destination address matches IP
prefix list p1.
<Sysname> system-view
[Sysname] route-policy policy2 permit node 10
[Sysname-route-policy] if-match ip-prefix p1
ip ip-prefix
Use ip ip-prefix to configure an IPv4 prefix list or an item for the list.
Use undo ip ip-prefix to remove an IPv4 prefix list or an item of it.
Syntax
ip ip-prefix ip-prefix-name [ index index-number ] { deny | permit } ip-address mask-length
[ greater-equal min-mask-length ] [ less-equal max-mask-length ]
undo ip ip-prefix ip-prefix-name [ index index-number ]
Default
No IPv4 prefix list is configured.
Views
System view
Default command level
2: System level
Parameters
ip-prefix-name: Specifies a name for the IPv4 prefix list, a string of 1 to 19 characters.
index-number: Specifies a number for the item, in the range of 1 to 65535, for uniquely specifying an
item of the IPv4 prefix list. An index with a smaller number is matched first.
deny: Specifies the deny mode. If a route matches the item, the route is denied without matching against
the next item; if not, the route matches against the next item (suppose the IPv4 prefix list has multiple
items).
permit: Specifies the permit mode. If a route matches the item, it passes the IPv4 prefix list. If not, it
matches against the next item (suppose the IPv4 prefix list has multiple items).
ip-address mask-length: Specifies an IPv4 prefix and mask length. The mask-length is in the range of 0 to
32.
min-mask-length, max-mask-length: Specifies the prefix range. greater-equal means "greater than or
equal to" and less-equal means "less than or equal to." The range relation is mask-length <=
min-mask-length <= max-mask-length <= 32. If only the min-mask-length is specified, the prefix length
range is [ min-mask-length, 32 ]. If only the max-mask-length is specified, the prefix length range is
[ mask-length, max-mask-length ]. If both min-mask-length and max-mask-length are specified, the prefix
length range is [ min-mask-length, max-mask-length ].