Redistribute
Scenario to verify BGP redistribute connected and redistribute static functionality with metric and route-map filtering options, for both iBGP and eBGP sessions.
Route redistribution injects routes from other sources into BGP:
redistribute connected: Injects routes for directly connected networks (interfaces). DUT0 uses a dummy interface (dum0) to create a connected route.
redistribute static: Injects static routes configured on the router. DUT0 uses a blackhole static route to create the redistributed route.
For each source type, three variants are tested:
Basic: Redistribute without options. DUT1 learns the route and installs it.
With metric: Redistribute with
metric 100(MED). DUT1 learns the route with the specified MED value visible in the BGP table.With route-map: Redistribute with a route-map filter. Only routes matching the route-map criteria are redistributed; others are filtered out. DUT0 has two routes but only one matches the filter.
Each variant is tested with both iBGP (same AS) and eBGP (different AS) sessions.
Test BGP Redistribute
Description
Test BGP redistribute connected and static: basic (DUT1 learns the route), metric (DUT1 learns with MED 100), and route-map (only matching routes redistributed). Each variant tested with iBGP and eBGP.
Scenario
Example 1
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 192.168.10.1/24 set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 redistribute connected set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.100 set protocols bgp 10 neighbor peer remote-as 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 192.168.10.1, local AS number 10 VRF default vrf-id 0 BGP table version 2 RIB entries 3, using 384 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.1.1.1 10.1.1.100 4 10 3 5 2 0 0 00:00:01 Established 0 2 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT1 learns the redistributed route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]ui\s+192.168.10.0/24Show output
BGP table version is 2, local router ID is 10.1.1.1, vrf id 0 Default local pref 100, local AS 10 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 10.1.1.0/24 10.1.1.100 0 100 0 ? *ui 192.168.10.0/24 10.1.1.100 0 100 0 ? Displayed 2 routes and 2 total paths
Attention
Verify that route is installed in routing table.
Step 5: Run command protocols ip show route at DUT1 and check if output matches the following regular expressions:
B>[*]\s+192.168.10.0/24Show output
Codes: K - kernel route, C - connected, L - local, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure IPv4 unicast VRF default: B 10.1.1.0/24 [200/0] via 10.1.1.100 inactive, weight 1, 00:00:00 C>* 10.1.1.0/24 is directly connected, eth0, weight 1, 00:00:03 K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:03 L>* 10.1.1.1/32 is directly connected, eth0, weight 1, 00:00:03 B>* 192.168.10.0/24 [200/0] via 10.1.1.100, eth0, weight 1, 00:00:00
Attention
Verify connectivity to the redistributed network.
Step 6: Ping IP address 192.168.10.1 from DUT1:
admin@DUT1$ ping 192.168.10.1 count 1 size 56 timeout 1Show output
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.245 ms --- 192.168.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.245/0.245/0.245/0.000 ms
Example 2
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 192.168.10.1/24 set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 neighbor peer route-map export PERMIT set protocols bgp 10 redistribute connected set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 20 neighbor peer remote-address 10.1.1.100 set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 neighbor peer route-map import PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 192.168.10.1, local AS number 10 VRF default vrf-id 0 BGP table version 2 RIB entries 3, using 384 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.1.1.1 10.1.1.100 4 20 2 2 0 0 0 00:00:00 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify that DUT1 learns the redistributed route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]u\s+192.168.10.0/24Show output
BGP table version is 2, local router ID is 10.1.1.1, 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 *u 10.1.1.0/24 10.1.1.100 0 0 10 ? *u 192.168.10.0/24 10.1.1.100 0 0 10 ? Displayed 2 routes and 2 total paths
Attention
Verify that route is installed in routing table.
Step 5: Run command protocols ip show route at DUT1 and check if output matches the following regular expressions:
B>[*]\s+192.168.10.0/24Show output
Codes: K - kernel route, C - connected, L - local, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure IPv4 unicast VRF default: B 10.1.1.0/24 [20/0] via 10.1.1.100 inactive, weight 1, 00:00:00 C>* 10.1.1.0/24 is directly connected, eth0, weight 1, 00:00:05 K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:05 L>* 10.1.1.1/32 is directly connected, eth0, weight 1, 00:00:05 B>* 192.168.10.0/24 [20/0] via 10.1.1.100, eth0, weight 1, 00:00:00
Attention
Verify connectivity to the redistributed network.
Step 6: Ping IP address 192.168.10.1 from DUT1:
admin@DUT1$ ping 192.168.10.1 count 1 size 56 timeout 1Show output
PING 192.168.10.1 (192.168.10.1) 56(84) bytes of data. 64 bytes from 192.168.10.1: icmp_seq=1 ttl=64 time=0.407 ms --- 192.168.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.407/0.407/0.407/0.000 ms
Example 3
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 192.168.10.1/24 set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 redistribute connected metric 100 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.100 set protocols bgp 10 neighbor peer remote-as 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 192.168.10.1, local AS number 10 VRF default vrf-id 0 BGP table version 2 RIB entries 3, using 384 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.1.1.1 10.1.1.100 4 10 3 6 2 0 0 00:00:01 Established 0 2 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT1 learns the route 192.168.10.0/24 with MED 100.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]ui\s+192.168.10.0/24.+\s100\sShow output
BGP table version is 2, local router ID is 10.1.1.1, vrf id 0 Default local pref 100, local AS 10 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 10.1.1.0/24 10.1.1.100 100 100 0 ? *ui 192.168.10.0/24 10.1.1.100 100 100 0 ? Displayed 2 routes and 2 total paths
Example 4
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 192.168.10.1/24 set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 neighbor peer route-map export PERMIT set protocols bgp 10 redistribute connected metric 100 set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 20 neighbor peer remote-address 10.1.1.100 set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 neighbor peer route-map import PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 192.168.10.1, local AS number 10 VRF default vrf-id 0 BGP table version 2 RIB entries 3, using 384 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.1.1.1 10.1.1.100 4 20 2 2 0 0 0 00:00:00 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify that DUT1 learns the route 192.168.10.0/24 with MED 100.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]u\s+192.168.10.0/24.+\s100\sShow output
BGP table version is 2, local router ID is 10.1.1.1, 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 *u 10.1.1.0/24 10.1.1.100 100 0 10 ? *u 192.168.10.0/24 10.1.1.100 100 0 10 ? Displayed 2 routes and 2 total paths
Example 5
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 192.168.10.1/24 set interfaces dummy dum1 address 192.168.20.1/24 set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 redistribute connected route-map FILTER-CONNECTED set protocols route-map FILTER-CONNECTED rule 1 action permit set protocols route-map FILTER-CONNECTED rule 1 match interface dum0 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.100 set protocols bgp 10 neighbor peer remote-as 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 192.168.20.1, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 10 3 4 1 0 0 00:00:01 Established 0 1 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT1 learns only the matching route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>i\s+192.168.10.0/24Show output
BGP table version is 1, local router ID is 10.1.1.1, vrf id 0 Default local pref 100, local AS 10 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 *>i 192.168.10.0/24 10.1.1.100 0 100 0 ? Displayed 1 routes and 1 total paths
Example 6
Step 1: Set the following configuration in DUT0 :
set interfaces dummy dum0 address 192.168.10.1/24 set interfaces dummy dum1 address 192.168.20.1/24 set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 neighbor peer route-map export PERMIT set protocols bgp 10 redistribute connected route-map FILTER-CONNECTED set protocols route-map FILTER-CONNECTED rule 1 action permit set protocols route-map FILTER-CONNECTED rule 1 match interface dum0 set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 20 neighbor peer remote-address 10.1.1.100 set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 neighbor peer route-map import PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 192.168.20.1, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 20 2 2 0 0 0 00:00:00 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify that DUT1 learns only the matching route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>\s+192.168.10.0/24Show output
BGP table version is 1, local router ID is 10.1.1.1, 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 *> 192.168.10.0/24 10.1.1.100 0 0 10 ? Displayed 1 routes and 1 total paths
Example 7
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 redistribute static set protocols static route 192.168.10.0/24 blackhole set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.100 set protocols bgp 10 neighbor peer remote-as 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 10 3 4 1 0 0 00:00:01 Established 0 1 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT1 learns the redistributed route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>i\s+192.168.10.0/24Show output
BGP table version is 1, local router ID is 10.1.1.1, vrf id 0 Default local pref 100, local AS 10 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 *>i 192.168.10.0/24 10.1.1.100 0 100 0 ? Displayed 1 routes and 1 total paths
Attention
Verify that route is installed in routing table.
Step 5: Run command protocols ip show route at DUT1 and check if output matches the following regular expressions:
B>[*]\s+192.168.10.0/24Show output
Codes: K - kernel route, C - connected, L - local, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure IPv4 unicast VRF default: C>* 10.1.1.0/24 is directly connected, eth0, weight 1, 00:00:03 K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:03 L>* 10.1.1.1/32 is directly connected, eth0, weight 1, 00:00:03 B>* 192.168.10.0/24 [200/0] via 10.1.1.100, eth0, weight 1, 00:00:00
Example 8
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 neighbor peer route-map export PERMIT set protocols bgp 10 redistribute static set protocols route-map PERMIT rule 1 action permit set protocols static route 192.168.10.0/24 blackhole set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 20 neighbor peer remote-address 10.1.1.100 set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 neighbor peer route-map import PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 20 2 2 0 0 0 00:00:00 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify that DUT1 learns the redistributed route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>\s+192.168.10.0/24Show output
BGP table version is 1, local router ID is 10.1.1.1, 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 *> 192.168.10.0/24 10.1.1.100 0 0 10 ? Displayed 1 routes and 1 total paths
Attention
Verify that route is installed in routing table.
Step 5: Run command protocols ip show route at DUT1 and check if output matches the following regular expressions:
B>[*]\s+192.168.10.0/24Show output
Codes: K - kernel route, C - connected, L - local, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure IPv4 unicast VRF default: C>* 10.1.1.0/24 is directly connected, eth0, weight 1, 00:00:03 K * 10.1.1.0/24 [0/0] is directly connected, eth0, weight 1, 00:00:03 L>* 10.1.1.1/32 is directly connected, eth0, weight 1, 00:00:03 B>* 192.168.10.0/24 [20/0] via 10.1.1.100, eth0, weight 1, 00:00:01
Example 9
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 redistribute static metric 100 set protocols static route 192.168.10.0/24 blackhole set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.100 set protocols bgp 10 neighbor peer remote-as 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 10 3 5 1 0 0 00:00:02 Established 0 1 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT1 learns the route 192.168.10.0/24 with MED 100.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>i\s+192.168.10.0/24.+\s100\sShow output
BGP table version is 1, local router ID is 10.1.1.1, vrf id 0 Default local pref 100, local AS 10 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 *>i 192.168.10.0/24 10.1.1.100 100 100 0 ? Displayed 1 routes and 1 total paths
Example 10
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 neighbor peer route-map export PERMIT set protocols bgp 10 redistribute static metric 100 set protocols route-map PERMIT rule 1 action permit set protocols static route 192.168.10.0/24 blackhole set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 20 neighbor peer remote-address 10.1.1.100 set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 neighbor peer route-map import PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 20 2 2 0 0 0 00:00:00 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify that DUT1 learns the route 192.168.10.0/24 with MED 100.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>\s+192.168.10.0/24.+\s100\sShow output
BGP table version is 1, local router ID is 10.1.1.1, 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 *> 192.168.10.0/24 10.1.1.100 100 0 10 ? Displayed 1 routes and 1 total paths
Example 11
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 10 set protocols bgp 10 redistribute static route-map FILTER-STATIC set protocols ip prefix-list STATIC0 rule 1 action permit set protocols ip prefix-list STATIC0 rule 1 prefix 192.168.10.0/24 set protocols route-map FILTER-STATIC rule 1 action permit set protocols route-map FILTER-STATIC rule 1 match ip address prefix-list STATIC0 set protocols static route 192.168.10.0/24 blackhole set protocols static route 192.168.20.0/24 blackhole set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.100 set protocols bgp 10 neighbor peer remote-as 10 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 10 3 4 1 0 0 00:00:01 Established 0 1 FRRouting/10.4.1 Total number of neighbors 1
Attention
Verify that DUT1 learns only the matching route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>i\s+192.168.10.0/24Show output
BGP table version is 1, local router ID is 10.1.1.1, vrf id 0 Default local pref 100, local AS 10 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 *>i 192.168.10.0/24 10.1.1.100 0 100 0 ? Displayed 1 routes and 1 total paths
Example 12
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.1.1.100/24 set protocols bgp 10 neighbor peer remote-address 10.1.1.1 set protocols bgp 10 neighbor peer remote-as 20 set protocols bgp 10 neighbor peer route-map export PERMIT set protocols bgp 10 redistribute static route-map FILTER-STATIC set protocols ip prefix-list STATIC0 rule 1 action permit set protocols ip prefix-list STATIC0 rule 1 prefix 192.168.10.0/24 set protocols route-map FILTER-STATIC rule 1 action permit set protocols route-map FILTER-STATIC rule 1 match ip address prefix-list STATIC0 set protocols route-map PERMIT rule 1 action permit set protocols static route 192.168.10.0/24 blackhole set protocols static route 192.168.20.0/24 blackhole set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.1.1.1/24 set protocols bgp 20 neighbor peer remote-address 10.1.1.100 set protocols bgp 20 neighbor peer remote-as 10 set protocols bgp 20 neighbor peer route-map import PERMIT set protocols route-map PERMIT rule 1 action permit set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Attention
Verify BGP session is established between DUT0 and DUT1.
Step 3: Run command protocols bgp show ip summary at DUT0 and check if output matches the following regular expressions:
10.1.1.1.*EstablishedShow output
IPv4 Unicast Summary: BGP router identifier 10.1.1.100, local AS number 10 VRF default vrf-id 0 BGP table version 1 RIB entries 1, using 128 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.1.1.1 10.1.1.100 4 20 2 2 0 0 0 00:00:00 Established (Policy) 0 N/A Total number of neighbors 1
Attention
Verify that DUT1 learns only the matching route 192.168.10.0/24.
Step 4: Run command protocols bgp show ip at DUT1 and check if output matches the following regular expressions:
[*]>\s+192.168.10.0/24Show output
BGP table version is 1, local router ID is 10.1.1.1, 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 *> 192.168.10.0/24 10.1.1.100 0 0 10 ? Displayed 1 routes and 1 total paths