< Home

default-route imported

Function

The default-route imported command enables the import the default routes in the local IP routing table to the BGP routing table.

The undo default-route imported command disables the import of the default routes in the local IP routing table 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-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 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 routing table size. If the default-route imported command is run and a default route exists in the local IP routing table, the system imports the default route to the BGP routing table. After default routes are imported, the packets can be transmitted over the default route when no matched routing entry is found in the routing table, preventing packet loss.

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.

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 command needs to be used.

Example

# Import default routes to the BGP routing table.

<HUAWEI> system-view
[HUAWEI] bgp 1
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] default-route imported
[HUAWEI-bgp-af-ipv4] import-route ospf 1
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >