default-route imported (BGP-VPN instance IPv4 address family view)

Function

The default-route imported command imports default routes to the BGP routing table.

The undo default-route imported command restores the default configuration.

By default, default routes are not imported to the BGP routing table.

Format

default-route imported

undo default-route imported

Parameters

None

Views

BGP-labeled VPN instance IPv4 address family view, BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

To import default routes to the BGP routing table, run the default-route imported command. After a default route of another routing protocol is added to the BGP routing table, packets can be transmitted over the default route when no matched route is available in the routing table, preventing packet loss.

Follow-up Procedure

When a device needs to advertise default routes to a peer or peer group and no default route exists in the local routing table, run the peer default-route-advertise command.

If a router in an HoVPN network needs to send the default route associated with a specified VPN instance to a VPNv4 peer or peer group, run the peer default-originate vpn-instance command.

Precautions

To import default routes, you need to run both the default-route imported and import-route commands. If you run only the import-route command, default routes cannot be imported. In addition, the default-route imported command is used to import only the default routes that exist in the local routing table.

Example

# Import default routes to the BGP routing table.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv4-family
[*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-vpn-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-family vpn-instance vpna
[*HUAWEI-bgp-vpna] default-route imported
[*HUAWEI-bgp-vpna] import-route ospf 1
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpna
[*HUAWEI-vpn-instance-vpna] ipv4-family
[*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpna-af-ipv4] quit
[*HUAWEI-vpn-instance-vpna] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-labeled-unicast vpn-instance vpna
[*HUAWEI-bgp-labeled-vpna] default-route imported
[*HUAWEI-bgp-labeled-vpna] import-route ospf 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >