Course contents

Module 4: BGP PolicyLesson 4.7 (7 of 8 in this module)29 of 43 in the BGP course

Applying policy changes: route refresh and soft reconfiguration

You change a route map and nothing happens. BGP does not re-run policy on routes it already accepted. There is a safe way to make it, and a heavy-handed way you should avoid.

Advanced · 11 min read

You'll learn to apply a new inbound or outbound policy with a soft reset, explain how route refresh works, and say when soft-reconfiguration inbound is needed.

Policy is not retroactive

When a route arrives, BGP runs your inbound policy once and stores the result. Edit the route map afterwards and the stored routes keep their old attributes. Outbound is the same: routes already advertised are not re-evaluated. Something has to ask for them again.

Where each show command looks in the BGP pipeline
Where each show command looks in the BGP pipelineRoutes from ISP A pass an unmodified copy kept by soft reconfiguration, then the inbound policy, then the BGP table, then the outbound policy, then go to the neighbour. The received-routes command shows the unmodified copy, the routes command shows what passed the inbound policy, and advertised-routes shows what is sent.FromISP AUnmodifiedcopyInboundpolicyBGP tableshow ip bgpOutboundpolicyToISP Apre-policyreceived-routesroutesadvertised-routesshow ip bgp neighbors 192.0.2.1 received-routes | routes | advertised-routesThe first one needs neighbor ... soft-reconfiguration inbound.

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Soft reconfiguration inbound keeps the pre-policy copy, which is why received-routes only works when it is configured.

The wrong way and the right way

A hard reset (clear ip bgp 192.0.2.1) closes the TCP connection. The session drops, every route from that neighbour is withdrawn, and the full table is exchanged again. On a router with two providers, that is an outage for the traffic that depended on that neighbour.

A soft reset keeps the session up and re-runs policy. The outbound and inbound directions work differently.

Applying a policy change with a soft reset
Applying a policy change with a soft resetR1 changes its inbound policy, sends a ROUTE-REFRESH message for IPv4 unicast to ISP A, ISP A sends its routes again in UPDATE messages, and R1 applies the new policy. The session stays up throughout.R1ISP A1 Policy changed2 ROUTE-REFRESH (IPv4 unicast)3 UPDATE messages: the routes again4 Policy appliedThe session stays up the whole time

On small screens, swipe sideways or focus the diagram and use the arrow keys.

A soft inbound reset asks the neighbour to resend. A hard reset closes the TCP session and rebuilds everything.
clear ip bgp 192.0.2.1 soft in clear ip bgp 192.0.2.1 soft out

Privileged EXEC mode. soft in asks the neighbour to send its routes again so inbound policy can be applied. soft out re-runs outbound policy on the routes you hold and sends the differences.

Behind soft in is the route refresh capability (RFC 2918). Both routers say they support it when the session opens. Your router then sends a ROUTE-REFRESH message and the neighbour replies with its full set of routes for that address family, which is why this works even though your router did not keep a copy.

Check support and timing

Check before you refresh
Check before you refreshBoth peers must support the capability.Capabilityshow ip bgp neighborsRequestclear ip bgp inCountersreceived rises

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Confirm the capability, then request the refresh, then watch the counters.
Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip bgp neighbors 192.0.2.1 | include refresh
    Route refresh: advertised and received(new)
The first line confirms both sides support route refresh, so soft in will work. If the capability is missing, soft in needs the older soft-reconfiguration approach below.

Soft-reconfiguration inbound: a cost

The older method stores an unmodified copy of everything the neighbour sent, so policy can be re-run locally without asking. It costs memory in proportion to the number of routes received.

Two ways to reapply inbound policy
Two ways to reapply inbound policyRoute refresh asks the neighbour again. Soft-reconfiguration keeps a copy.Route refreshNo extra memoryNeeds peer supportsoft-reconfigurationStores unfiltered routesCosts memoryor

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The copy costs memory for every prefix received.
router bgp 64500 address-family ipv4 unicast neighbor 192.0.2.1 soft-reconfiguration inbound

R1. Needed only if a neighbour lacks route refresh, or if you want show ip bgp neighbors received-routes to show routes before your policy.

Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip bgp neighbors 192.0.2.1 received-routes
     Network          Next Hop            Metric LocPrf Weight Path
     203.0.113.0      192.0.2.1                0             0 64501 i

Total number of prefixes 1
This only works if soft-reconfiguration inbound is configured. It shows routes as received, before inbound policy. Compare it with show ip bgp neighbors 192.0.2.1 routes, which shows what was accepted.

Technical reference: RFC 2918, Route Refresh Capability for BGP-4. Output above is illustrative.

Check your understanding

Predict · scenario 1

You edited an inbound route map. show ip bgp still shows old attributes. What is the least disruptive fix?

Predict · scenario 2

Why does soft out not need a message to the neighbour first?

Predict · scenario 3

What is the main drawback of soft-reconfiguration inbound?

FAQ

Is clear ip bgp * safe in production?
A hard reset tears down every session, withdraws all routes and forces full table exchange again, which causes an outage. Use a soft reset unless the session is genuinely broken.
How do I know if my neighbour supports route refresh?
Look in show ip bgp neighbors for Route refresh: advertised and received under neighbor capabilities. Current IOS XE does by default.
Do I still need soft-reconfiguration inbound?
Only to see the routes a neighbour sent before your inbound policy changed them, or if the neighbour does not support route refresh. It stores a second copy of every received route.