peer keep-all-routes
Use peer keep-all-routes to save all route updates from a peer or peer group, regardless of whether the routes have passed the configured routing policy.
Use undo peer keep-all-routes to remove the configuration.
Syntax
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP IPv4 multicast address family view:
peer { group-name | ipv4-address [ mask-length ] } keep-all-routes
undo peer { group-name | ipv4-address [ mask-length ] } keep-all-routes
In BGP IPv6 unicast address family view:
peer { group-name | ipv6-address [ prefix-length ] } keep-all-routes
undo peer { group-name | ipv6-address [ prefix-length ] } keep-all-routes
In BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:
peer { group-name | ipv6-address [ prefix-length ] } keep-all-routes
undo peer { group-name | ipv6-address [ prefix-length ] } keep-all-routes
Default
Route updates from a peer or peer group are not saved.
Views
BGP IPv4 unicast address family view
BGP-VPN IPv4 unicast address family view
BGP IPv6 unicast address family view
BGP-VPN IPv6 unicast address family view
BGP IPv4 multicast address family view
BGP IPv6 multicast address family view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet, this command saves all route updates from all dynamic peers in the subnet, regardless of whether the routes have passed the configured routing policy.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet, this command saves all route updates from all dynamic peers in the subnet, regardless of whether the routes have passed the configured routing policy.
Usage guidelines
To implement BGP session soft-reset when the local router and a peer or peer group do not support the route refresh feature, use the peer keep-all-routes command. The command saves all route updates received from the peer or peer group. After modifying the route selection policy, filter all saved routes with the new policy to refresh the routing table. This method avoids tearing down BGP sessions.
Examples
# In BGP IPv4 unicast address family view, save all route updates from peer 1.1.1.1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] address-family ipv4 unicast [Sysname-bgp-default-ipv4] peer 1.1.1.1 keep-all-routes
Related commands
peer capability-advertise route-refresh
refresh bgp