06-Layer 3 - IP Routing Command Reference

HomeSupportRoutersH3C SR8800 Router SeriesReference GuidesCommand ReferencesH3C SR8800 Command Reference-Release3347-6W10306-Layer 3 - IP Routing Command Reference
13-IPv6 Policy-Based Routing Commands
Title Size Download
13-IPv6 Policy-Based Routing Commands 82.96 KB

IPv6 policy-based routing configuration commands

apply ipv6-address next-hop

Syntax

apply ipv6-address next-hop ipv6-address

undo apply ipv6-address next-hop [ ipv6-address ]

View

IPv6 PBR policy node view

Default level

2: System level

Parameters

ipv6-address: IPv6 address of a next hop.

Description

Use the apply ipv6-address next-hop command to set a next hop.

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

The next hop must be adjacent to the router.

You can specify up to two next hops. Only one next hop is active at a time. When the active next hop becomes invalid, the other next hop takes effect.

Using the undo apply ipv6-address next-hop command with a next hop specified removes the next hop. Using this command without any next hop specified removes all next hops.

Examples

# Set a next hop of 1::1 for IPv6 packets.

<Sysname> system-view

[Sysname] ipv6 policy-based-route aa permit node 11

[Sysname-pbr6-aa-11] apply ipv6-address next-hop 1::1

apply ipv6-precedence

Syntax

apply ipv6-precedence { type | value }

undo apply ipv6-precedence

View

IPv6 PBR policy node view

Default level

2: System level

Parameters

type: Sets a preference type.

value: Sets a preference value from 0 to 7 (inclusive). Each value corresponds to a keyword, as shown in Table 1.

Table 1 Preferences and the corresponding keywords

Preference value

Keyword

0

routine

1

priority

2

immediate

3

flash

4

flash-override

5

critical

6

internet

7

network

 

Description

Use the apply ipv6-precedence command to set a preference or preference type for IPv6 packets.

Use the undo apply ipv6-precedence command to remove the clause.

Examples

# Set a preference of 5 (critical).

<Sysname> system-view

[Sysname] ipv6 policy-based-route aa permit node 11

[Sysname-pbr6-aa-11] apply ipv6-precedence critical

display ipv6 config policy-based-route

Syntax

display ipv6 config policy-based-route [ policy-name ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

policy-name: Policy name, a string of 1 to 19 characters.

slot slot-number: Displays the IPv6 PBR policy information of a specific board.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display ipv6 config policy-based-route command to display the IPv6 PBR policy information.

If no policy name is specified, all the IPv6 PBR policy information is displayed. If a policy name is specified, information about the specified policy is displayed.

If no slot number is specified, all the IPv6 PBR policy information is displayed, as long as the policies are defined. If a slot number is specified, the IPv6 PBR policy information on the specified board is displayed, as long as the policies are applied to the system or an interface of the specified board.

Examples

# Display all IPv6 PBR policy information.

<Sysname> display ipv6 config policy-based-route

 IPv6 Policy based routing configuration information:

policy-based-route : abc

   Node  6  permit :

     if-match acl6 3001

     apply ipv6-address next-hop

       1::2

Table 2 Output description

Field

Description

IPv6 Policy based routing configuration information

IPv6 policy information.

policy-based-route: abc

Name of the referenced policy.

Node  6  permit :

The matching mode of Node 6 is permit.

if-match acl6 3001

Match IPv6 packets against ACL 3001.

apply ipv6-address next-hop 1::2

Next hop specified for matched packets is 1::2.

 

display ipv6 policy-based-route setup

Syntax

display ipv6 policy-based-route setup { policy-name | interface interface-type interface-number [ slot slot-number ] | local [ slot slot-number ] } [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

policy-name: Policy name, a string of 1 to 19 characters.

interface interface-type interface-number: Displays the IPv6 PBR routing information on the specified interface.

local: Displays the IPv6 local PBR information.

slot slot-number: Displays the IPv6 PBR routing information on a card. slot-number represents the number of the slot that holds the card.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display ipv6 policy-based-route setup command to display the specified IPv6 PBR routing information.

Examples

# Display the IPv6 PBR routing information of policy test.

<Sysname> display ipv6 policy-based-route setup test

 policy Name             interface

 test                    local

# Display the IPv6 PBR routing information on interface GigabitEthernet 3/1/1.

<Sysname> display ipv6 policy-based-route setup interface GigabitEthernet 3/1/1

 Interface GigabitEthernet 3/1/1 policy based routing configuration information:

 policy-based-route: test

   permit node 6:

     if-match acl6 2000

     apply ipv6-address next-hop

       1::1

# Display the IPv6 local PBR information.

<Sysname> display ipv6 policy-based-route setup local

 Local policy based routing configuration information:

 policy-based-route: test

   permit node 6:

     if-match acl6 2000

     apply ipv6-address next-hop

       1::1

Table 3 Output description

Field

Description

policy Name

Policy name.

interface

Interface where the policy is applied. Local means the policy is applied locally.

Interface GigabitEthernet 3/1/1 policy based routing configuration information

IPv6 PBR routing information on interface GigabitEthernet 3/1/1.

Local policy based routing configuration information

IPv6 local PBR information.

policy-based-route

Name of the referenced policy.

permit node 6

The match mode of Node 6 is permit.

if-match acl6 2000

Match IPv6 packets against ACL 2000.

apply ipv6-address next-hop

Permitted IPv6 packets are sent to the specified next hop.

 

display ipv6 policy-based-route statistics

Syntax

display ipv6 policy-based-route statistics { interface interface-type interface-number | local } [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

interface interface-type interface-number: Displays IPv6 PBR statistics on the specified interface.

local: Displays IPv6 local PBR statistics.

slot slot-number: Displays the IPv6 PBR statistics on a card. slot-number represents the number of the slot that holds the card.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display ipv6 policy-based-route statistics command to display IPv6 PBR statistics.

Examples

# Display IPv6 local PBR statistics.

<Sysname> display ipv6 policy-based-route statistics local

 Local policy based routing statistics information:

   ipv6 policy-based-route: test

     permit node 10:

   matched: 50

 Total matched: 50

Table 4 Output description

Field

Description

Local policy based routing information

Local PBR information.

ipv6 policy-based-route

Name of the referenced policy.

permit node

The matching mode of the node is permit.

if-match acl6 2000

Match IPv6 packets against IPv6 basic ACL 2000.

matched

Total number of matching packets on the node.

Total matched

Total number of matching packets on all nodes.

 

if-match acl6

Syntax

if-match acl6 acl6-number

undo if-match acl6

View

IPv6 PBR policy node view

Default level

2: System level

Parameters

acl6-number: IPv6 ACL number, in the range 2000 to 3999. The number of a basic IPv6 ACL ranges from 2000 to 2999 and that of an advanced IPv6 ACL ranges from 3000 to 3999.

Description

Use the if-match acl6 command to define an IPv6 ACL match criterion.

Use the undo if-match acl6 command to remove the IPv6 ACL match criterion.

Examples

# Permit the packets matching ACL 2000.

<Sysname> system-view

[Sysname] ipv6 policy-based-route aa permit node 10

[Sysname-pbr6-aa-10] if-match acl6 2000

ipv6 local policy-based-route

Syntax

ipv6 local policy-based-route policy-name

undo ipv6 local policy-based-route [ policy-name ]

View

System view

Default level

2: System level

Parameters

policy-name: Policy name, a string of 1 to 19 characters.

Description

Use the ipv6 local policy-based-route command to configure IPv6 local PBR based on a policy.

Use the undo ipv6 local policy-based-route command to remove the configuration.

IPv6 local PBR is not configured by default.

Local PBR is used to route packets generated locally. Unless otherwise required, H3C does not recommend configuring local PBR.

Examples

# Configure IPv6 local PBR based on policy AAA.

<Sysname> system-view

[Sysname] ipv6 local policy-based-route AAA

ipv6 policy-based-route (interface view)

Syntax

ipv6 policy-based-route policy-name

undo ipv6 policy-based-route

View

Interface view

Default level

2: System level

Parameters

policy-name: Policy name, a string of 1 to 19 characters.

Description

Use the ipv6 policy-based-route command to configure IPv6 PBR based on a policy on the interface.

Use the undo ipv6 policy-based-route command to remove the configuration.

IPv6 interface PBR is not configured by default.

Examples

# Configure IPv6 PBR based on policy AAA on GigabitEthernet 3/1/1.

<Sysname> system-view

[Sysname] interface GigabitEthernet 3/1/1

[Sysname-GigabitEthernet3/1/1] ipv6 policy-based-route AAA

ipv6 policy-based-route (system view)

Syntax

ipv6 policy-based-route policy-name [ deny | permit ] node node-number

undo ipv6 policy-based-route policy-name [ deny | node node-number | permit ]

View

System view

Default level

2: System level

Parameters

policy-name: Policy name, a string of 1 to 19 characters.

deny: Specifies the match mode of the policy node as deny.

permit: Specifies the match mode of the policy node as permit.

node node-number: Number of the IPv6 policy node, in the range 0 to 65535. Packets will match against the node with a smaller node-number first.

Description

Use the ipv6 policy-based-route command to create an IPv6 policy, a policy node, or both, and enter IPv6 PBR policy node view.

Use the undo ipv6 policy-based-route command to remove an IPv6 policy, a policy node, or both.

No IPv6 policy or policy node is created by default.

Examples

# Create Node 10 of IPv6 policy aaa with match mode being permit and enter IPv6 PBR policy node view.

<Sysname> system-view

[Sysname] ipv6 policy-based-route aaa permit node 10

reset ipv6 policy-based-route statistics

Syntax

reset ipv6 policy-based-route statistics [ policy-name ]

View

User view

Default level

1: Monitor level

Parameters

policy-name: Policy name, a string of 1 to 19 characters.

Description

Use the reset ipv6 policy-based-route statistics command to clear IPv6 PBR statistics.

If no policy name is specified, this command clears all IPv6 PBR statistics.

Examples

# Clear all IPv6 PBR statistics.

<Sysname> reset ipv6 policy-based-route statistics

  • 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
新华三官网