From a9374df5f351d25e968f5f90a827796203cbafdd Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 2 Feb 2017 02:18:18 -0800 Subject: Fix SR multicast post mfib commit 1 - use the SR policy to construct the replicate DPO. Each bucket therein is a SR tunnel. 2 - install a special mfib entry that links via this replicate 3 - forwarding is now mfib-lookup -> replicate -> sr_rewrite (per-tunnel) no need for a separate sr_replicate node. 4 - Stack the sr tunnel on the forwarding DPO of the first-hop FIB entry. no need for a second lookup post SR encap. 5 - fix some path-list lock leaks in the MFIB entry. Change-Id: I20de96ea4c4be4fae252625bde159d9c435c8315 Signed-off-by: Neale Ranns --- src/scripts/vnet/sr/mcast | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/scripts/vnet/sr/mcast (limited to 'src/scripts/vnet') diff --git a/src/scripts/vnet/sr/mcast b/src/scripts/vnet/sr/mcast new file mode 100644 index 00000000000..50e73efabb4 --- /dev/null +++ b/src/scripts/vnet/sr/mcast @@ -0,0 +1,58 @@ + +loop create +loop create +loop create +loop create + +set int state loop0 up +set int state loop1 up +set int state loop2 up +set int state loop3 up + +set int ip address loop0 2001::1/64 +set int ip address loop1 2001:1::1/64 +set int ip address loop2 2001:2::1/64 +set int ip address loop3 2001:3::1/64 + +set ip6 neighbor loop1 2001:1::2 00:00:dd:ee:cc:d1 +set ip6 neighbor loop2 2001:2::2 00:00:dd:ee:cc:d2 +set ip6 neighbor loop3 2001:3::2 00:00:dd:ee:cc:d3 + +ip route 3001::1/128 via 2001:1::2 loop1 +ip route 3001::2/128 via 2001:2::2 loop2 +ip route 3001::3/128 via 2001:3::2 loop3 + +sr tunnel name SR1 src aaaa::2:1 dst ff19::1/128 next 3001::1 clean +sr tunnel name SR2 src aaaa::2:2 dst ff19::2/128 next 3001::2 clean +sr tunnel name SR3 src aaaa::2:3 dst ff19::3/128 next 3001::3 clean + +sr policy name MCAST1 tunnel SR1 tunnel SR2 tunnel SR3 + +sr multicast-map address ff18::1 sr-policy MCAST1 + +packet-generator new { + name x + limit 1 + node ethernet-input + size 64-64 + no-recycle + data { + IP6: 1.2.3 -> 4.5.6 + ICMP: 3002::2 -> ff18::1 + ICMP echo_request + incrementing 100 + } +} +trace add pg-input 100 + +sr multicast-map del address ff18::1 sr-policy MCAST1 +sr policy del name MCAST1 tunnel SR1 tunnel SR2 tunnel SR3 + +ip route del 3001::1/128 via 2001:1::2 loop1 +ip route del 3001::2/128 via 2001:2::2 loop2 +ip route del 3001::3/128 via 2001:3::2 loop3 + +sr tunnel del name SR1 src aaaa::2:1 dst ff19::1/128 next 3001::1 clean +sr tunnel del name SR2 src aaaa::2:2 dst ff19::2/128 next 3001::2 clean +sr tunnel del name SR3 src aaaa::2:3 dst ff19::3/128 next 3001::3 clean + -- cgit 1.2.3-korg