Soft-Reconfiguration-Inbound
This scenario demonstrates how to configure the soft-reconfiguration inbound option for a BGP neighbor. When enabled, the router stores all received routes from the neighbor before applying inbound policies. This allows viewing the original routes received (before filtering) using the received-routes command, and enables soft resets to re-apply policies without tearing down the BGP session.
Test iBGP - Neighbor soft-reconfiguration inbound stores routes before filtering
Description
Test to verify that soft-reconfiguration inbound stores received routes before policy filtering. DUT1 advertises two routes (1.1.1.0/24 and 2.2.2.0/24) to DUT0. DUT0 has a prefix-list configured to deny 1.1.1.0/24 and permit all other routes. With soft-reconfiguration inbound enabled, DUT0 stores the original routes received from the neighbor before applying the import policy. This allows verifying that 1.1.1.0/24 does not appear in the BGP routing table because it was filtered, but it is still visible using the received-routes command because soft-reconfiguration inbound preserved the original advertisement.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.10.0.100/24 set protocols bgp 20 neighbor peer remote-address 10.10.0.200 set protocols bgp 20 neighbor peer remote-as 20 set protocols bgp 20 neighbor peer route-map import FILTER-IN set protocols bgp 20 neighbor peer soft-reconfiguration inbound set protocols ip prefix-list DENY-DUM1 rule 10 action deny set protocols ip prefix-list DENY-DUM1 rule 10 prefix 1.1.1.0/24 set protocols ip prefix-list DENY-DUM1 rule 20 action permit set protocols ip prefix-list DENY-DUM1 rule 20 le 32 set protocols ip prefix-list DENY-DUM1 rule 20 prefix 0.0.0.0/0 set protocols route-map FILTER-IN rule 10 action permit set protocols route-map FILTER-IN rule 10 match ip address prefix-list DENY-DUM1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces dummy dum0 address 1.1.1.1/24 set interfaces dummy dum1 address 2.2.2.1/24 set interfaces ethernet eth0 address 10.10.0.200/24 set protocols bgp 20 neighbor peer remote-address 10.10.0.100 set protocols bgp 20 neighbor peer remote-as 20 set protocols bgp 20 redistribute connected set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify iBGP session establishes with soft-reconfiguration inbound enabled.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.10.0.200.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.10.0.100, local AS number 20 VRF default vrf-id 0 BGP table version 2 RIB entries 5, using 640 bytes of memory Peers 1, using 24 KiB of memory Neighbor LocalAddr V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State PfxRcd PfxSnt Desc 10.10.0.200 10.10.0.100 4 20 6 4 2 0 0 00:00:02 Established 2 0 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT0 receives route 2.2.2.0/24 (not filtered by prefix-list).
Step 4: Run command protocols bgp show ip at DUT0 and check if output matches the following regular expressions:
2.2.2.0/24Show output
BGP table version is 2, local router ID is 10.10.0.100, vrf id 0 Default local pref 100, local AS 20 local address - Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *ui 2.2.2.0/24 10.10.0.200 0 100 0 ? *ui 10.10.0.0/24 10.10.0.200 0 100 0 ? Displayed 2 routes and 2 total paths
Attention
Verify that both routes are stored in received-routes (soft-reconfiguration inbound).
Step 5: Run command protocols bgp show ip neighbors neighbor peer received-routes at DUT0 and check if output matches the following regular expressions:
1.1.1.0/24 [\s\S]*2.2.2.0/24Show output
BGP table version is 2, local router ID is 10.10.0.100, vrf id 0 Default local pref 100, local AS 20 local address (null) Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, i internal, r RIB-failure, S Stale, R Removed Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path *> 1.1.1.0/24 10.10.0.200 0 100 0 ? *> 2.2.2.0/24 10.10.0.200 0 100 0 ? *> 10.10.0.0/24 10.10.0.200 0 100 0 ? Total number of prefixes 3 (1 filtered)