< Home

import-route (RIP)

Function

The import-route command imports routes from other routing protocols.

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

By default , import no 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 Specifies the protocol of the routes that are imported by RIP. -
permit-ibgp Specifies that IBGP routes are imported by RIP process in public instance. -
process-id Specifies the ID of a process. If the protocol is IS-IS, OSPF, or RIP, the process ID needs to be specified. The value is an integer ranging from 1 to 65535.
cost Specifies the cost of the imported route. If no cost is specified, use the default-cost (RIP) command to set the default cost. The value is an integer ranging from 0 to 15.
transparent Is valid only when BGP routes are imported. The cost of the imported routes is the Multi_Exit Discriminator (MED) value of BGP routes. -
route-policy route-policy-name Specifies the name of the configured routing policy when external routes are imported. The value must be the name of an existing routing policy.

Views

RIP view

Default Level

2: Configuration level

Usage Guidelines

By configuring the routing policy, you can import specific routes and set route attributes.

When the routes to be imported are RIP routes, OSPF routes, or IS-IS routes, the process ID can be specified to import only routes from a specified process. If no process ID is specified, all RIP routes, OSPF routes, or IS-IS routes are imported. When the routes to be imported are static routes or direct routes, no process ID can be specified.

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

  • Run the apply cost command to set the cost of a route.

  • Run the import-route (RIP) command to set the cost of the imported route.

  • Run the default-cost (RIP) command to set the cost of the default route.

  • The length of the Tag field defined by the RIP protocol is 16 bits, whereas the length of the Tag field defined by other routing protocols is 32 bits. If the routes of other routing protocols are imported and the tag is used in the routing policy, ensure that the tag value is not greater than 65535. Otherwise, the routing policy becomes invalid or the matching result is incorrect.
  • You cannot configure permit-ibgp in RIP VPN process (private instance).
  • Import of IBGP routes in RIP process can lead to routing loops. Administrator should take care of routing loops before configuring permit-ibgp.

Example

# Import a route from IS-IS process 7 and set the cost of the route to 7.

<FW> system-view
[FW] rip 1
[FW-rip-1] import-route isis 7 cost 7

# Import IBGP routes in RIP process 1 with cost 5 and route-policy abc.

<FW> system-view
[FW] rip 1
[FW-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 >