< Home

import-route (RIP)

Function

The import-route command configures RIP to import routes from other routing protocols.

The undo import-route command disables RIP from importing routes from other routing protocols.

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

Format

import-route bgp [ permit-ibgp ] [ cost { cost | transparent } | route-policy route-policy-name ] *

import-route { { static | direct | unr } | { { rip | ospf | isis } [ process-id ] } } [ cost cost | route-policy route-policy-name ] *

undo import-route { { static | direct | bgp | unr } | { { rip | ospf | isis } [ process-id ] } }

Parameters

Parameter Description Value
bgp | static | direct | rip | ospf | isis | unr Specifies the routing protocol from which RIP imports routes. -
permit-ibgp Imports routes from IBGP to RIP. -
process-id Specifies a process ID. The process ID can be specified when you import routes from RIP, OSPF, or IS-IS to RIP. The value is an integer that ranges from 1 to 65535.
cost cost Specifies the metric for imported routes. The value is an integer that ranges from 0 to 15.
cost transparent This parameter is valid only when RIP imports routes from BGP. The metric of the imported routes is the MED of the BGP routes. -
route-policy route-policy-name Specifies the routing policy for importing routes. The name is a string of 1 to 40 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

RIP view

Default Level

2: Configuration level

Usage Guidelines

After you run the import-route command to set a routing policy, RIP can import only the specified routes and sets the route attributes.

To import routes from RIP, or IS-IS, you can specify the process ID. If the process ID is specified, RIP imports routes only from the specified process. If no process ID is specified, RIP imports routes from all processes. When a static or direct route is imported, the process ID cannot be specified.

You can run one of the following commands to set the metric of the imported routes. The following commands are listed in the descending order of priorities.

  • Run the apply cost command to set route metric.

  • Run the import-route (RIP) command to set the metric for imported routes.

  • Run the default-cost (RIP) command to set the default metric for routes.

  • RIP defines a 16-bit tag, while other routing protocols define 32-bit tags. If the routes of other protocols are imported to RIP and the tag is used in the routing policy, the tag value cannot exceed 65535. If the tag value exceeds 65535, the routing policy becomes invalid or the matching result is incorrect.

  • After the import-route direct command is executed, routes to the network segment where the IP address of the management interface belongs are also imported in the RIP routing table. Therefore, use this command with caution.

  • The permit-ibgp parameter cannot be set for the RIP VPN instance.
  • Importing IBGP routes to RIP may cause routing loops.

Example

# Import IBGP routes, which are filtered by policy abc, to RIP process 1 and set the metric to 5.

<HUAWEI> system-view
[HUAWEI] rip 1
[HUAWEI-rip-1] import-route bgp permit-ibgp cost 5 route-policy abc
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >