refresh bgp
Use refresh bgp to manually soft-reset BGP sessions.
Syntax
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | all | external | group group-name | internal } { export | import } ipv4 { multicast | [ unicast ] [ vpn-instance vpn-instance-name ] }
refresh bgp [ instance instance-name ] { ipv6-address [ prefix-length ] | all | external | group group-name | internal } { export | import } ipv6 { multicast | [ unicast ] [ vpn-instance vpn-instance-name ] }
refresh bgp [ instance instance-name ] { ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] | all | external | group group-name | internal } { export | import } link-state
Views
User view
Predefined user roles
network-admin
Parameters
instance instance-name: Specifies a BGP instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify this option, the command soft-resets BGP sessions for the default BGP instance.
ipv4-address: Soft-resets the BGP session to a peer specified by its IP address.
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 soft-resets BGP sessions to all dynamic peers in the subnet.
ipv6-address: Soft-resets the BGP session to a peer specified by its IPv6 address.
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 soft-resets BGP sessions to all dynamic peers in the subnet.
all: Soft-resets all BGP sessions.
external: Soft-resets all EBGP sessions.
group group-name: Soft-resets the BGP sessions to the peers of the specified peer group. The group-name argument refers to the name of a peer group, a case-sensitive string of 1 to 47 characters.
internal: Soft-resets all IBGP sessions.
export: Performs outbound soft-reset (filters routes advertised to the specified peer or peer group by using the new configuration).
import: Performs inbound soft-reset (filters routes received from the specified peer or peer group by using the new configuration).
ipv4: Soft-resets BGP sessions for IPv4 address family.
ipv6: Soft-resets BGP sessions for IPv6 address family.
link-state: Soft-resets BGP sessions for LS address family.
multicast: Soft-resets BGP sessions for multicast address family.
unicast: Soft-resets BGP sessions for unicast address family.
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, this command soft-resets BGP sessions for the specified address family on the public network.
Usage guidelines
A soft-reset operation enables the router to apply a new route selection policy without tearing down BGP connections.
To apply a new policy to outbound BGP sessions, execute this command with the export keyword. The router uses the new policy to filter routing information and sends the routing information that passes the filtering to the BGP peers.
To apply a new policy to inbound sessions, execute this command with the import keyword. The router advertises a route-refresh message to the peer and the peer resends its routing information to the router. After receiving the routing information, the router uses the new policy to filter the routing information.
This command requires that both the local router and the peer support route refresh.
If the peer keep-all-routes command is configured, the refresh bgp import command does not take effect.
By default, the unicast keyword is used if neither the multicast keyword nor the unicast keyword is specified.
Examples
# Soft-reset all inbound BGP sessions for the IPv4 unicast address family.
<Sysname> refresh bgp all import ipv4
Related commands
peer capability-advertise route-refresh
peer keep-all-routes