default-route imported (BGP)

Function

The default-route imported command enables BGP to add the default route to the BGP routing table.

The undo default-route imported command disables BGP to add the default route to the BGP routing table.

By default, BGP does not add the default route to the BGP routing table.

Format

default-route imported

undo default-route imported

Parameters

None

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv6 unicast address family view, BGP-IPv4 unicast address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This configuration reduces the number of routes on the network and minimizes the size of a routing table.

Configuration Impact

After the default-route imported command is used, the system will add a default route to the local routing table.

After default routes are imported, the packets for destinations not known by the routing table are sent to the default routes.

Precautions

To import default routes, you need to run both the default-route imported command and the import-route (BGP) command. If only the import-route (BGP) command is used, 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.

Follow-up Procedure

When a device needs to advertise default routes to a peer (group) and no default route exists in the local routing table, the peer default-route-advertise (BGP) command needs to be used.

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

Example

# Import a default route to the BGP routing table.

<sysname> system-view
[sysname] ip route-static 0.0.0.0 0 GigabitEthernet 1/0/0
[sysname] bgp 65001
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] default-route imported
[sysname-bgp-af-ipv4] import-route static
Related Topics
import-route (BGP)
peer default-route-advertise
peer default-originate vpn-instance

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.