peer keep-all-routes (BGP)

Function

The peer keep-all-routes command saves all the BGP routing updates from the specified peer or the peer group after the BGP connection is set up, even though those routes do not pass the configured ingress policy.

The undo peer keep-all-routes command disables this function.

By default, only the BGP routing updates received from the peers and passing the configured ingress policy are saved.

Format

peer { group-name | ipv4-address | ipv6-address } keep-all-routes

undo peer { group-name | ipv4-address | ipv6-address } keep-all-routes

Parameters

Parameter Description Value
group-name Specifies the name of the peer group. The name is a string of 1 to 47 characters without any space. It is case-sensitive.
ipv4-address Specifies the IPv4 address of the peer. -
ipv6-address Specifies the IPv6 address of the peer. -
NOTE:
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

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

Only the AntiDDoS8000 series support BGP-VPNv6 address family view.

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After changing a BGP import policy, you must reset BGP connections for the new import policy to take effect, interrupting these BGP connections temporarily. If a device's peer does not support route-refresh, the peer keep-all-routes command can be used on the device to remain all routing updates received from the peer so that the device can refresh its routing table without closing the connection with the peer.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

Precautions

If the router does not support the route-refresh capability, the peer keep-all-routes command needs to be run on the router and its peer. If the peer keep-all-routes command is run on a device for the first time, the sessions between the device and its peers will be re-established.

If the router supports the route-refresh capability, running this command does not result in re-establishment of the sessions between the router and its peers. After the refresh bgp command is run on the router, however, the router does not refresh its routing table.

NOTE:

If the router supports the route-refresh capability, the peer keep-all-routes command does not need to be run on it.

Example

# Save all BGP routing updates from the IPv4 peer.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 200
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] peer 1.1.1.2 keep-all-routes
# Save all BGP routing updates from the IPv6 peer.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] ipv6-family unicast
[sysname-bgp-af-ipv6] peer 1:2::3:4 keep-all-routes
Related Topics
peer capability-advertise
refresh bgp

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