From 3a10425d0e2294d793bc93b2332cdfb7b853b8bf Mon Sep 17 00:00:00 2001 From: Rajesh Varatharaj Date: Sat, 27 May 2023 23:34:00 -0700 Subject: [PATCH] tests: Verify PIM RP on an FHR Test PIM on a multi-VRF setup where the FHR is the RP. Verify the pimreg interface in VRF blue and red, and multicast stream from H1 goes out on both the VRFs. Basically, this test verifies RP when the FHR is directly connected to the sender. Signed-off-by: Rajesh Varatharaj --- tests/topotests/pim_vrf_fhr_rp/__init__.py | 0 tests/topotests/pim_vrf_fhr_rp/h1/zebra.conf | 10 +++++++ tests/topotests/pim_vrf_fhr_rp/h2/zebra.conf | 8 +++++ tests/topotests/pim_vrf_fhr_rp/h3/zebra.conf | 10 +++++++ tests/topotests/pim_vrf_fhr_rp/h4/zebra.conf | 8 +++++ .../pim_vrf_fhr_rp/r1/ospf_blue_neighbor.json | 15 ++++++++++ .../pim_vrf_fhr_rp/r1/ospf_red_neighbor.json | 16 ++++++++++ tests/topotests/pim_vrf_fhr_rp/r1/ospfd.conf | 26 ++++++++++++++++ .../pim_vrf_fhr_rp/r1/pim_blue_join.json | 22 ++++++++++++++ .../pim_vrf_fhr_rp/r1/pim_blue_neighbor.json | 13 ++++++++ .../pim_vrf_fhr_rp/r1/pim_blue_pimreg11.json | 14 +++++++++ .../pim_vrf_fhr_rp/r1/pim_red_join.json | 21 +++++++++++++ .../pim_vrf_fhr_rp/r1/pim_red_neighbor.json | 13 ++++++++ .../pim_vrf_fhr_rp/r1/pim_red_pimreg12.json | 14 +++++++++ tests/topotests/pim_vrf_fhr_rp/r1/pimd.conf | 30 +++++++++++++++++++ tests/topotests/pim_vrf_fhr_rp/r1/zebra.conf | 30 +++++++++++++++++++ tests/topotests/pim_vrf_fhr_rp/r11/ospfd.conf | 14 +++++++++ .../pim_vrf_fhr_rp/r11/pim_blue_join.json | 19 ++++++++++++ tests/topotests/pim_vrf_fhr_rp/r11/pimd.conf | 14 +++++++++ tests/topotests/pim_vrf_fhr_rp/r11/zebra.conf | 13 ++++++++ tests/topotests/pim_vrf_fhr_rp/r12/ospfd.conf | 14 +++++++++ .../pim_vrf_fhr_rp/r12/pim_red_join.json | 19 ++++++++++++ tests/topotests/pim_vrf_fhr_rp/r12/pimd.conf | 14 +++++++++ tests/topotests/pim_vrf_fhr_rp/r12/zebra.conf | 13 ++++++++ 24 files changed, 370 insertions(+) create mode 100644 tests/topotests/pim_vrf_fhr_rp/__init__.py create mode 100644 tests/topotests/pim_vrf_fhr_rp/h1/zebra.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/h2/zebra.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/h3/zebra.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/h4/zebra.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/ospf_blue_neighbor.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/ospf_red_neighbor.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/ospfd.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_join.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_neighbor.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_pimreg11.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pim_red_join.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pim_red_neighbor.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pim_red_pimreg12.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/pimd.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r1/zebra.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r11/ospfd.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r11/pim_blue_join.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r11/pimd.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r11/zebra.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r12/ospfd.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r12/pim_red_join.json create mode 100644 tests/topotests/pim_vrf_fhr_rp/r12/pimd.conf create mode 100644 tests/topotests/pim_vrf_fhr_rp/r12/zebra.conf diff --git a/tests/topotests/pim_vrf_fhr_rp/__init__.py b/tests/topotests/pim_vrf_fhr_rp/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/topotests/pim_vrf_fhr_rp/h1/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/h1/zebra.conf new file mode 100644 index 000000000000..3d6540d40c64 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/h1/zebra.conf @@ -0,0 +1,10 @@ +! +hostname h1 +log file zebra.log +! +interface h1-eth0 + description connection to r1 via sw1 + ip address 192.168.100.10/24 +! +ip route 0.0.0.0/0 192.168.100.1 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/h2/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/h2/zebra.conf new file mode 100644 index 000000000000..95342f9e8ae3 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/h2/zebra.conf @@ -0,0 +1,8 @@ +hostname h2 +! +interface h2-eth0 + description connection to r1 via sw2 + ip address 192.168.101.2/24 +! +ip route 0.0.0.0/0 192.168.101.1 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/h3/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/h3/zebra.conf new file mode 100644 index 000000000000..ef99b1cd8f4e --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/h3/zebra.conf @@ -0,0 +1,10 @@ +! +hostname h3 +log file zebra.log +! +interface h3-eth0 + description connection to r1 via sw3 + ip address 192.168.100.20/24 +! +ip route 0.0.0.0/0 192.168.100.1 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/h4/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/h4/zebra.conf new file mode 100644 index 000000000000..6a2e466000ff --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/h4/zebra.conf @@ -0,0 +1,8 @@ +hostname h4 +! +interface h4-eth0 + description connection to r1 via sw4 + ip address 192.168.101.4/24 +! +ip route 0.0.0.0/0 192.168.101.1 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/ospf_blue_neighbor.json b/tests/topotests/pim_vrf_fhr_rp/r1/ospf_blue_neighbor.json new file mode 100644 index 000000000000..198098d3d305 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/ospf_blue_neighbor.json @@ -0,0 +1,15 @@ +{ + "blue":{ + "vrfName":"blue", + "neighbors":{ + "192.168.0.11":[ + { + "nbrPriority":10, + "converged":"Full", + "ifaceAddress":"192.168.101.11", + "ifaceName":"r1-eth1:192.168.101.1" + } + ] + } + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/ospf_red_neighbor.json b/tests/topotests/pim_vrf_fhr_rp/r1/ospf_red_neighbor.json new file mode 100644 index 000000000000..6fce225ffc8e --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/ospf_red_neighbor.json @@ -0,0 +1,16 @@ +{ + "red":{ + "vrfName":"red", + "neighbors":{ + "192.168.0.12":[ + { + "nbrPriority":10, + "converged":"Full", + "ifaceAddress":"192.168.101.12", + "ifaceName":"r1-eth3:192.168.101.1" + } + ] + } + } +} + diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/ospfd.conf b/tests/topotests/pim_vrf_fhr_rp/r1/ospfd.conf new file mode 100644 index 000000000000..88eb5a8a054c --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/ospfd.conf @@ -0,0 +1,26 @@ +hostname r1 +! +! debug ospf event +! +! +interface r1-eth1 + ip ospf hello-interval 2 + ip ospf dead-interval 10 + ip ospf priority 20 +! +interface r1-eth3 + ip ospf hello-interval 2 + ip ospf dead-interval 10 + ip ospf priority 20 +! +router ospf vrf blue + ospf router-id 192.168.0.1 + network 192.168.0.1/32 area 0 + network 192.168.100.0/24 area 0 + network 192.168.101.0/24 area 0 +router ospf vrf red + ospf router-id 192.168.0.1 + network 192.168.0.1/32 area 0 + network 192.168.100.0/24 area 0 + network 192.168.101.0/24 area 0 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_join.json b/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_join.json new file mode 100644 index 000000000000..8568bae2bc19 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_join.json @@ -0,0 +1,22 @@ +{ + "r1-eth0":{ + "name":"r1-eth0", + "state":"up", + "address":"192.168.100.1", + "flagMulticast":true, + "flagBroadcast":true, + "lanDelayEnabled":true, + "239.100.0.1":{ + "*":{ + "source":"*", + "group":"239.100.0.1", + "upTime":"--:--:--", + "expire":"--:--", + "prune":"--:--", + "channelJoinName":"NOINFO", + "protocolIgmp":1 + } + } + } +} + diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_neighbor.json b/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_neighbor.json new file mode 100644 index 000000000000..ea7d4aca6f06 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_neighbor.json @@ -0,0 +1,13 @@ +{ + "blue":{ + }, + "r1-eth0":{ + }, + "r1-eth1":{ + "192.168.101.11":{ + "interface":"r1-eth1", + "neighbor":"192.168.101.11", + "drPriority":1 + } + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_pimreg11.json b/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_pimreg11.json new file mode 100644 index 000000000000..d3642f854a4a --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pim_blue_pimreg11.json @@ -0,0 +1,14 @@ +{ + "pimreg11":{ + "name":"pimreg11", + "state":"up", + "address":"0.0.0.0", + "flagAllMulticast":true, + "lanDelayEnabled":true, + "drAddress":"*", + "drPriority":1, + "drUptime":"--:--:--", + "drElections":0, + "drChanges":0 + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_join.json b/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_join.json new file mode 100644 index 000000000000..d0037ca4b08d --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_join.json @@ -0,0 +1,21 @@ +{ + "r1-eth2":{ + "name":"r1-eth2", + "state":"up", + "address":"192.168.100.1", + "flagMulticast":true, + "flagBroadcast":true, + "lanDelayEnabled":true, + "239.100.0.1":{ + "*":{ + "source":"*", + "group":"239.100.0.1", + "upTime":"--:--:--", + "expire":"--:--", + "prune":"--:--", + "channelJoinName":"NOINFO", + "protocolIgmp":1 + } + } + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_neighbor.json b/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_neighbor.json new file mode 100644 index 000000000000..e17b40854a91 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_neighbor.json @@ -0,0 +1,13 @@ +{ + "r1-eth2":{ + }, + "r1-eth3":{ + "192.168.101.12":{ + "interface":"r1-eth3", + "neighbor":"192.168.101.12", + "drPriority":1 + } + }, + "red":{ + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_pimreg12.json b/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_pimreg12.json new file mode 100644 index 000000000000..45b6cd96458d --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pim_red_pimreg12.json @@ -0,0 +1,14 @@ +{ + "pimreg12":{ + "name":"pimreg12", + "state":"up", + "address":"0.0.0.0", + "flagAllMulticast":true, + "lanDelayEnabled":true, + "drAddress":"*", + "drPriority":1, + "drUptime":"--:--:--", + "drElections":0, + "drChanges":0 + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/pimd.conf b/tests/topotests/pim_vrf_fhr_rp/r1/pimd.conf new file mode 100644 index 000000000000..f4aaff9228f1 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/pimd.conf @@ -0,0 +1,30 @@ +hostname r1 +! +! debug igmp events +! debug igmp packets +! debug pim events +! debug pim packets +! debug pim trace +! debug pim zebra +! debug pim bsm +! +ip pim rp 192.168.0.1 239.100.0.0/28 +ip pim join-prune-interval 5 +! +interface r1-eth0 + ip igmp + ip igmp version 2 + ip pim +! +interface r1-eth1 + ip pim +! +interface r1-eth2 + ip igmp + ip igmp version 2 + ip pim +! +interface r1-eth3 + ip pim +! +ip pim join-prune-interval 5 diff --git a/tests/topotests/pim_vrf_fhr_rp/r1/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/r1/zebra.conf new file mode 100644 index 000000000000..9da92809455f --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r1/zebra.conf @@ -0,0 +1,30 @@ +! +hostname r1 +log file zebra.log +! +ip forwarding +ipv6 forwarding +! +interface blue vrf blue + ip address 192.168.0.1/32 +! +interface red vrf red + ip address 192.168.0.1/32 +! +interface r1-eth0 vrf blue + description connection to h1 via sw1 + ip address 192.168.100.1/24 +! +interface r1-eth1 vrf blue + description connection to r11 via sw2 + ip address 192.168.101.1/24 +! +interface r1-eth2 vrf red + description connection to h1 via sw3 + ip address 192.168.100.1/24 +! +interface r1-eth3 vrf red + description connection to r12 via sw4 + ip address 192.168.101.1/24 +! + diff --git a/tests/topotests/pim_vrf_fhr_rp/r11/ospfd.conf b/tests/topotests/pim_vrf_fhr_rp/r11/ospfd.conf new file mode 100644 index 000000000000..86fb66db6175 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r11/ospfd.conf @@ -0,0 +1,14 @@ +hostname r11 +! +! debug ospf event +! +interface r11-eth0 + ip ospf hello-interval 2 + ip ospf dead-interval 10 + ip ospf priority 10 +! +router ospf + ospf router-id 192.168.0.11 + network 192.168.0.11/32 area 0 + network 192.168.101.0/24 area 0 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r11/pim_blue_join.json b/tests/topotests/pim_vrf_fhr_rp/r11/pim_blue_join.json new file mode 100644 index 000000000000..289bf51e7606 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r11/pim_blue_join.json @@ -0,0 +1,19 @@ +{ + "r11-eth0":{ + "name":"r11-eth0", + "state":"up", + "address":"192.168.101.11", + "flagMulticast":true, + "flagBroadcast":true, + "lanDelayEnabled":true, + "239.100.0.1":{ + "*":{ + "source":"*", + "group":"239.100.0.1", + "prune":"--:--", + "channelJoinName":"JOIN", + "protocolPim":1 + } + } + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r11/pimd.conf b/tests/topotests/pim_vrf_fhr_rp/r11/pimd.conf new file mode 100644 index 000000000000..136c356b6324 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r11/pimd.conf @@ -0,0 +1,14 @@ +hostname r11 +! +! debug pim events +! debug pim packets +! debug pim trace +! debug pim zebra +! debug pim bsm +! +interface lo + ip pim +! +interface r11-eth0 + ip pim +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r11/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/r11/zebra.conf new file mode 100644 index 000000000000..137706d24576 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r11/zebra.conf @@ -0,0 +1,13 @@ +! +hostname r11 +log file zebra.log +! +interface lo + ip address 192.168.0.11/32 +! +interface r11-eth0 + description connection to r1 via sw1 + ip address 192.168.101.11/24 +! +ip route 0.0.0.0/0 192.168.101.1 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r12/ospfd.conf b/tests/topotests/pim_vrf_fhr_rp/r12/ospfd.conf new file mode 100644 index 000000000000..f0dcabece2c3 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r12/ospfd.conf @@ -0,0 +1,14 @@ +hostname r12 +! +! debug ospf event +! +interface r12-eth0 + ip ospf hello-interval 2 + ip ospf dead-interval 10 + ip ospf priority 10 +! +router ospf + ospf router-id 192.168.0.12 + network 192.168.0.12/32 area 0 + network 192.168.101.0/24 area 0 +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r12/pim_red_join.json b/tests/topotests/pim_vrf_fhr_rp/r12/pim_red_join.json new file mode 100644 index 000000000000..6926246568ca --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r12/pim_red_join.json @@ -0,0 +1,19 @@ +{ + "r12-eth0":{ + "name":"r12-eth0", + "state":"up", + "address":"192.168.101.12", + "flagMulticast":true, + "flagBroadcast":true, + "lanDelayEnabled":true, + "239.100.0.1":{ + "*":{ + "source":"*", + "group":"239.100.0.1", + "prune":"--:--", + "channelJoinName":"JOIN", + "protocolPim":1 + } + } + } +} diff --git a/tests/topotests/pim_vrf_fhr_rp/r12/pimd.conf b/tests/topotests/pim_vrf_fhr_rp/r12/pimd.conf new file mode 100644 index 000000000000..c8354f36361b --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r12/pimd.conf @@ -0,0 +1,14 @@ +hostname r12 +! +! debug pim events +! debug pim packets +! debug pim trace +! debug pim zebra +! debug pim bsm +! +interface lo + ip pim +! +interface r12-eth0 + ip pim +! diff --git a/tests/topotests/pim_vrf_fhr_rp/r12/zebra.conf b/tests/topotests/pim_vrf_fhr_rp/r12/zebra.conf new file mode 100644 index 000000000000..bede10490675 --- /dev/null +++ b/tests/topotests/pim_vrf_fhr_rp/r12/zebra.conf @@ -0,0 +1,13 @@ +! +hostname r12 +log file zebra.log +! +interface lo + ip address 192.168.0.12/32 +! +interface r12-eth0 + description connection to r1 via sw1 + ip address 192.168.101.12/24 +! +ip route 0.0.0.0/0 192.168.101.1 +!