import-route (BGP-IPv4 unicast address family view)

Function

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

The undo import-route command cancels the configuration.

By default, BGP does not import routes from other protocols.

Format

import-route { ospf | isis | rip } process-id [ [ med med ] | [ [ route-policy route-policy-name ] | [ route-filter route-filter-name ] ] ] *

import-route { ospf | isis | rip } process-id [ [ med med ] | [ [ route-policy route-policy-name ] | [ route-filter route-filter-name ] ] ] * [ non-relay-tunnel ]

undo import-route { ospf | isis | rip } process-id

Parameters

Parameter Description Value
ospf

Configures BGP to import OSPF routes.

-

isis

Configures BGP to import IS-IS routes.

-

rip

Configures BGP to import RIP routes.

-

process-id

Specifies the number of a process from which routes are to be imported.

The value is an integer ranging from 1 to 4294967295.

med med

Specifies the MED for imported routes.

The value is an integer ranging from 0 to 4294967295.

route-policy route-policy-name

Specifies the route-policy used to filter routes and modify route attributes when these routes are imported from other protocols.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

route-filter route-filter-name

Specifies the route-filter used to filter routes and modify route attributes when these routes are imported from other protocols.

The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters.

non-relay-tunnel

Configures BGP to import UNR routes.

-

Views

BGP-IPv4 unicast address family view, BGP-Labeled address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

BGP can import routes using the import-route command or network command:

  • The import-route command imports routes of a specified type into the BGP routing table, such as RIP, OSPF, IS-IS, static, or direct routes.
  • The network command imports routes with the specified prefix and mask into the BGP routing table. Compared with the import-route command, the network command imports more specific routes.

    NOTE:

    In most cases, the routes imported by BGP can recurse to tunnels. However, in some other cases, if the routes imported by BGP recurse to tunnels, a problem will occur. For example, in a seamless MPLS scenario, if the egress protection function is configured on egress MASGs between which a tunnel exists and a route imported by BGP on one of the MASGs recurses to the tunnel, this MASG then recurses the route to another tunnel of a different type. In this case, traffic is directed to the other MASG, which slows down traffic switchover. As a result, the egress protection function does not take effect. To address this problem, specify non-relay-tunnel to prevent the routes imported by BGP from recursing to tunnels.

Configuration Impact

If the default-route imported command has not been used when you run the import-route command to import routes from other protocols, BGP cannot import default routes.

Precautions

The import-route route-policy command is mutually exclusive with the import-route route-filter command.

Example

# Import routes from OSPF process 1.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-family unicast
[*HUAWEI-bgp-af-ipv4] import-route ospf 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >