H3C S5500-SI Series Ethernet Switches Command Manual-Release 1205-(V1.03)

HomeSupportSwitchesH3C S5500 Switch SeriesReference GuidesCommand ReferencesH3C S5500-SI Series Ethernet Switches Command Manual-Release 1205-(V1.03)
13-IPv6 Routing Command
Title Size Download
13-IPv6 Routing Command 176 KB

Chapter 1  IPv6 Static Routing Configuration Commands

 

&  Note:

Throughout this chapter, the term “router” refers to a router in a general sense or a Layer 3 switch running routing protocols.

 

1.1  IPv6 Static Routing Configuration Commands

1.1.1  delete ipv6 static-routes all

Syntax

delete ipv6 static-routes all

View

System view

Parameter

None

Description

Use the delete ipv6 static-routes all command to delete all static routes including the default route.

When using this command, you will be prompted whether to continue the deletion and only after you have confirmed the deletion will the static routes be deleted.

Related command: display ipv6 routing-table, ipv6 route-static.

Example

# Delete all IPv6 static routes.

<Sysname> system-view

[Sysname] delete ipv6 static-routes all

This will erase all ipv6 static routes and their configurations, you must reconfigure all static routes

Are you sure?[Y/N]Y

1.1.2  ipv6 route-static

Syntax

ipv6 route-static ipv6-address prefix-length [ interface-type interface-number ] nexthop-address [ preference preference-value ]

undo ipv6 route-static ipv6-address prefix-length [ interface-type interface-number ] [ nexthop-address ] [ preference preference-value ]

View

System view

Parameter

ipv6-address prefix-length: IPv6 address and prefix length.

interface-type interface-number: The interface type and interface number of the output interface.

nexthop-address: Next hop IPv6 address.

preference-value: Route preference value, in the range of 1 to 255. Defaults to 60.

Description

Use the ipv6 route-static command to configure an IPv6 static route.

Use the undo ipv6 route-static command to remove an IPv6 static route.

An IPv6 static route that has the destination address configured as “::/0” (a prefix length of 0) is the default IPv6 route. If the destination address of an IPv6 packet does not match any entries in the routing table, this default route will be used to forward the packet.

Related command: display ipv6 routing-table, delete ipv6 static-routes all.

Example

# Configure a static IPv6 route, with the destination address being 1:1:2::/24 and next hop being 1:1:3::1.

<Sysname> system-view

[Sysname] ipv6 route-static 1:1:2:: 24 1:1:3::1

 


Chapter 2  IPv6-RIPng Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or a Layer 3 switch.

 

2.1  RIPng Configuration Commands

2.1.1  checkzero

Syntax

checkzero

undo checkzero

View

RIPng view

Parameter

None

Description

Use the checkzero command to enable the zero field check on RIPng packets.

Use the undo checkzero command to disable the zero field check.

The zero field check is enabled by default.

Some fields in RIPng packet headers must be zero. These fields are called zero fields.  You can enable the zero field check on RIPng packet headers. If any such field contains a non-zero value, the RIPng packet will be discarded.

Example

# Enable the zero field check on RIPng packet headers.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] checkzero

# Disable the zero field check on RIPng packet headers.

[Sysname-ripng-100] undo checkzero

2.1.2  default cost

Syntax

default cost value

undo default cost

View

RIPng view

Parameter

value: Default metric of redistributed routes, in the range of 0 to 16.

Description

Use the default cost command to specify the default metric of redistributed routes.

Use the undo default cost command to restore the default.

By default, the default metric of redistributed routes is 0.

The specified default metric applies to routes redistributed by the import-route command that has no metric specified.

Related command: import-route.

Example

# Set the default metric of redistributed routes to 2.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] default cost 2

2.1.3  display ripng

Syntax

display ripng [ process-id ]

View

Any view

Parameter

process-id: RIPng process number, in the range of 1 to 65535.

Description

Use the display ripng command to display the running status and configuration information of a RIPng process. If process-id is not specified, information of all RIPng processes will be displayed.

Example

# Display the running status and configuration information of all configured RIPng processes.

<Sysname>display ripng 1

    RIPng process : 1

       Preference : 100

       Checkzero : Enabled

       Default Cost : 1

       Maximum number of balanced paths : 1

       Update time   :   30 sec(s)  Timeout time         :  180 sec(s)

       Suppress time :  120 sec(s)  Garbage-Collect time :  240 sec(s)

       Number of periodic updates sent : 3275

       Number of trigger updates sent : 18

Table 2-1 Description on the fields of the display ripng command

Field

Description

RIPng Process

RIPng process number

Preference

RIPng route priority

Checkzero

Whether zero field check for RIPng packet headers is enabled

Default Cost

Default metric of redistributed routes

Maximum number of balanced paths

Maximum number of load balanced routes

Update time

RIPng updating interval, in seconds

Timeout time

RIPng timeout interval, in seconds

Suppress time

RIPng suppress interval, in seconds

Garbage-Collect time

RIPng garbage collection interval, in seconds

Number of periodic updates sent

Number of periodic updates sent

Number of trigger updates sent

Number of triggered updates sent

 

2.1.4  display ripng database

Syntax

display ripng process-id database

View

Any view

Parameter

process-id: RIPng process number, in the range of 1 to 65535.

Description

Use the display ripng database command to display all active routes in the RIPng advertising database, which are sent in normal RIPng update messages.

Example

# Display the active routes in the database of RIPng process 100.

<Sysname> display ripng 100 database

   2001:7B::2:2A1:5DE/64,

        cost 4, Imported

   1:13::/120,

        cost 4, Imported

   1:32::/120,

        cost 4, Imported

   1:33::/120,

        cost 4, Imported

   100::/32,

       via FE80::200:5EFF:FE04:3302, cost 2

   3FFE:C00:C18:1::/64,

       via FE80::200:5EFF:FE04:B602, cost 2

   3FFE:C00:C18:1::/64,

       via FE80::200:5EFF:FE04:B601, cost 2

   3FFE:C00:C18:2::/64,

       via FE80::200:5EFF:FE04:B602, cost 2

   3FFE:C00:C18:3::/64,

       via FE80::200:5EFF:FE04:B601, cost 2

   4000:1::/64,

       via FE80::200:5EFF:FE04:3302, cost 2

   4000:2::/64,

       via FE80::200:5EFF:FE04:3302, cost 2 

Table 2-2 Description on fields of the display ripng database command

Field

Description

2001:7B::2:2A1:5DE/64

IPv6 destination address/prefix length

via

Next hop IPv6 address

cost

Route metric value

Imported

Routes learnt from other routing protocols

 

2.1.5  display ripng interface

Syntax

display ripng process-id interface [ interface-type interface-number ]

View

Any view

Parameter

process-id: RIPng process number, in the range of 1 to 65535.

interface-type interface-number: Specified an interface.

Description

Use the display ripng interface command to display RIPng interface information.

Example

# Display the interface information of RIPng process 1.

<Sysname> display ripng 1 interface

Interface-name: Vlan-interface1

         Link Local Address: FE80::200:5EFF:FE19:3E00

         Split-horizon: on            Poison-reverse: off

         MetricIn: 0                      MetricOut: 1

         Default route: off

Table 2-3 Description on the fields of the display ripng interface command

Field

Description

Interface-name

Name of an interface running RIPng.

Link Local Address

Link-local address of an interface running RIPng

Split-horizon

Indicates whether the split horizon function is enabled (on: Enabled    off: Disabled).

Poison-reverse

Indicates whether the poison reverse function is enabled (on: Enabled   off: Disabled).

MetricIn/MetricOut

Additional metric to incoming and outgoing routes

Default route

l      Only/Originate: Only means that the interface advertises only default route. Originate means that the default route and other RIPng routes are advertised.

l      Off, indicates that no default route is advertised or the garbage-collect time expires after the default route advertisement was disabled.

l      In garbage-collect status: With default route advertisement disabled, the interface advertises the default route with metric 16 during the garbage-collect time.

 

2.1.6  display ripng route

Syntax

display ripng process-id route

View

Any view

Parameter

process-id: RIPng process number, in the range of 1 to 65535.

Description

Use the display ripng route command to display all RIPng routes and timers associated to each route of a RIPng process.

Example

# Display the routing information of RIPng process 100.

<Sysname> display ripng 100 route

   Route Flags: A - Aging, S - Suppressed, G - Garbage-collect

 ----------------------------------------------------------------

 

 Peer FE80::20F:E2FF:FE00:220A  on Vlan-interface100

 Dest 4:3::/64,

     via FE80::20F:E2FF:FE00:220A, cost  1, tag 0, A, 34 Sec

Table 2-4 Description on the fields of the display ripng route command

Field

Description

Peer

Neighbor connected to the interface

Dest

IPv6 destination address

via

Next hop IPv6 address

cost

Routing metric value

tag

Route tag

Sec

Time that a route entry stays in a particular state

“A”

The route is in the aging state

“S”

The route is in the suppressed state

“G”

The route is in the Garbage-collect state

 

2.1.7  filter-policy export

Syntax

filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } export [ protocol [ process-id ] ]

undo filter-policy export [ protocol [ process-id ] ]

View

RIPng view

Parameter

acl6-number: Specifies the number of an ACL to filter advertised routing information, in the range of 2000 to 3999.

ipv6-prefix ipv6-prefix-name: Specifies the name of an IPv6 prefix list to filter routing information, a string of 1 to 19 characters.

protocol: Routing protocol from which to filter routes redistributed, currently including direct, ripng, and static

process-id: Process number of the specified routing protocol, in the range of 1 to 65535. This argument is specified only when the routing protocol is ripng.

Description

Use the filter-policy export command to define an outbound route filtering policy. Only routes passing the filter can be advertised in the update messages.

Use the undo filter-policy export command to restore the default.

By default, RIPng does not filter any outbound routing information.

With the protocol argument specified, only routing information redistributed from the specified routing protocol will be filtered. Otherwise, all routing information will be filtered.

Example

# Use IPv6 prefix list Filter 2 to filter advertised RIPng updates.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] filter-policy ipv6-prefix Filter2 export

2.1.8  filter-policy import

Syntax

filter-policy { acl6-number | ipv6-prefix ipv6-prefix-name } import

undo filter-policy import

View

RIPng view

Parameter

acl6-number: Specifies the number of an ACL to filter received routing information, in the range of 2000 to 3999.

ipv6-prefix ipv6-prefix-name: Specifies the name of an IPv6 Prefix list to filter incoming routes, in the range 1 to 19 characters.

Description

Use the filter-policy import command to filter incoming routing information. Only routes which match the filtering policy can be received.

Use the undo filter-policy import command to disable incoming route filtering.

By default, RIPng does not filter incoming routing information.

Example

# Reference IPv6 prefix list Filter1 to filter received RIPng updates.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] filter-policy ipv6-prefix Filter1 import

2.1.9  import-route

Syntax

import-route protocol [ cost cost-value | route-policy route-policy-name ] *

undo import-route protocol

View

RIPng view

Parameter

protocol: Specifies a routing protocol from which to redistribute routes, currently including direct and static.

cost-value: Routing metric of redistributed routes, in the range of 0 to 16. If cost value is not specified, the metric is the default metric specified by the default cost command.

route-policy route-policy-name: Specifies a routing policy by its name with 1 to 19 characters.

Description

Use the import-route command to redistribute routes from another routing protocol.

Use the undo import-route command to disable redistributing routes from another routing protocol.

By default, RIPng does not redistribute routes from other routing protocols.

l           You can configure a routing policy to redistribute only needed routes.

l           You can specify a cost for redistributed routes using keyword cost.

Related command: default cost.

Example

# Redistribute static and specify the metric as 7.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] import-route static cost 7

2.1.10  preference

Syntax

preference [ route-policy route-policy-name ] value

undo preference [ route-policy ]

View

RIPng view

Parameter

route-policy-name: Name of a routing policy, in the range of 1 to 19 characters.

value: RIPng route priority, in the range of 1 to 255.

Description

Use the preference command to specify the RIPng route priority.

Use the undo preference route-policy command to restore the default.

By default, the priority of a RIPng route is 100.

Using the route-policy keyword can set a priority for routes filtered in by the routing policy:

l           If a priority is set in the routing policy, the priority applies to matched routes, and the priority set by the preference command applies to routes not matched.

l           If no priority is set in the routing policy, the one set by the preference command applies to all routes.

Example

# Set the RIPng route priority to 120.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] preference 120

# Restore the default RIPng route priority.

[Sysname-ripng-100] undo preference

2.1.11  ripng

Syntax

ripng [ process-id ]

undo ripng [ process-id ]

View

System view

Parameter

process-id: RIPng process number, in the range of 1 to 65535. The default value is 1.

Description

Use the ripng command to create a RIPng process and enter RIPng view.

Use the undo ripng command to disable a RIPng process.

By default, no RIPng process is enabled.

Example

# Create RIPng process 100 and enter its view.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100]

# Disable RIPng process 100.

[Sysname] undo ripng 100

2.1.12  ripng default-route

Syntax

ripng default-route { only | originate } [ cost value ]

undo ripng default-route

View

Interface view

Parameter

only: Indicates that only the IPv6 default route (::/0) is advertised via the interface.

originate: Indicates that the IPv6 default route (::/0) is advertised without suppressing other routes.

value: Metric of the advertised default route, in the range of 1 to 15, with a default value of 1.

Description

Use the ripng default-route command to advertise a default route with the specified routing metric to a RIPng neighbor.

Use the undo ripng default-route command to stop advertising and forwarding the default route.

By default, a RIP process does not advertise any default route.

After you execute this command, the generated RIPng default route is advertised in a route update over the specified interface. This IPv6 default route is advertised without considering whether it already exists in local IPv6 routing table.

Example

# Advertise only the default route via Vlan-interface100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ripng default-route only

# Advertise the default route together with other routes via Vlan-interface101.

<Sysname> system-view

[Sysname] interface vlan-interface 101

[Sysname-Vlan-interface101] ripng default-route originate

2.1.13  ripng enable

Syntax

ripng process-id enable

undo ripng

View

Interface view

Parameter

process-id: RIPng process number, in the range of 1 to 65535.

Description

Use the ripng enable command to enable RIPng on the specified interface.

Use the undo ripng command to disable RIPng on the specified interface.

By default, RIPng is disabled on an interface.

Example

# Enable RIPng100 on Vlan-interface100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ripng 100 enable

2.1.14  ripng metricin

Syntax

ripng metricin value

undo ripng metricin

View

Interface view

Parameter

value: Additional metric to received routes, in the range of 0 to 16.

Description

Use the ripng metricin command to specify an additional metric for received RIPng routes.

Use the undo ripng metricin command to restore the default.

By default, the additional metric to received routes is 0.

Related command: ripng metricout.

Example

# Specify the additional routing metric as 12 for RIPng routes received by Vlan-interface100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ripng metricin 12

2.1.15  ripng metricout

Syntax

ripng metricout value

undo ripng metricout

View

Interface view

Parameter

value: Additional metric to advertised routes, in the range of 1 to 16.

Description

Use the ripng metricout command to configure an additional metric for RIPng routes advertised by an interface.

Use the undo rip metricout command to restore the default.

The default additional routing metric is 1.

Related command: ripng metricin.

Example

# Set the additional metric to 12 for routes advertised by Vlan-interface100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ripng metricout 12

2.1.16  ripng poison-reverse

Syntax

ripng poison-reverse

undo ripng poison-reverse

View

Interface view

Parameter

None

Description

Use the rip poison-reverse command to enable the poison reverse function.

Use the undo rip poison-reverse command to disable the poison reverse function.

By default, the poison reverse function is disabled.

Example

#Enable the poison reverse function for RIPng update messages on Vlan-interface100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ripng poison-reverse

2.1.17  ripng split-horizon

Syntax

ripng split-horizon

undo ripng split-horizon

View

Interface view

Parameter

None

Description

Use the rip split-horizon command to enable the split horizon function.

Use the undo rip split-horizon command to disable the split horizon function.

By default, the split horizon function is enabled.

Note that:

l           The split horizon function is necessary for preventing routing loops. Therefore, you are not recommended to disable it.

l           In special cases, make sure that it is necessary to disable the split horizon function before doing so.

 

&  Note

Only the poison reverse function takes effect if both the poison reverse and split horizon functions are enabled.

 

Example

# Enable the split horizon function on Van-interface100.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ripng split-horizon

2.1.18  ripng summary-address

Syntax

ripng summary-address ipv6-address prefix-length

undo ripng summary-address ipv6-address prefix-length

View

Interface view

Parameter

ipv6-address: IPv6 network address of the summary route.

prefix-length: IPv6 prefix length, in the range of 0 to 128. It indicates the number of consecutive bits of the prefix, which defines the network.

Description

Use the ripng summary-address command to configure a summary route advertised on the interface.

Use the undo ripng summary-address command to remove the summary route.

If the prefix and the prefix length of a route match the IPv6 prefix, the IPv6 prefix will be advertised instead. Thus, one route can be advertised on behalf of many routes. After summarization, the summary route cost is the lowest cost of those summarized routes.

Example

# Assign an IPv6 address with a 64-bit prefix length to Vlan-interface100 and configure a summary route with a 35-bit prefix length.

<Sysname> system-view

[Sysname] interface vlan-interface 100

[Sysname-Vlan-interface100] ipv6 address 2001:200::3EFF:FE11:6770/64

[Sysname-Vlan-interface100] ripng summary-address 2001:200:: 35

2.1.19  timers

Syntax

timers { garbage-collect garbage-collect-value | suppress suppress-value | timeout timeout-value | update update-value }*

undo timers { garbage-collect | suppress | timeout | update }*

View

RIPng view

Parameter

garbage-collect-value: Interval of the garbage-collect timer in seconds, in the range of 1 to 86400.

suppress-value: Interval of the suppress timer in seconds, in the range of 0 to 86400.

timeout-value: Interval  of the timeout timer in seconds, in the range of 1 to 86400.

update-value: Interval  of the update timer in seconds, in the range of 1 to 86400.

Description

Use the timers command to configure RIPng timers.

Use the undo timers command to restore the default.

By default, the interval of the garbage-collect timer is 240 seconds, that of the suppress timer 120 seconds, that of the timeout timer 180 seconds, and that of the update timer 30 seconds.

RIPng is controlled by the above four timers.

l           The update timer defines the interval between update messages.

l           The timeout timer defines the route aging time. If no update message related to a route is received within the aging time, the metric of the route is set to 16 in the routing table.

l           The suppress timer defines how long a RIPng route stays in the suppressed state. When the metric of a route is 16, the route enters the suppressed state. In the suppressed state, only routes which come from the same neighbor and whose metric is less than 16 will be received by the router to replace unreachable routes.

l           The garbage-collect timer defines the interval from when the metric of a route becomes 16 to when it is deleted from the routing table. During the garbage-collect timer length, RIPng advertises the route with the routing metric set to 16. If no update message is announced for that route before the garbage-collect timer expires, the route will completely be deleted from the routing table.

Note that:

l           You are not recommended to change the default values of these timers under normal circumstances.

l           The lengths of these timers must be kept consistent on all routers and access servers in the network

Example

# Configure the update, timeout, suppress, and garbage-collect timers as 5s, 15s, 15s and 30s.

<Sysname> system-view

[Sysname] ripng 100

[Sysname-ripng-100] timers update 5

[Sysname-ripng-100] timers timeout 15

[Sysname-ripng-100] timers suppress 15

[Sysname-ripng-100] timers garbage-collect 30

 


Chapter 3  Routing Policy Configuration Commands

3.1  Public Routing Policy Configuration Commands

3.1.1  apply cost

Syntax

apply cost [ + | - ] value

undo apply cost

View

Routing policy view

Parameter

+: Increases cost value.

+: Decreases cost value.

cost: Specifies a cost for routing information, ranging from 0 to 4294967295.

Description

Use the apply cost command to set the cost for routing information.

Use the undo apply cost command to remove the clause configuration.

No cost is set for routing information by default.

Related command: if-match interface, if-match ipv6, if-match cost, if-match tag, route-policy, apply ipv6 next-hop and apply tag.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. If a route matches the outbound interface Vlan-interface1, set the cost for the route to 120.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match interface Vlan-interface 1

[Sysname-route-policy] apply cost 120

3.1.2  apply ipv6 next-hop

Syntax

apply ipv6 next-hop ipv6-address

undo apply ipv6 next-hop

View

Routing policy view

Parameter

ipv6-address: Next hop IPv6 address.

Description

Use the apply ipv6 next-hop command to set the next hop for IPv6 routing information to the specified address.

Use the undo apply ipv6 next-hop command to remove the clause configuration.

No next hop address is set for IPv6 routing information by default.

You cannot use the apply ipv6 next-hop command to set next hop address for redistributed routes.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. set the next hop address to 3ff3:506::1.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] apply ipv6 next-hop 3ffe:506::1

3.1.3  apply preference

Syntax

apply preference preference

undo apply preference

View

Routing policy view

Parameter

preference: Routing preference, in the range of 1 to 255.

Description

Use the apply preference command to set preference for routing protocol.

Use the undo apply preference command to remove the clause configuration.

No preference is set for routing protocol by default.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. set the preference for the routing protocol to 90.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] apply preference 90

3.1.4  apply tag

Syntax

apply tag value

undo apply tag

View

Routing policy view

Parameter

value: Set the tag value for routing information, ranging from 0 to 4294967295.

Description

Use the apply tag command to set specified tag value for routing information.

Use the undo apply tag command to remove the clause configuration.

No routing tag is set for routing information by default.

Related command: if-match interface,if-match ipv6,if-match cost,if-match tag,route-policy,apply ipv6 next-hop and apply cost.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. Set the tag of the route to 100.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] apply tag 100

3.1.5  display ip ipv6-prefix

Syntax

display ip ipv6-prefix [ ipv6-prefix-name ]

View

Any view

Parameter

ipv6-prefix-name: IPv6 prefix list name, a string of 1 to 19 characters.

Description

Use the display ip ipv6-prefix command to display the statistics of the specified IPv6 prefix list. If no IPv6 prefix list name is specified, the statistics of all the IPv6 prefix lists will be displayed.

Example

# Display the statistics of all the IPv6 address prefix lists.

<Sysname> display ip ipv6-prefix

Prefix-list6 abc

Permitted 0

Denied 0

         index:   10            permit  ::/0

         index:   20             permit  ::/1                 ge  1   le  128

Table 3-1  Description on the fields of the display ip ipv6-prefix command

Field

Description

Prefix-list6

Name of IPv6 prefix list

Permitted

Number of routes satisfying the matching condition

Denied

Number of routes not satisfying the matching condition

index

Internal serial number of address prefix list

permit

Matching mode: permit, deny

ge

greater-equal, the minimum length of matched IPv6 prefix

le

less-equal, the maximum length of matched IPv6 prefix

 

3.1.6  display route-policy

Syntax

display route-policy [ route-policy-name ]

View

Any view

Parameter

route-policy-name: Routing policy name, a sting of 1 to 19 characters.

Description

Use the display route-policy command to display routing policy information.

All routing policy information will be displayed if no route-policy-name is specified.

Related command: route-policy.

Example

# Display information of routing policy test.

<Sysname>display route-policy test

Route-policy : test

  permit : 10

        if-match ipv6-prefix abc

        apply cost 120

Table 3-2 Description on the fields of the display route-policy command.

Field

Description

Route-policy

Routing policy name

Permit

permit mode: permit, deny

if-match ip-prefix abc

Matching condition

apply cost 120

If the matching condition is satisfied, set the route cost to 120.

 

3.1.7  if-match cost

Syntax

if-match cost value

undo if-match cost

View

Routing policy view

Parameter

cost: Specifies the cost to match, ranging from 0 to 4294967295.

Description

Use the if-match cost command to match routes with a specified cost.

Use the undo if-match cost command to remove the matching condition.

No routing information cost is matched by default.

This command is one of the if-match clauses of route policy, used for matching routes with the specified route cost.

Related command: if-match interface,if-match ipv6,if-match tag,route-policy,apply ipv6 next-hop,apply cost and apply tag.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. Define an if-match clause to let pass the routing information with the cost as 8.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match cost 8

3.1.8  if-match interface

Syntax

if-match interface { interface-type interface-number }&<1-16>

undo if-match interface [ interface-type interface-number ]&<1-16>

View

Routing policy view

Parameter

interface-type: Interface type

interface-number: Interface number

&<1-16>: Indicates the argument before it can be entered up to 16 times.

Description

Use the if-match interface command to match outbound interfaces of routing information to specified interfaces.

Use the undo if-match interface command to remove the matching condition.

No behavior of this kind is available by default.

Related command: if-match ipv6,if-match cost,if-match tag,route-policy,apply ipv6 next-hop,apply cost and apply tag.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. Define an if-match clause to let pass the routing information with the outbound interface as Vlan-interface 1.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match interface vlan-interface 1

3.1.9  if-match ipv6

Syntax

if-match ipv6 { address | next-hop | route-source } { acl acl6-number | prefix-list ipv6-prefix-name }

undo if-match ipv6 { address | next-hop | route-source } [ acl | prefix-list ]

View

Routing policy view

Parameter

address: Matches the destination address of IPv6 routing information.

next-hop: Matches the next hop of IPv6 routing information.

route-source: Matches the source address of IPv6 routing information.

acl acl6-number: Specifies the number of an IPv6 ACL for filtering, in the range 2000 to 3999 for address, and 2000 to 2999 for next-hop and route-source.

prefix-list ipv6-prefix-name: Specifies the name of a IPv6 prefix list for filtering, a string of 1 to 19 characters.

Description

Use the if-match ipv6 command to match IPv6 routing information (destination, next hop or source address).

Use the undo if-match ipv6 command to remove the matching condition.

The matching condition is not configured by default.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. Define an if-match clause to let pass the routing information whose next hop address matches IPv6 prefix list p1.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match ipv6 next-hop prefix-list p1

3.1.10  if-match tag

Syntax

if-match tag value

undo if-match tag

View

Routing policy view

Parameter

value: Specifies a tag value, ranging from 0 to 4294967295.

Description

Use the if-match tag command to match the tag field of the route with the specified tag.

Use the undo if-match tag command to remove the matching condition.

The matching condition is not available by default.

Related command: if-match interface,if-match ipv6,if-match cost,route-policy,apply ipv6 next-hop,apply cost and apply tag.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. Define an if-match clause to let pass the routing information with the tag as 8.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match tag 8

3.1.11  ip ipv6-prefix

Syntax

ip ipv6-prefix ipv6-prefix-name [ index index-number ] { deny | permit } ipv6-address prefix-length [ greater-equal min-prefix-length ] [ less-equal max-prefix-length ]

undo ip ipv6-prefix ipv6-prefix-name [ index index-number ]

View

System view

Parameter

ipv6-prefix-name: IPv6 prefix list name, a string of 1 to 19 characters, for uniquely specifying an IPv6 prefix list.

index-number: Index number, in the range 1 to 65535, for uniquely specifying an IPv6 prefix list item. The item with smaller index-number will be tested first.

permit: Specifies the matching mode for the IPv6 prefix list as permit, that is, when a route to be filtered is in the range of the IPv6 prefix list, the route passes the IPv6 prefix list without needing to enter the next item for testing. If the route to be filtered is not in the prefix range, it will enter the next item test.

deny: Specifies the matching mode for the IPv6 prefix list as deny, that is, when a route to be filtered is in the IPv6 prefix list range, the route neither passes the filter nor enters the next node for testing. If not in the range, the route will enter the next item test.

ipv6-address prefix-length: Specifies an IPv6 prefix and prefix length, with prefix-length in the range 0 to 128. When specified as :: 0, it matches the default route.

min-prefix-length, max-prefix-length: Specifies the range of IPv6 prefix if IPv6 address and prefix length are matched. 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 min-prefix-length is specified, the prefix length range is [ min-prefix-length, 128 ]. If only max-prefix-length is specified, the prefix length range is [ prefix-length, max-prefix-length ]. If both min-prefix-length and max-prefix-length are specified, the prefix length range is [ min-prefix-length, max-prefix-length ].

Description

Use the ip ipv6-prefix command to configure an IPv6 prefix list item.

Use the undo ip ipv6-prefix command to remove an IPv6 prefix list or an item.

No IPv6 prefix list is configured by default.

The IPv6 address prefix list is used to filter IPv6 addresses. It may have multiple items, each of which specifies a range of IPv6 prefix. The filtering relation among items is logic OR, namely, it requires passing an item to pass the prefix list.

The IPv6 prefix range is determined by prefix-length and [ min-prefix-length, max-prefix-length ]. If both mask-length and [ min-mask-length, max-mask-length ] are specified, then the IPv6 addresses must satisfy both of them.

If ipv6-address prefix-length is specified as :: 0, then only the default routes will be matched.

If you want to match all the routes, configure it as :: 0 less-equal 128.

Example

# Let pass the IPv6 addresses with mask length between 32 bits and 64 bits.

<Sysname> system-view

[Sysname] ip ipv6-prefix abc permit :: 0 greater-equal 32 less-equal 64

# Refuse to let pass the IPv6 addresses with prefix as 3FFE:D00::/32, prefix length greater than or equal to 32 bits.

<Sysname> system-view

[Sysname] ip ipv6-prefix abc deny 3FEE:D00:: 32 less-equal 128

3.1.12  reset ip ipv6-prefix

Syntax

reset ip ipv6-prefix [ ipv6-prefix-name ]

View

User view

Parameter

ipv6-prefix-name: Unique IPv6 prefix list, a string of 1 to 19 characters.

Description

Use the reset ip ipv6-prefix command to clear the statistics of the specified IPv6 prefix list. If no name is specified, the statistics of all IPv6 prefix lists will be cleared.

Example

# Specifies to delete statistics of the specified IPv6 prefix list.

<Sysname> reset ip ipv6-prefix abc

3.1.13  route-policy

Syntax

route-policy route-policy-name { permit | deny } node node-number

undo route-policy route-policy-name [ node node-number ]

View

System view

Parameter

route-policy-name: Route-policy name, a string of 1 to 19 characters for uniquely identifying a route-policy.

permit: Specifies the matching mode of the route policy node as permit. If a route satisfies all the if-match clauses, it is allowed to pass the filtering of the node and then executed with the apply clauses of the node. If a route fails to satisfy the if-match clauses of the node, it is matched by the next node of the route-policy.

deny: Specifies the matching mode of  the route-policy node as deny. If a route satisfies all the if-match clauses, it is denied to pass the filtering of the node and is not matched to the next node.

node node-number: Routing policy node, in the range 0 to 65535. The node with a smaller node-number will be tested first when the routing policy is used for filtering routing information.

Description

Use the route-policy command to create a routing policy and enter its view.

Use the undo route-policy command to remove a routing policy.

No routing policy is created by default.

A route-policy is used for routing information filtering or policy routing. It contains several nodes and a node comprises some if-match and apply clauses. The if-match clauses define the matching rules of the node and the apply clauses define the actions performed after a packet passes the filtering of the node. The relation among the if-match clauses of a node is logic AND, namely all the if-match clauses must be satisfied. The filter relation among different route-policy nodes is logic OR, namely it requires passing any one node to pass the route-policy.

Related command: if-match interface,if-match ipv6,if-match cost,if-match tag,apply ipv6 next-hop,apply cost,and apply tag.

Example

# Configure routing policy 1 with node as 10 and matching mode as permit, and then enter routing policy view.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy]

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网