Skip to content

Commit 496ea97

Browse files
committed
topotests: new test for PIM filtering
Implement tests for the new PIM join route-map filtering. Signed-off-by: Rafael Zalamena <[email protected]>
1 parent 368a08d commit 496ea97

File tree

5 files changed

+477
-0
lines changed

5 files changed

+477
-0
lines changed

tests/topotests/multicast_pim_route_map_topo1/__init__.py

Whitespace-only changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
log commands
2+
!
3+
ip route 192.168.101.0/24 192.168.100.2
4+
ip route 10.254.254.2/32 192.168.100.2
5+
ipv6 route 2001:db8:101::/64 2001:db8:100::2
6+
ipv6 route 2001:db8:ffff::2/128 2001:db8:100::2
7+
!
8+
interface r1-eth0
9+
ip address 192.168.100.1/24
10+
ip pim
11+
ipv6 address 2001:db8:100::1/64
12+
ipv6 pim
13+
exit
14+
!
15+
interface r1-eth1
16+
ip address 192.168.200.1/24
17+
ip igmp
18+
ip pim passive
19+
ipv6 address 2001:db8:200::1/64
20+
ipv6 mld
21+
ipv6 pim passive
22+
exit
23+
!
24+
router pim
25+
rp 10.254.254.2
26+
exit
27+
!
28+
router pim6
29+
rp 2001:db8:ffff::2
30+
exit
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
log commands
2+
!
3+
interface r2-eth0
4+
ip address 192.168.100.2/24
5+
ip pim
6+
ipv6 address 2001:db8:100::2/64
7+
ipv6 pim
8+
exit
9+
!
10+
interface r2-eth1
11+
ip address 192.168.101.2/24
12+
ip pim
13+
ipv6 address 2001:db8:101::2/64
14+
ipv6 pim
15+
exit
16+
!
17+
interface lo
18+
ip address 10.254.254.2/32
19+
ip igmp
20+
ip pim passive
21+
ipv6 address 2001:db8:ffff::2/128
22+
ipv6 mld
23+
ipv6 pim passive
24+
!
25+
router pim
26+
rp 10.254.254.2
27+
join-filter route-map pim-filter
28+
exit
29+
!
30+
router pim6
31+
rp 2001:db8:ffff::2
32+
join-filter route-map pim6-filter
33+
exit
34+
!
35+
ip prefix-list allowed-pim-groups seq 5 permit 225.0.0.1/32 le 32
36+
ip prefix-list allowed-pim-groups seq 10 permit 225.0.0.2/32 le 32
37+
!
38+
route-map pim-filter permit 100
39+
match ip multicast-group prefix-list allowed-pim-groups
40+
exit
41+
!
42+
route-map pim-filter permit 110
43+
match ip multicast-group 225.0.0.100
44+
exit
45+
!
46+
route-map pim-filter permit 120
47+
match ip multicast-group 225.0.0.200
48+
match multicast-interface r2-eth1
49+
exit
50+
!
51+
route-map pim-filter permit 130
52+
match ip multicast-group 232.0.1.1
53+
match ip multicast-source 192.168.101.10
54+
exit
55+
!
56+
ipv6 prefix-list allowed-pim6-groups seq 5 permit ff05::100/128 le 128
57+
ipv6 prefix-list allowed-pim6-groups seq 10 permit ff05::200/128 le 128
58+
!
59+
route-map pim6-filter permit 100
60+
match ipv6 multicast-group prefix-list allowed-pim6-groups
61+
exit
62+
!
63+
route-map pim6-filter permit 110
64+
match ipv6 multicast-group ff05::1000
65+
exit
66+
!
67+
route-map pim6-filter permit 120
68+
match ipv6 multicast-group ff05::2000
69+
match multicast-interface r2-eth1
70+
exit
71+
!
72+
route-map pim6-filter permit 130
73+
match ipv6 multicast-group ff35::100
74+
match ipv6 multicast-source 2001:db8:101::100
75+
exit
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
log commands
2+
!
3+
ip route 192.168.100.0/24 192.168.101.2
4+
ip route 10.254.254.2/32 192.168.101.2
5+
ipv6 route 2001:db8:101::/64 2001:db8:101::2
6+
ipv6 route 2001:db8:ffff::2/128 2001:db8:101::2
7+
!
8+
interface r3-eth0
9+
ip address 192.168.101.1/24
10+
ip pim
11+
ipv6 address 2001:db8:101::1/64
12+
ipv6 pim
13+
exit
14+
!
15+
interface r3-eth1
16+
ip address 192.168.201.1/24
17+
ip igmp
18+
ip pim passive
19+
ipv6 address 2001:db8:201::1/64
20+
ipv6 mld
21+
ipv6 pim passive
22+
exit
23+
!
24+
router pim
25+
rp 10.254.254.2
26+
exit
27+
!
28+
router pim6
29+
rp 2001:db8:ffff::2
30+
exit

0 commit comments

Comments
 (0)