Redistribute Ospfv6

Scenario to verify BGP address-family ipv6-unicast redistribute ospf6 functionality with metric and route-map filtering options.

../../../../../../_images/redistributeospfv6.svg

Test BGP IPv6 Redistribute OSPFv3 iBGP

Description

Test BGP address-family ipv6-unicast redistribute ospf6 with iBGP. DUT0 runs OSPFv3 and announces a dummy interface route. DUT1 (OSPFv3 + BGP AS 10) learns the route via OSPFv3 and redistributes it into BGP. DUT2 (BGP AS 10) learns the OSPFv3 route through iBGP redistribution.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum0 ipv6 ospfv3 area 0
set interfaces ethernet eth0 address '2001:db8:1::1/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set protocols ospfv3 parameters router-id 2.2.2.2
set protocols ospfv3 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 '2001:db8:1::100/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set interfaces ethernet eth1 address '2001:db8:2::100/64'
set protocols bgp 10 address-family ipv6-unicast redistribute ospf6
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer nexthop-self
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::2'
set protocols bgp 10 neighbor peer remote-as 10
set protocols bgp 10 parameters router-id 1.1.1.1
set protocols ospfv3 parameters router-id 1.1.1.1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth1 address '2001:db8:2::2/64'
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::100'
set protocols bgp 10 neighbor peer remote-as 10
set protocols bgp 10 parameters router-id 1.1.1.2
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify OSPFv3 neighbor is established between DUT0 and DUT1

Step 4: Run command protocols ospfv3 show neighbor at DUT1 and check if output matches the following regular expressions:

2.2.2.2.*Full
Show output
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:30     Full/DR              00:00:04 eth0[BDR]

Attention

Verify DUT1 learns the OSPFv3 route 2001:db8:100::/64 from DUT0

Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:04
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:52
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:54
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:52
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:53
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:54
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:53
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:04
C * fe80::/64 is directly connected, eth1, weight 1, 00:00:52
C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:52

Attention

Verify BGP session is established between DUT1 and DUT2

Step 6: Run command protocols bgp show ipv6 summary at DUT1 and check if output matches the following regular expressions:

2001:db8:2::2.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 10 VRF default vrf-id 0
BGP table version 2
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
2001:db8:2::2   0.0.0.0         4         10         5         6        2    0    0 00:00:49  Established        0        1 FRRouting/10.4.1

Total number of neighbors 1

Attention

Verify DUT2 learns the redistributed OSPFv3 route 2001:db8:100::/64 via BGP

Step 7: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:

[*]>i\s+2001:db8:100::/64
Show output
BGP table version is 1, local router ID is 1.1.1.2, 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 2001:db8:100::/64
                    fe80::dcad:beff:feef:6c11
                                            20    100      0 ?

Displayed 1 routes and 1 total paths

Attention

Verify that route is installed in routing table

Step 8: Run command protocols ipv6 show route at DUT2 and check if output matches the following regular expressions:

B>[*]\s+2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:50
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:52
L>* 2001:db8:2::2/128 is directly connected, eth1, weight 1, 00:00:50
B>* 2001:db8:100::/64 [200/20] via fe80::dcad:beff:feef:6c11, eth1, weight 1, 00:00:05
C>* fe80::/64 is directly connected, eth1, weight 1, 00:00:50

Test BGP IPv6 Redistribute OSPFv3 eBGP

Description

Test BGP address-family ipv6-unicast redistribute ospf6 with eBGP. DUT0 runs OSPFv3 and announces a dummy interface route. DUT1 (OSPFv3 + BGP AS 10) learns the route via OSPFv3 and redistributes it into BGP. DUT2 (BGP AS 20) learns the OSPFv3 route through eBGP redistribution.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum0 ipv6 ospfv3 area 0
set interfaces ethernet eth0 address '2001:db8:1::1/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set protocols ospfv3 parameters router-id 2.2.2.2
set protocols ospfv3 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 '2001:db8:1::100/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set interfaces ethernet eth1 address '2001:db8:2::100/64'
set protocols bgp 10 address-family ipv6-unicast redistribute ospf6
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer address-family ipv6-unicast route-map export PERMIT
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::2'
set protocols bgp 10 neighbor peer remote-as 20
set protocols bgp 10 parameters router-id 1.1.1.1
set protocols ospfv3 parameters router-id 1.1.1.1
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth1 address '2001:db8:2::2/64'
set protocols bgp 20 neighbor peer address-family ipv6-unicast activate
set protocols bgp 20 neighbor peer address-family ipv6-unicast route-map import PERMIT
set protocols bgp 20 neighbor peer remote-address '2001:db8:2::100'
set protocols bgp 20 neighbor peer remote-as 10
set protocols bgp 20 parameters router-id 1.1.1.2
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify OSPFv3 neighbor is established between DUT0 and DUT1

Step 4: Run command protocols ospfv3 show neighbor at DUT1 and check if output matches the following regular expressions:

2.2.2.2.*Full
Show output
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:31     Full/DR              00:00:03 eth0[BDR]

Attention

Verify DUT1 learns the OSPFv3 route 2001:db8:100::/64 from DUT0

Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:03
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:52
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:52
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:52
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:53
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:52
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:03
C * fe80::/64 is directly connected, eth0, weight 1, 00:00:52
C>* fe80::/64 is directly connected, eth1, weight 1, 00:00:52

Attention

Verify BGP session is established between DUT1 and DUT2

Step 6: Run command protocols bgp show ipv6 summary at DUT1 and check if output matches the following regular expressions:

2001:db8:2::2.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 10 VRF default vrf-id 0
BGP table version 2
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
2001:db8:2::2   0.0.0.0         4         20         7         7        2    0    0 00:00:50  Established (Policy)        1 N/A

Total number of neighbors 1

Attention

Verify DUT2 learns the redistributed OSPFv3 route 2001:db8:100::/64 via BGP

Step 7: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:

[*]>\s+2001:db8:100::/64
Show output
BGP table version is 1, local router ID is 1.1.1.2, 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
 *>  2001:db8:100::/64
                    fe80::dcad:beff:feef:6c11
                                            20             0 10 ?

Displayed 1 routes and 1 total paths

Attention

Verify that route is installed in routing table

Step 8: Run command protocols ipv6 show route at DUT2 and check if output matches the following regular expressions:

B>[*]\s+2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:51
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:52
L>* 2001:db8:2::2/128 is directly connected, eth1, weight 1, 00:00:51
B>* 2001:db8:100::/64 [20/20] via fe80::dcad:beff:feef:6c11, eth1, weight 1, 00:00:04
C>* fe80::/64 is directly connected, eth1, weight 1, 00:00:50

Test BGP IPv6 Redistribute OSPFv3 With Metric iBGP

Description

Test BGP address-family ipv6-unicast redistribute ospf6 metric with iBGP. DUT1 redistributes OSPFv3 routes with metric 100 (MED). DUT2 learns the route with MED 100.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum0 ipv6 ospfv3 area 0
set interfaces ethernet eth0 address '2001:db8:1::1/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set protocols ospfv3 parameters router-id 2.2.2.2
set protocols ospfv3 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 '2001:db8:1::100/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set interfaces ethernet eth1 address '2001:db8:2::100/64'
set protocols bgp 10 address-family ipv6-unicast redistribute ospf6 metric 100
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer nexthop-self
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::2'
set protocols bgp 10 neighbor peer remote-as 10
set protocols bgp 10 parameters router-id 1.1.1.1
set protocols ospfv3 parameters router-id 1.1.1.1
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth1 address '2001:db8:2::2/64'
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::100'
set protocols bgp 10 neighbor peer remote-as 10
set protocols bgp 10 parameters router-id 1.1.1.2
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify OSPFv3 neighbor is established between DUT0 and DUT1

Step 4: Run command protocols ospfv3 show neighbor at DUT1 and check if output matches the following regular expressions:

2.2.2.2.*Full
Show output
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:32     Full/DR              00:00:02 eth0[BDR]

Attention

Verify DUT1 learns the OSPFv3 route 2001:db8:100::/64 from DUT0

Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s+2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:02
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:52
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:52
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:53
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:54
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:53
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
C * fe80::/64 is directly connected, eth0, weight 1, 00:00:52
C>* fe80::/64 is directly connected, eth1, weight 1, 00:00:52

Attention

Verify BGP session is established between DUT1 and DUT2

Step 6: Run command protocols bgp show ipv6 summary at DUT1 and check if output matches the following regular expressions:

2001:db8:2::2.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 10 VRF default vrf-id 0
BGP table version 2
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
2001:db8:2::2   0.0.0.0         4         10         6         9        2    0    0 00:00:50  Established        0        1 FRRouting/10.4.1

Total number of neighbors 1

Attention

Verify DUT2 learns route 2001:db8:100::/64 with MED 100

Step 7: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:

2001:db8:100::/64[\s\S]+100
Show output
BGP table version is 1, local router ID is 1.1.1.2, 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 2001:db8:100::/64
                    fe80::dcad:beff:feef:6c11
                                           100    100      0 ?

Displayed 1 routes and 1 total paths

Test BGP IPv6 Redistribute OSPFv3 With Metric eBGP

Description

Test BGP address-family ipv6-unicast redistribute ospf6 metric with eBGP. DUT1 (BGP AS 10) redistributes OSPFv3 routes with metric 100 (MED) to DUT2 (BGP AS 20).

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum0 ipv6 ospfv3 area 0
set interfaces ethernet eth0 address '2001:db8:1::1/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set protocols ospfv3 parameters router-id 2.2.2.2
set protocols ospfv3 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 '2001:db8:1::100/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set interfaces ethernet eth1 address '2001:db8:2::100/64'
set protocols bgp 10 address-family ipv6-unicast redistribute ospf6 metric 100
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer address-family ipv6-unicast route-map export PERMIT
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::2'
set protocols bgp 10 neighbor peer remote-as 20
set protocols bgp 10 parameters router-id 1.1.1.1
set protocols ospfv3 parameters router-id 1.1.1.1
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth1 address '2001:db8:2::2/64'
set protocols bgp 20 neighbor peer address-family ipv6-unicast activate
set protocols bgp 20 neighbor peer address-family ipv6-unicast route-map import PERMIT
set protocols bgp 20 neighbor peer remote-address '2001:db8:2::100'
set protocols bgp 20 neighbor peer remote-as 10
set protocols bgp 20 parameters router-id 1.1.1.2
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify OSPFv3 neighbor is established between DUT0 and DUT1

Step 4: Run command protocols ospfv3 show neighbor at DUT1 and check if output matches the following regular expressions:

2.2.2.2.*Full
Show output
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:31     Full/DR              00:00:03 eth0[BDR]

Attention

Verify DUT1 learns the OSPFv3 route 2001:db8:100::/64 from DUT0

Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s+2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:02
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:51
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:51
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:52
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:53
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:52
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
C * fe80::/64 is directly connected, eth1, weight 1, 00:00:52
C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:52

Attention

Verify BGP session is established between DUT1 and DUT2

Step 6: Run command protocols bgp show ipv6 summary at DUT1 and check if output matches the following regular expressions:

2001:db8:2::2.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 10 VRF default vrf-id 0
BGP table version 2
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
2001:db8:2::2   0.0.0.0         4         20         5         8        2    0    0 00:00:50  Established (Policy)        1 N/A

Total number of neighbors 1

Attention

Verify DUT2 learns route 2001:db8:100::/64 with MED 100

Step 7: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:

2001:db8:100::/64[\s\S]+100
Show output
BGP table version is 1, local router ID is 1.1.1.2, 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
 *>  2001:db8:100::/64
                    fe80::dcad:beff:feef:6c11
                                           100             0 10 ?

Displayed 1 routes and 1 total paths

Test BGP IPv6 Redistribute OSPFv3 With Route-Map iBGP

Description

Test BGP address-family ipv6-unicast redistribute ospf6 route-map with iBGP. DUT0 announces two OSPFv3 networks (dum0 and dum1) via OSPFv3. DUT1 uses a route-map to only redistribute 2001:db8:100::/64 to BGP. DUT2 learns only the matching route, while 2001:db8:200::/64 is filtered out.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum0 ipv6 ospfv3 area 0
set interfaces dummy dum1 address '2001:db8:200::1/64'
set interfaces dummy dum1 ipv6 ospfv3 area 0
set interfaces ethernet eth0 address '2001:db8:1::1/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set protocols ospfv3 parameters router-id 2.2.2.2
set protocols ospfv3 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 '2001:db8:1::100/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set interfaces ethernet eth1 address '2001:db8:2::100/64'
set protocols bgp 10 address-family ipv6-unicast redistribute ospf6 route-map FILTER-OSPF
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer nexthop-self
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::2'
set protocols bgp 10 neighbor peer remote-as 10
set protocols bgp 10 parameters router-id 1.1.1.1
set protocols ipv6 prefix-list ALLOW-DUM0 rule 1 action permit
set protocols ipv6 prefix-list ALLOW-DUM0 rule 1 prefix '2001:db8:100::/64'
set protocols ospfv3 parameters router-id 1.1.1.1
set protocols route-map FILTER-OSPF rule 1 action permit
set protocols route-map FILTER-OSPF rule 1 match ipv6 address prefix-list ALLOW-DUM0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth1 address '2001:db8:2::2/64'
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::100'
set protocols bgp 10 neighbor peer remote-as 10
set protocols bgp 10 parameters router-id 1.1.1.2
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify OSPFv3 neighbor is established between DUT0 and DUT1

Step 4: Run command protocols ospfv3 show neighbor at DUT1 and check if output matches the following regular expressions:

2.2.2.2.*Full
Show output
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:31     Full/DR              00:00:03 eth0[BDR]

Attention

Verify DUT1 learns both OSPFv3 routes from DUT0

Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s+2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:02
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:51
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:51
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:51
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:53
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:51
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
O>* 2001:db8:200::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
C * fe80::/64 is directly connected, eth0, weight 1, 00:00:51
C>* fe80::/64 is directly connected, eth1, weight 1, 00:00:51

Step 6: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s+2001:db8:200::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:02
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:51
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:51
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:51
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:53
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:51
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
O>* 2001:db8:200::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:02
C * fe80::/64 is directly connected, eth0, weight 1, 00:00:51
C>* fe80::/64 is directly connected, eth1, weight 1, 00:00:51

Attention

Verify BGP session is established between DUT1 and DUT2

Step 7: Run command protocols bgp show ipv6 summary at DUT1 and check if output matches the following regular expressions:

2001:db8:2::2.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 10 VRF default vrf-id 0
BGP table version 2
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
2001:db8:2::2   0.0.0.0         4         10         5         6        2    0    0 00:00:49  Established        0        1 FRRouting/10.4.1

Total number of neighbors 1

Attention

Verify DUT2 learns only 2001:db8:100::/64 (matching route-map)

Step 8: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:

[*]>i\s+2001:db8:100::/64
Show output
BGP table version is 1, local router ID is 1.1.1.2, 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 2001:db8:100::/64
                    fe80::dcad:beff:feef:6c11
                                            20    100      0 ?

Displayed 1 routes and 1 total paths

Test BGP IPv6 Redistribute OSPFv3 With Route-Map eBGP

Description

Test BGP address-family ipv6-unicast redistribute ospf6 route-map with eBGP. DUT0 announces two OSPFv3 networks (dum0 and dum1) via OSPFv3. DUT1 (BGP AS 10) uses a route-map to only redistribute 2001:db8:100::/64 to BGP. DUT2 (BGP AS 20) learns only the matching route.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address '2001:db8:100::1/64'
set interfaces dummy dum0 ipv6 ospfv3 area 0
set interfaces dummy dum1 address '2001:db8:200::1/64'
set interfaces dummy dum1 ipv6 ospfv3 area 0
set interfaces ethernet eth0 address '2001:db8:1::1/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set protocols ospfv3 parameters router-id 2.2.2.2
set protocols ospfv3 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 '2001:db8:1::100/64'
set interfaces ethernet eth0 ipv6 ospfv3 area 0
set interfaces ethernet eth1 address '2001:db8:2::100/64'
set protocols bgp 10 address-family ipv6-unicast redistribute ospf6 route-map FILTER-OSPF
set protocols bgp 10 neighbor peer address-family ipv6-unicast activate
set protocols bgp 10 neighbor peer address-family ipv6-unicast route-map export PERMIT
set protocols bgp 10 neighbor peer remote-address '2001:db8:2::2'
set protocols bgp 10 neighbor peer remote-as 20
set protocols bgp 10 parameters router-id 1.1.1.1
set protocols ipv6 prefix-list ALLOW-DUM0 rule 1 action permit
set protocols ipv6 prefix-list ALLOW-DUM0 rule 1 prefix '2001:db8:100::/64'
set protocols ospfv3 parameters router-id 1.1.1.1
set protocols route-map FILTER-OSPF rule 1 action permit
set protocols route-map FILTER-OSPF rule 1 match ipv6 address prefix-list ALLOW-DUM0
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth1 address '2001:db8:2::2/64'
set protocols bgp 20 neighbor peer address-family ipv6-unicast activate
set protocols bgp 20 neighbor peer address-family ipv6-unicast route-map import PERMIT
set protocols bgp 20 neighbor peer remote-address '2001:db8:2::100'
set protocols bgp 20 neighbor peer remote-as 10
set protocols bgp 20 parameters router-id 1.1.1.2
set protocols route-map PERMIT rule 1 action permit
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Attention

Verify OSPFv3 neighbor is established between DUT0 and DUT1

Step 4: Run command protocols ospfv3 show neighbor at DUT1 and check if output matches the following regular expressions:

2.2.2.2.*Full
Show output
Neighbor ID     Pri    DeadTime    State/IfState         Duration I/F[State]
2.2.2.2           1    00:00:31     Full/DR              00:00:03 eth0[BDR]

Attention

Verify DUT1 learns both OSPFv3 routes from DUT0

Step 5: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s+2001:db8:100::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:03
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:51
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:51
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:52
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:53
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:52
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:03
O>* 2001:db8:200::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:03
C * fe80::/64 is directly connected, eth1, weight 1, 00:00:52
C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:52

Step 6: Run command protocols ipv6 show route at DUT1 and check if output matches the following regular expressions:

O>[*]\s+2001:db8:200::/64
Show output
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIPng, O - OSPFv3, I - IS-IS, B - BGP, 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

IPv6 unicast VRF default:
O   2001:db8:1::/64 [110/10] is directly connected, eth0, weight 1, 00:00:03
C>* 2001:db8:1::/64 is directly connected, eth0, weight 1, 00:00:51
K * 2001:db8:1::/64 [0/256] is directly connected, eth0, weight 1, 00:00:53
L>* 2001:db8:1::100/128 is directly connected, eth0, weight 1, 00:00:51
C>* 2001:db8:2::/64 is directly connected, eth1, weight 1, 00:00:52
K * 2001:db8:2::/64 [0/256] is directly connected, eth1, weight 1, 00:00:53
L>* 2001:db8:2::100/128 is directly connected, eth1, weight 1, 00:00:52
O>* 2001:db8:100::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:03
O>* 2001:db8:200::/64 [110/20] via fe80::dcad:beff:feef:6c00, eth0, weight 1, 00:00:03
C * fe80::/64 is directly connected, eth1, weight 1, 00:00:52
C>* fe80::/64 is directly connected, eth0, weight 1, 00:00:52

Attention

Verify BGP session is established between DUT1 and DUT2

Step 7: Run command protocols bgp show ipv6 summary at DUT1 and check if output matches the following regular expressions:

2001:db8:2::2.*Established
Show output
IPv6 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 10 VRF default vrf-id 0
BGP table version 2
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
2001:db8:2::2   0.0.0.0         4         20         7         8        2    0    0 00:00:49  Established (Policy)        1 N/A

Total number of neighbors 1

Attention

Verify DUT2 learns only 2001:db8:100::/64 (matching route-map)

Step 8: Run command protocols bgp show ipv6 at DUT2 and check if output matches the following regular expressions:

[*]>\s+2001:db8:100::/64
Show output
BGP table version is 1, local router ID is 1.1.1.2, 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
 *>  2001:db8:100::/64
                    fe80::dcad:beff:feef:6c11
                                            20             0 10 ?

Displayed 1 routes and 1 total paths