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)
12-IPv4 Routing Command
Title Size Download
12-IPv4 Routing Command 321 KB

Table of Contents

Chapter 1 Static Route Configuration Commands. 1-1

1.1 Static Route Configuration Commands. 1-1

1.1.1 delete static-routes all 1-1

1.1.2 ip route-static. 1-2

1.1.3 ip route-static default-preference. 1-3

Chapter 2 RIP Configuration Commands. 2-1

2.1 RIP Configuration Commands. 2-1

2.1.1 checkzero. 2-1

2.1.2 default cost 2-2

2.1.3 default-route originate. 2-2

2.1.4 display rip. 2-3

2.1.5 display rip database. 2-5

2.1.6 display rip interface. 2-6

2.1.7 display rip route. 2-7

2.1.8 filter-policy export 2-9

2.1.9 filter-policy import 2-10

2.1.10 host-route. 2-11

2.1.11 import-route. 2-12

2.1.12 network. 2-13

2.1.13 peer 2-13

2.1.14 preference. 2-14

2.1.15 reset rip statistics. 2-15

2.1.16 rip. 2-15

2.1.17 rip authentication-mode. 2-16

2.1.18 rip input 2-17

2.1.19 rip metricin. 2-18

2.1.20 rip metricout 2-18

2.1.21 rip output 2-19

2.1.22 rip poison-reverse. 2-20

2.1.23 rip split-horizon. 2-21

2.1.24 rip summary-address. 2-21

2.1.25 rip version. 2-22

2.1.26 silent-interface. 2-24

2.1.27 summary. 2-25

2.1.28 timers. 2-26

2.1.29 validate-source-address. 2-27

2.1.30 version. 2-27

Chapter 3 Routing Policy Configuration Commands. 3-1

3.1 Public Routing Policy Configuration Commands. 3-1

3.1.1 apply cost 3-1

3.1.2 apply ip-address next-hop. 3-2

3.1.3 apply preference. 3-3

3.1.4 apply tag. 3-3

3.1.5 display ip ip-prefix. 3-4

3.1.6 display route-policy. 3-5

3.1.7 if-match acl 3-6

3.1.8 if-match cost 3-7

3.1.9 if-match interface. 3-7

3.1.10 if-match ip. 3-8

3.1.11 if-match ip-prefix. 3-9

3.1.12 if-match tag. 3-10

3.1.13 ip ip-prefix. 3-10

3.1.14 reset ip ip-prefix. 3-12

3.1.15 route-policy. 3-12

 


Chapter 1  Static Route Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or a Layer 3 switch. To improve readability, this will not be described in the present manual again.

 

1.1  Static Route Configuration Commands

1.1.1  delete static-routes all

Syntax

delete static-routes all

View

System view

Parameter

None

Description

Use the delete static-routes all command to delete all static routes.

When you use this command to delete static routes, the system will prompt you to confirm the operation before all the configured static routes.

Related command: ip route-static and display ip routing-table.

Example

# Delete all static routers on the router.

<Sysname> system-view

[Sysname] delete static-routes all

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

Are you sure?[Y/N]:y

1.1.2  ip route-static

Syntax

ip route-static ip-address { mask | mask-length } interface-type interface-number [ preference preference ] [ tag tag-value ] [ description description-text ]

undo ip route-static ip-address { mask | mask-length } interface-type interface-number  [ preference preference ]

View

System view

Parameter

ip-address: Destination IP address of the static route, in dotted decimal notation.

mask: Mask of the corresponding IP address, in dotted decimal notation. 

mask-length: Mask length. Because a 32-bit mask must contain contiguous 1’s, a dotted decimal mask can appear in the form of mask length.

interface-type interface-number: Specifies the output interface by its type and number. If the output interface is a broadcast interface, such as a virtual template or a VLAN interface, the next hop address must be specified.

preference preference: Specifies the preference of the static route, which is in the range of 1 to 255 and defaults to 60.

description description-text: Sets the description information of the static route, which consists of 1 to 60 characters, including special characters like space, but excluding “?”.

tag tag-value: Sets the tag value of the static route, which is in the range of 1 to 4294967295 . The default tag value of the static route is 0.

Description

Use the ip route-static command to configure a unicast static route.

Use the undo ip route-static command to delete a unicast static route.

When configuring a unicast static route, note that:

1)         If the destination IP address and the mask are both 0.0.0.0, the configured route is a default route. If routing table searching fails, the router will use the default route for packet forwarding.

2)         When configuring a static route, you can specify the output interface or the next hop address based on the actual requirement. Note that the next hop address must not be the IP address of the local interface; otherwise, the route configuration will not take effect. When specifying the output interface, note that:

l           For a NULL0 or loopback interface, if the output interface has already been configured, there is no need to configure the next hop address.

l           It is not recommended to specify a broadcast interface (such as an Ethernet interface, virtual template, or VLAN interface) as the output interface for a static route, because a broadcast interface may have multiple next hops. If you have to do so, you must specify the corresponding next hop of the interface at the same time.

Related command: display ip routing-table and ip route-static default-preference.

Example

# Configure the next hop of the default route as 129.102.0.2.

<Sysname> system-view

[Sysname] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2

# Specify the description of the static route as "for internet & intranet".

<Sysname> system-view

[Sysname] ip route-static 3.3.3.3 24 4.4.4.4 description for internet & intranet

[Sysname] display current-configuration

……<omitted>

#

ip route-static 3.3.3.0 255.255.255.0 4.4.4.4 description for internet & intranet

#

return

# Configure the tag value of the static route as 45 and the description of the static route as "test"

<Sysname> system-view

[Sysname]ip route-static 1.1.1.1 24 2.2.2.2 tag 45 description test

1.1.3  ip route-static default-preference

Syntax

ip route-static default-preference default-preference-value

undo ip route-static default-preference

View

System view

Parameter

default-preference-value: Default preference of the static route, which is in the range of 1 to 255.

Description

Use the ip route-static default-preference command to configure the default preference for static routes.

Use the undo ip route-static default-preference command to restore the default preference to the default value.

By default, the default preference for static routes is 60.

Note that:

l           If no preference is specified when configuring a static route, the default preference is used.

l           When the default preference is re-configured, it applies to newly added static routes only.

Related command: display ip routing-table and ip route-static.

Example

# Set the default preference of static routes to 20.

<Sysname> system-view

[Sysname] ip route-static default-preference 120

 


Chapter 2  RIP Configuration Commands

 

&  Note:

The term router in this document refers to a router in a generic sense or a Layer 3 switch. To improve readability, this will not be described in the present manual again.

 

2.1  RIP Configuration Commands

2.1.1  checkzero

Syntax

checkzero

undo checkzero

View

RIP view

Parameter

None

Description

Use the checkzero command to enable the zero zone check on RIP-1 messages.

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

The zero zone check is enabled by default.

After the zero field check is enabled, the router discards RIP-1 messages in which zero fields are non-zero. If all messages are trusty, you can disable this feature to spare the processing time of the CPU.

Example

# Disable the zero zone check on RIP-1 message.

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] undo checkzero

2.1.2  default cost

Syntax

default cost value

undo default cost

View

RIP view

Parameter

value: Specifies the routing cost, in the range 0 to 16, 0 is the default value.

Description

Use the default cost command to configure the default metric for redistributed routes.

Use the undo default cost command to restore the default.

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

When you use the import-route command to redistribute routes from other protocols without specifying a metric, the metric specified by the default cost command applies.

Related command: import-route.

Example

# Set the cost of the imported route to 3.

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] default cost 3

2.1.3  default-route originate

Syntax

default-route originate cost value

undo default-route originate

View

RIP view

Parameter

value: Specifies the originate routing cost, in the range 1 to 15.

Description

Use the default-route originate cost command to advertise a default route with the specified metric to RIP neighbors.

Use the undo default-route originate command to disable the sending of a default route.

By default, no default route is sent to RIP neighbors.

The RIP router with this feature configured will not receive any default routes from RIP neighbors.

Example

# Send a default route with a metric of 2 to RIP neighbors.

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] default-route originate cost 2

# Remove the originate default route

[Sysname-rip-100] undo default-route originate

2.1.4  display rip

Syntax

display rip [ process-id ]

View

Any view

Parameter

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

Description

Use the display rip command to display the current status and configuration information of a RIP process.

Example

# Display the current status and configuration information of a RIP process.

<Sysname>display rip

 

    RIP process : 1

       RIP version : 1

       Preference : 100

       Checkzero : Enabled

       Default-cost : 0

       Summary : Enabled

       Hostroutes : Enabled

       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)

       Silent interfaces : None

       Default routes : Disabled

       Verify-source : Enabled

       Networks :

       10.0.0.0                         

       Configured peers : None

       Triggered updates sent : 0

       Number of routes changes : 1

       Number of replies to queries : 0

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

Field

Description

RIP process

RIP process number

RIP version

RIP version 1 or 2

Preference

RIP process priority

Checkzero

Indicates whether the zero field check is enabled for RIP-1 messages.

Default-cost

Default cost of the redistributed routes

Summary

Indicates whether the routing summarization is enabled

Hostroutes

Indicates whether to receive host routes

Maximum number of balanced paths

The Maximum number of balanced paths

Update time

RIP updating interval

Timeout time

RIP timeout interval

Suppress time

RIP suppress interval

Garbage collect time

RIP garbage collection interval

Silent interfaces

The number of silent interfaces, which do not periodically send updating messages.

Default routes

Indicates whether a default route is sent to RIP neighbors

Validate-source-address

Indicates whether the source IP address is checked on the received RIP routing updates

Networks

Networks enabled with RIP

Configured peers

Configured neighbors

Triggered updates sent

The number of sent triggered updates

Number of routes changes

The number of changed routes

Number of replies to queries

The number of respond queries of RIP requests

 

2.1.5  display rip database

Syntax

display rip process-id database

View

Any view

Parameter

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

Description

Use the display rip database command to display the active routes in the RIP announced database, which are send in regular RIP updating messages.

Example

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

<Sysname> display rip 1 database

   10.0.0.0/8, cost 0, ClassfulSumm

   10.0.0.0/8, cost 0, nexthop 10.0.0.1, Rip-interface

   12.0.0.0/8, cost 1, ClassfulSumm

   12.0.0.0/8, cost 1, nexthop 10.0.0.2

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

Field

Description

X.X.X.X/X

Destination address and subnet mask

cost

Cost of the route

classful-summ

Indicates the route is a RIP summary route.

Nexthop

Address of the next hop

Rip-interface

Routes learnt from a RIP–enabled interface

imported

Routes redistributed from other routing protocols

 

2.1.6  display rip interface

Syntax

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

View

Any view

Parameter

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

interface-type interface-number: Specifies an interface with a type and a number.

Description

Use the display rip interface command to display the RIP interface information.

Example

# Display the interface information of RIP process 1.

<Sysname> display rip 1 interface

 

 Interface-name: Ethernet0/1/0

        Address/Mask:1.1.1.1/24                MetricIn/Out:0/1   Version: RIPv1

        Split-horizon/Poison-reverse:on/off      Input/Output:on/on

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

Field

Description

Interface-name

The name of an interface running RIP. The IP address and Mask of the interface are the same as displayed in the Address/Mask field.

Address/Mask

The IP address and Mask of the interface running RIP (Enabled by the network command in the RIP view).

MetrIn/Out

Additional routing metric added to the incoming and outgoing routes

Version

RIP version running on an interface

Split-horizon

Indicates if Split-horizon is enabled (on is enabled, off is disabled).

Poison-reverse

Indicates if Poison-reverse is enabled (on is enabled, off is disabled).

Input/Output

Indicates if the interface is allowed to receive (Input) or send (Output) RIP messages (on is allowed, off is not allowed).

 

2.1.7  display rip route

Syntax

display rip process-id route [ statistics | ip-address { mask | mask-length } | peer ip-address ]

View

Any view

Parameter

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

statistics: Displays route statistics, including the total number of routes and the number of routes of each neighbor.

ip-address { mask | mask-length }: Displays route information about a specified IP address.

peer ip-address: Displays all the routes learned by the neighbor with the specified IP address.

Description

Use the display rip route command to display all active or inactive RIP routes and timers associate to each route.

Example

# Display the route information about RIP process 1.

<Sysname>display rip 1 route

Route Flags: R - RIP, T - TRIP

              P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------

 Peer 21.0.0.23  on Vlan-interface10

      Destination/Mask        Nexthop     Cost    Tag   Flags   Sec

         56.0.0.0/8          21.0.0.23      1       0    RA     102

         34.0.0.0/8          21.0.0.23      1       0    RA      23

 Peer 21.0.0.12  on Vlan-interface10

      Destination/Mask        Nexthop     Cost    Tag   Flags   Sec

         56.0.0.0/8          21.0.0.12      1       0    RA      34

         12.0.0.0/8          21.0.0.12      1       0    RA      12

# Display the routes whose destination address is 56.0.0.0 and whose mask is 8 for RIP process 1.

<Sysname>display rip 1 route

Route Flags: R - RIP, T - TRIP

              P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------

 Peer 21.0.0.23  on Vlan-interface10

      Destination/Mask        Nexthop     Cost    Tag   Flags   Sec

         56.0.0.0/8          21.0.0.23      1       0    RA     102

 Peer 21.0.0.12  on Vlan-interface10

      Destination/Mask        Nexthop     Cost    Tag   Flags   Sec

         56.0.0.0/8          21.0.0.12      1       0    RA      34

# Display the routes that RIP process 1 learned from the specified neighbors.

<Sysname>display rip 1 route

Route Flags: R - RIP, T - TRIP

              P - Permanent, A - Aging, S - Suppressed, G - Garbage-collect --------------------------------------------------------------------------

 Peer 21.0.0.23  on Vlan-interface10

      Destination/Mask        Nexthop     Cost    Tag   Flags   Sec

         56.0.0.0/8          21.0.0.23      1       0    RA     102

         34.0.0.0/8          21.0.0.23      1       0    RA      23

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

Field

Description

Route Flags

R — RIP route

T — TRIP route

P — The route never expired

A — The route is at the aging time

S — The route is at the suppress time

G — The route is at Garbage-collect time

Peer 21.0.0.23 on Ethernet1/0

Routing information learned on a RIP interface from the specified neighbor

Nexthop

The next hop of the route

Cost

The cost of the route

Flags

Indicates the route state

Tag

Indicates that the information about this route has changed.

Sec

Remaining time of the timer corresponding to the route state

 

# Display the route statistics of RIP process 1.

<Sysname>display rip 1 route statistics

 Peer            Aging     Permanent    Garbage

 10.0.0.2         1         0             0    

 Total            1         0             0    

Table 2-5 Description on the fields of the display rip process-id route statistics command

Field

Description

Peer

IP address of neighbor

Aging

Total number of aging routes learned from the specified neighbor

Permanent

Total number of permanent routes learned from the specified neighbor

Garbage

Total number of routes in the garbage-collection state learned from the specified neighbor

Total

Total number of routes learned from the specified neighbor

 

2.1.8  filter-policy export

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] | interface-type interface-number ]

undo filter-policy export [ protocol [ process-id ] | interface-type interface-number ]

View

RIP view

Parameter

acl-number: Number of the Access Control List (ACL) used for filtering outbound routes, in the range of 2000 to 3999.

ip-prefix-name: Name of the IP prefix list used for filtering outbound routes, a string of 1 to 19 characters.

protocol: Protocols can be exported, currently including direct, rip and static.

process-id: Process number of the specified routing protocol, in the range of 1 to 65535. You need to specify a process ID when the routing protocol is rip.

interface-type: Interface type

interface-number: Interface number

Description

Use the filter-policy export command to define a RIP outbound route filtering policy. Only routes not filtered out can be advertised.

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

By default, RIP does not filter outbound routes.

Note that:

l           If protocol is specified, RIP filters only the routes redistributed from the specified routing protocol. Otherwise, RIP filters all routes to be advertised.

l           If interface-type interface-number is specified, RIP filters only the routes advertised by the specified interface. Otherwise, RIP filters routes advertised by all RIP interfaces.

Related command: acl, import-route, and ip ip-prefix.

Example

# Configure ACL 2000 to filter outbound routes.

<Sysname> system-view

[Sysname] rip 1

[Sysname-rip-1] filter-policy 2000 export

# Configure to filter the RIP route update packets sent through Vlan-interface 100 according to the address prefix list named abc.

<Sysname>system-view

[Sysname]rip 1

[Sysname-rip-1]filter-policy ip-prefix abc export Vlan-interface 100

2.1.9  filter-policy import

Syntax

filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | gateway ip-prefix-name } import [ interface-type interface-number ]

undo filter-policy import [ interface-type interface-number ]

View

RIP view

Parameter

acl-number: Number of access control list of the filtered route, in the range 2000 to 3999.

ip-prefix ip-prefix-name: References an IP prefix list to filter received routes. The ip-prefix-name is a string of 1 to 19 characters.

gateway: Sets the filtering policy for routes from the gateway.

interface-type: Interface type

interface-number: Interface number

Description

Use the filter-policy import command to filter the imported routes so that only the Use the filter-policy import command to filter the received routes.

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

By default, RIP does not filter received routes.

Related command: acl and ip ip-prefix.

Example

# Configure ACL 2000 to filter imported routes.

<Sysname> system-view

[Sysname] rip 1

[Sysname-rip-1] filter-policy 2000 import

# Configure to filter the RIP route update packets received through Vlan-interface 100 according to the address prefix list named abc.

<Sysname>system-view

[Sysname]rip 1

[Sysname-rip-1]filter-policy ip-prefix abc import Vlan-interface 100

2.1.10  host-route

Syntax

host-route

undo host-route

View

RIP view

Parameter

None

Description

Use the host-route command to enable the router to receive host routes.

Use the undo host-route command to disable host route reception..

By default, receiving host routes is enabled.

In some cases, a router may receive many host routes from the same network segment. These routes are not helpful for routing and occupy a large amount of network resources. You can use the undo host-route command to refuse receiving those host routes.

Example

# Disable RIP from receiving host routes.

<Sysname> system-view

[Sysname] rip 1

[Sysname-rip-1] undo host-route

2.1.11  import-route

Syntax

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

undo import-route protocol

View

RIP view

Parameter

protocol: Protocols can be imported, currently including direct and static.

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

tag-value: Tag value marking redistributed routes, in the range of 0 to 65,535. The default is 0.

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

Description

Use the import-route command to import routes and set route attributes. You can set the routing policy to import specified routes.

Use the undo import-route command to remove the imported routes.

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

l           You can specify a routing policy using keyword route-policy to redistribute only the specified routes.

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

l           You can configure a tag value for redistributed routes using keyword tag.

Related command: default cost.

Example

# Import a static route, and set the cost to 4.

<Sysname> system-view

[Sysname] rip 1

[Sysname-rip-1] import-route static cost 4

# Import Static route with a specified default cost.

[Sysname-rip-1] default cost 3

[Sysname-rip-1] import-route static

2.1.12  network

Syntax

network network-address

undo network network-address

View

RIP view

Parameter

network-address: IP address of a network segment, which can be the IP network address of any interface.

Description

Use the network command to enable RIP on a specified network.

Use the undo network command to disable RIP on a specified network.

Use the network 0.0.0.0 command to enable RIP on all interfaces.

RIP is disabled by default.

Example

# Enable RIP on network 129.102.0.0.

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] network 129.102.0.0

2.1.13  peer

Syntax

peer ip-address

undo peer ip-address

View

RIP view

Parameter

ip-address: Peer IP address, presented in decimal format.

Description

Use the peer command to define IP addresses of RIP neighboring routers in the NBMA (Non-Broadcast Multi-Access) network. After configuring this command, updating messages are unicast to the peer rather than multicast or broadcast.

Use the undo peer command to remove peer IP addresses.

By default, no neighbor is specified.

In normal condition, it is not recommended to use this command. The peer might get the same message by multicast (broadcast) and unicast. You are recommended to set the related interfaces to silent mode in combination of this command.

Example

# Assign an IP address to a peer.

<Sysname> system-view

[Sysname] rip 1

[Sysname-rip-1] peer 202.38.165.1

2.1.14  preference

Syntax

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

undo preference [ route-policy ]

View

RIP view

Parameter

route-policy-name: Routing policy name with 1 to 19 characters.

value: Priority for RIP route, in the range of 1 to 255. The smaller the value, the higher the priority.

Description

Use the preference command to specify the RIP route priority.

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

By default, the priority of RIP route is 100.

You can specify a routing policy using keyword route-policy to set the specified priority to routes matching the routing policy.

l           If a priority is set for matched routes in the routing policy, the priority applies to these routes. The priority of other routes is the one set by the preference command.

l           If no priority is set for matched routes in the routing policy, the priority of all routes is the one set by the preference command.

Example

# Define 120 as the RIP priority.

<Sysname> system-view

[Sysname] rip 1

[Sysname-rip-1] preference 120

2.1.15  reset rip statistics

Syntax

reset rip process-id statistics

View

User view

Parameter

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

Description

Use the reset rip statistics command to clear the statistics information in specified RIP process.

Example

# Clear statistics information in RIP 100.

<Sysname> reset rip 100 statistics

2.1.16  rip

Syntax

rip [ process-id ]

undo rip [ process-id ]

View

System view

Parameter

process-id: RIP process number, in the range 1 to 65535, 1 by default.

Description

Use the rip command to create a RIP process and enter RIP view.

Use the undo rip command to remove the RIP process.

The RIP process is not created by default.

 

&  Note:

l      After RIP is disabled, interface parameters are no longer valid.

l      The configured interface parameters become invalid after you disable the RIP process.

 

Example

# Enable RIP and enter RIP view.

<Sysname> system-view

[Sysname] rip

[Sysname-rip-1]

2.1.17  rip authentication-mode

Syntax

rip authentication-mode { simple password | md5 { rfc2453 key-string | rfc2082 key-string key-id } }

undo rip authentication-mode

View

Interface view

Parameter

simple: Specifies the plain text authentication mode.

password: Plain text authentication string, a string of 1 to 16 characters.

md5: Specifies the MD5 authentication mode.

rfc2453: In MD5 authentication mode, message format is the same as defined in RFC 2453 (IETF standard).

rfc2082: In MD5 authentication mode, message format is the same as defined in RFC 2082.

key-id: MD5 key number, in the range 1 to 255.

key-string: MD5 key string, a string of 1 to 16 characters. When you use the display current-configuration command to display the system information, 24-character cipher is displayed. The system also supports 24-character key string cipher.

Description

Use the rip authentication-mode command to configure RIP-2 authentication mode and parameters.

Use the undo rip authentication-mode command to remove all authentication configurations.

The key string you configured can overwrite the old one if there is any.

Related command: rip version.

Example

# Configure MD5 authentication on a Vlan interface based on the format defined in RFC 2453. Use rose as the key string.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] rip version 2

[Sysname-Vlan-interface10] rip authentication-mode md5 rfc2453 rose

2.1.18  rip input

Syntax

rip input

undo rip input

View

Interface view

Parameter

None

Description

Use the rip input command to enable the interface receiving RIP messages.

Use the undo rip input command to disable the interface receiving RIP messages.

By default, an interface is enabled to receive RIP messages.

Related command: rip output.

Example

# Disable a Vlan interface to receive RIP messages.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] undo rip input

2.1.19  rip metricin

Syntax

rip metricin value

undo rip metricin

View

Interface view

Parameter

value: Additional metric added to the incoming route, in the range 0 to 16 with a default value 0.

Description

Use the rip metricin command to add an additional metric to the received routes.

Use the undo rip metricin command to remove the additional metric.

By default, the additional metric of a received route is 0.

When a valid RIP route is received, the system will add a metric to it and then put it into the routing table. Therefore, the metric of routes received on the configured interface is increased.

Related command: rip metricout.

Example

# Configure an additional metric for routes received on a Vlan interface.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] rip metricin 2

2.1.20  rip metricout

Syntax

rip metricout value

undo rip metricout

View

Interface view

Parameter

value: Additional metric of sent routes,, in the range 1 to 16 with a default value 1.

Description

Use the rip metricout command to add an additional metric to the outgoing routes.

Use the undo rip metricout command to remove the additional metric.

By default, the additional metric for sent routes is 1.

Before a RIP route is sent, a metric will be added to it. Therefore, when the metric is configured on an interface, the metric of RIP routes sent on the interface will be increased.

 

&  Note:

The rip metricout command only applies to local and learnt RIP routes instead of other imported routes.

 

Related command: rip metricin.

Example

# Configure an additional metric for outgoing routes on a Vlan interface.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] rip metricout 12

2.1.21  rip output

Syntax

rip output

undo rip output

View

Interface view

Parameter

None

Description

Use the rip output command to enable an interface to receive RIP messages.

Use the undo rip output command to disable an interface to receive RIP messages.

Receiving RIP messages is enabled by default.

Related command: rip input.

Example

# Disable a Vlan interface from receiving RIP messages.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] undo rip output

2.1.22  rip poison-reverse

Syntax

rip poison-reverse

undo rip poison-reverse

View

Interface view

Parameter

None

Description

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

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

By default, the poison reverse function is disabled.

After the poison reverse function is enabled, the router sends out routing tables through the same interface where it receives, with a metric value of 16 (means infinite).

If both poison reverse and split horizon are enabled, the router only uses poison reverse.

Example

# Enable the poison reverse function on a Vlan interface.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] rip poison-reverse

2.1.23  rip split-horizon

Syntax

rip split-horizon

undo rip split-horizon

View

Interface view

Parameter

None

Description

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

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

Split horizon is enabled by default.

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 it is necessary to disable the split horizon function.

 

&  Note:

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

 

Example

# Enable the split horizon function on a Vlan interface.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] rip split-horizon

2.1.24  rip summary-address

Syntax

rip summary-address ip-address { mask-length | mask }

undo rip summary-address ip-address { mask-length | mask }

View

Interface view

Parameter

ip-address: Assigns an IP address for the summarized routes to be advertised.

mask-length: Subnet mask length.

mask: Subnet mask in decimal format.

Description

Use the rip summary-address command to assign a summary IP address

Use the undo rip summary-address command to remove the summary IP address.

Note that the summary IP address is only valid when the automatic summary is disabled.

Related command: summary.

Example

# Advertise a local summary address on Vlan-interface10.

<Sysname> system-view

[Sysname] interface vlan-interface 10

[Sysname-Vlan-interface10] rip summary-address 10.0.0.0 255.255.255.0

2.1.25  rip version

Syntax

rip version { 1 | 2 [ broadcast | multicast ] }

undo rip version

View

Interface view

Parameter

1: RIP version 1.

2: RIP version 2.

broadcast: RIP-2 messages send in broadcast method.

multicast: RIP-2 messages send in multicast method.

Description

Use the rip version command to specify the RIP version on an interface.

Use the undo rip version command to set the RIP version to default value.

By default, RIP-1 runs on an interface.

You can specify a RIP version in interface view or system view. Interface view takes precedence over system view. That is, the RIP version configured in system view takes effect on the interface only if no RIP version is configured in interface view.

By default, no RIP version is configured in interface view or system view.

 

&  Note:

l      If you configure version 1 in system view when no version is configured in interface view, you are configuring RIP version 1 in interface view.

l      If you configure version 2 in system view when no version is configured in interface view, you are configuring RIP version 2 multicast in interface view.

l      The RIP version configured in interface view is used for processing RIP packets. Each time the version configured in RIP system view changes, the version on all interfaces is reconfigured automatically.

 

Table 2-6 Description on RIP packets received

RIP version configuration

RIPv1 broadcast packet

RIPv1 unicast packet

RIPv2 broadcast packet

RIPv2 multicast packet

RIPv2 unicast packet

No version configured in interface view

No version configured in system view

Version 1 configured in interface view

No version configured in interface view and version 1 configured in system view

Version 2 multicast configured in interface view

No version configured in interface view and version 2 configured in system view

Version 2 broadcast configured in interface view

 

Table 2-7 Description on RIP packets sent

RIP version configuration

Type of packets sent

No version configured in interface view

RIPv1 broadcast packet

No version configured in system view

Version 1 configured in interface view

RIPv1 broadcast packet

No version configured in interface view and version 1 configured in system view

Version 2 multicast configured in interface view

RIPv2 multicast packet

No version configured in interface view and version 2 configured in system view

Version 2 broadcast configured in interface view

RIPv2 broadcast packet

 

Example

# Configure a Vlan interface to broadcast RIP-2 messages.

<Sysname> system-view

[Sysname] interface Vlan-interface 10

[Sysname-Vlan-interface10] rip version 2 broadcast

2.1.26  silent-interface

Syntax

silent-interface { all | interface-type interface-number }

undo silent-interface { all | interface-type interface-number }

View

RIP view

Parameter

all: Set all interfaces to the silent state.

interface-type interface-number: Specifies an interface with a type and a number.

Description

Use the silent-interface command to disable an interface or all interfaces from sending routing updates. That is, the interface only receives but does not send RIP messages.

Use the undo silent-interface command to restore the default.

By default, all interfaces are allowed to send routing updates.

Example

# Set all Vlan interfaces to the silent state, and activate specified interfaces.

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] silent-interface all

[Sysname-rip-100] undo silent-interface vlan-interface 10

[Sysname-rip-100] network 131.108.0.0

2.1.27  summary

Syntax

summary

undo summary

View

RIP view

Parameter

None

Description

Use the summary command to enable automatic RIP-2 summarization. Natural masks are used to advertise summary routes so as to reduce the size of routing tables.

Use the undo summary command to disable automatic RIP-2 summarization so that all subnet routes can be broadcasted.

By default, automatic RIP-2 summarization is enabled.

Enabling automatic RIP-2 summarization can reduce the size of the routing table to enhance the scalability and efficiency of large networks.

Related command: rip version.

Example

# Enable RIP summarization.

<Sysname> system-view

[Sysname] rip

[Sysname-rip-1] summary

2.1.28  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

RIP view

Parameter

garbage-collect-value: Garbage-collect timer time in seconds, in the range of 1 to 3600.

suppress-value: Suppress timer time in seconds, in the range of 0 to 3600.

timeout-value: Timeout timer time in seconds, in the range of 1 to 3,600.

update-value: Update timer time in seconds, in the range of 1 to 3,600.

Description

Use the timers command to adjust RIP timers.

Use the timers command to configure RIP timers. By adjusting RIP timers, you can improve network performance.

Use the undo timers command to restore the default.

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

Note that:

l           Generally, you are not recommended to change the default values of these timers.

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

Example

# Adjust the update, timeout, suppress, and garbage-collect timers in two approaches.

Approach 1:

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] timers update 5

[Sysname-rip-100] timers timeout 15

[Sysname-rip-100] timers suppress 15

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

Approach 2:

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] timers garbage-collect 30 suppress 15 timeout 15 update 5

2.1.29  validate-source-address

Syntax

validate-source-address

undo validate-source-address

View

RIP view

Parameter

None

Description

Use the validate-source-address command to enable the source IP address validation on incoming RIP routing updates.

Use the undo validate-source-address command to disable the source IP address validation.

The source address validation is enabled by default.

Generally, disabling the validation is not recommended.

Example

# Enable the source address validation.

<Sysname> system-view

[Sysname-rip] rip 100

[Sysname-rip-100] validate-source-address

2.1.30  version

Syntax

version { 1 | 2 }

undo version

View

RIP view

Parameter

1: RIP version 1.

2: RIP version 2.

Description

Use the version command to define a global RIP version.

Use the undo version command to set the global RIP version back to default.

By default, the RIP version is RIP-1.

Note that the global RIP version takes effect on RIP interfaces only when no interface RIP version is configured.

Example

# Specify RIP-2 as the global version.

<Sysname> system-view

[Sysname] rip 100

[Sysname-rip-100] version 2

 


Chapter 3  Routing Policy Configuration Commands

 

&  Note:

The term “router” in this document refers to a router in a generic sense or a Layer 3 switch. To improve readability, this will not be described in the present manual again.

 

3.1  Public Routing Policy Configuration Commands

In some cases, only the route information meeting certain conditions need to be received or sent. In such a case, you can define a filter-policy to set the filtering conditions for receiving or sending route information so that only routes meeting the conditions are received or sent.

3.1.1  apply cost

Syntax

apply cost [ + | - ] value

undo apply cost

View

Routing policy view

Parameter

+: Increases cost value.

-: Decreases cost value.

value: 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 acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address 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-interface 10, 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 10

[Sysname-route-policy] apply cost 120

3.1.2  apply ip-address next-hop

Syntax

apply ip-address next-hop ip-address

undo apply ip-address next-hop

View

Routing policy view

Parameter

ip-address: IP address of the next hop.

Description

Use the apply ip-address next-hop command to set the next hop for IPv4 routing information.

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

No next hop address is configured for IPv4 routing information by default.

You cannot use the apply ip-address next-hop command to set next hop address when redistributing routes.

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

Example

# Create a routing policy named policy1 with the node number being 10, matching mode permit. If matched by AS path ACL 2000, routing information‘s next hop is set to 193.1.1.8.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match acl 2000

[Sysname-route-policy] apply ip-address next-hop 193.1.1.8

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. If a route matches ACL 2000, set the preference for the routing protocol to 90.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match acl 2000

[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 of routing information.

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

No routing tag is set by default.

Related command: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, and apply cost.

Example

# Create a routing policy named policy1 with the node number of 10, matching mode as permit. If a route matches ACL 2000, set the tag of the route to 100.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match acl 2000

[Sysname-route-policy] apply tag 100

3.1.5  display ip ip-prefix

Syntax

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

View

Any view

Parameter

ip-prefix-name: IP prefix list name, in the range 1 to 19 characters.

Description

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

Related command: ip ip-prefix.

Example

# Display the statistics of the address prefix list abc.

<Sysname> display ip ip-prefix abc

Prefix-list abc

Permitted 0

Denied 0

        index: 10               permit  1.0.0.0/11              ge  22  le  32

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

Field

Description

Prefix-list

Name of address 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, having two values: permit and deny

1.0.0.0/11

Matched IP address and its mask length

ge

greater-equal, the minimum length of matched IP mask

le

less-equal, the maximum length of matched IP mask

 

3.1.6  display route-policy

Syntax

display route-policy [ route-policy-name ]

View

Any view

Parameter

route-policy-name: Routing policy name.

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 1.

<Sysname> display route-policy policy1

Route-policy : policy1

  permit : 10

        if-match ip-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:

Match mode, which can be permit or 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 acl

Syntax

if-match acl acl-number

undo if-match acl

View

Routing policy view

Parameter

acl-number: Specifies the number of an access control list for filtering, ranging from 2000 to 3999.

Description

Use the if-match acl command to match destination IP addresses of routes against the specified ACL.

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

No destination IP address is matched for routing information by default.

Related command: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address 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 destinations matching the ACL 2000.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match acl 2000

3.1.8  if-match cost

Syntax

if-match cost value

undo if-match cost

View

Routing policy view

Parameter

value: 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 acl, if-match ip-prefix, if-match ip next-hop, if-match tag, route-policy, apply ip-address 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.9  if-match interface

Syntax

if-match interface { interface-list 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 acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply cost, 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.10  if-match ip

Syntax

if-match ip { next-hop | route-source } { acl acl-number | ip-prefix ip-prefix-name }

undo if-match ip { next-hop | route-source} [ acl | ip-prefix ]

View

Routing policy view

Parameter

next-hop: Matches next hop address.

route-source: Match route advertising source address.

acl acl-number: Specifies the number an ACLwith which to match routes, ranging from 2000 to 2999.

ip-prefix ip-prefix-name: Specifies the name of an IP prefix list with which to match routes, ranging from 1 to 19 characters.

Description

Use the if-match ip command to match IPv4 routing information (next hop or source address).

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

The matching condition is not configured by default.

Related command: route-policy.  

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 routing information whose next hop address matches IP prefix list p1.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

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

3.1.11  if-match ip-prefix

Syntax

if-match ip-prefix ip-prefix-name

undo if-match ip-prefix

View

Routing policy view

Parameter

ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.

Description

Use the if-match ip-prefix command to match the destination IP address of a route to the specified IP prefix list.

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

No destination IP address is matched for routing information by default.

Related command: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply cost, apply local-preference, apply origin 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 route whose destination address matches IP prefix list p1.

<Sysname> system-view

[Sysname] route-policy policy1 permit node 10

[Sysname-route-policy] if-match ip-prefix p1

3.1.12  if-match tag

Syntax

if-match tag value

undo if-match tag

View

Routing policy view

Parameter

value: Tag value, ranging from 0 to 4294967295.

Description

Use the if-match tag command to match the tag field of routes 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 acl, if-match ip-prefix, if-match ip next-hop, if-match cost, route-policy, apply ip-address next-hop, apply cost, 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 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.13  ip ip-prefix

Syntax

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

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

View

System view

Parameter

ip-prefix-name: IP prefix list name, in the range 1 to 19 characters, for uniquely specifying an address prefix list.

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

permit: Specifies the matching mode for the IP prefix list as permit, that is, when a route to be filtered is in the range of the IP prefix list, the route passes the IP 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 IP prefix list as deny, that is, when a route to be filtered is in the IP 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.

ip-address mask-length: Specifies IPv4 address prefix and length, with mask-length in the range 0 to 32. When specified as 0.0.0.0, it matches all IP addresses.

min-mask-length, max-mask-length: Specifies the range for address prefix if the IPv4 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-mask-length is specified, the prefix length range is [ min-mask-length, 32 ]. If only 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 ].

Description

Use the ip ip-prefix command to configure an IP prefix list or an item.

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

No IP prefix list is configured by default.

The IP prefix list is used to filter IP addresses. It may have multiple items, each of which specifies a range of IP prefix. The filtering relation among items is logic OR, namely,  passing any item means the IP prefix list is passed. If no item passed, the IP prefix list cannot be passed.

The IP prefix range is determined by mask-length and [ min-mask-length, max-mask-length ]. If both mask-length and [ min-mask-length, max-mask-length ] are specified, then the IP address to be filtered must satisfy both of them.

If ip-address mask-length  is specified as 0.0.0.0 0, then only the default routes will be matched.

To match all the routes, use 0.0.0.0 0 less-equal 32.

Example

# Define an IP prefix list named p1 to let pass only the routes in the network segment 10.0.192.0/8 and with mask length as 17 or 18.

<Sysname> system-view

[Sysname] ip ip-prefix p1 permit 10.0.192.0 8 greater-equal 17 less-equal 18

3.1.14  reset ip ip-prefix

Syntax

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

View

User view

Parameter

ip-prefix-name: Unique IP prefix list name, in the range 1 to 19 characters.

Description

Use the reset ip ip-prefix command to delete statistics of a specified IPv4 address prefix. If no ip-prefix-name is specified, the statistics of all the IPv4 address prefixes will be deleted.

Example

# Specifies to delete statistics of the specified IPv4 address prefix.

<Sysname> reset ip ip-prefix abc

3.1.15  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 in the range 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: Route policy node.

node-number: Node number in the range 0 to 65535. The node with a smaller node-number will be tested first when the route 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 acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, apply ip-address next-hop, apply cost, apply tag.

Example

# Configure route 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
新华三官网