mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-12 03:44:01 +00:00
tests: Add a test for the ip pim register-accept-list PLIST
command
Add a test to the pim-basic to ensure that the prefix-list works as expected. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
f4e74bd038
commit
c64d8d8577
@ -7,6 +7,10 @@ interface r1-eth0
|
|||||||
interface r1-eth1
|
interface r1-eth1
|
||||||
ip pim
|
ip pim
|
||||||
!
|
!
|
||||||
|
interface r1-eth2
|
||||||
|
ip igmp
|
||||||
|
ip pim
|
||||||
|
!
|
||||||
interface lo
|
interface lo
|
||||||
ip pim
|
ip pim
|
||||||
!
|
!
|
||||||
|
@ -6,6 +6,9 @@ interface r1-eth0
|
|||||||
interface r1-eth1
|
interface r1-eth1
|
||||||
ip address 10.0.30.1/24
|
ip address 10.0.30.1/24
|
||||||
!
|
!
|
||||||
|
interface r1-eth2
|
||||||
|
ip address 10.0.40.1/24
|
||||||
|
!
|
||||||
interface lo
|
interface lo
|
||||||
ip address 10.254.0.1/32
|
ip address 10.254.0.1/32
|
||||||
!
|
!
|
||||||
|
1
tests/topotests/pim-basic/r3/pimd.conf
Normal file
1
tests/topotests/pim-basic/r3/pimd.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
hostname r3
|
8
tests/topotests/pim-basic/r3/zebra.conf
Normal file
8
tests/topotests/pim-basic/r3/zebra.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
hostname r3
|
||||||
|
!
|
||||||
|
interface r3-eth0
|
||||||
|
ip address 10.0.40.4/24
|
||||||
|
!
|
||||||
|
interface lo
|
||||||
|
ip address 10.254.0.4/32
|
||||||
|
!
|
@ -7,3 +7,6 @@ interface lo
|
|||||||
ip pim
|
ip pim
|
||||||
!
|
!
|
||||||
ip pim rp 10.254.0.3
|
ip pim rp 10.254.0.3
|
||||||
|
ip pim register-accept-list ACCEPT
|
||||||
|
|
||||||
|
ip prefix-list ACCEPT seq 5 permit 10.0.20.0/24 le 32
|
||||||
|
@ -46,14 +46,18 @@ class PIMTopo(Topo):
|
|||||||
"Build function"
|
"Build function"
|
||||||
tgen = get_topogen(self)
|
tgen = get_topogen(self)
|
||||||
|
|
||||||
for routern in range(1, 3):
|
for routern in range(1, 4):
|
||||||
tgen.add_router('r{}'.format(routern))
|
tgen.add_router('r{}'.format(routern))
|
||||||
|
|
||||||
tgen.add_router('rp')
|
tgen.add_router('rp')
|
||||||
|
|
||||||
|
# rp ------ r1 -------- r2
|
||||||
|
# \
|
||||||
|
# --------- r3
|
||||||
# r1 -> .1
|
# r1 -> .1
|
||||||
# r2 -> .2
|
# r2 -> .2
|
||||||
# rp -> .3
|
# rp -> .3
|
||||||
|
# r3 -> .4
|
||||||
# loopback network is 10.254.0.X/32
|
# loopback network is 10.254.0.X/32
|
||||||
#
|
#
|
||||||
# r1 <- sw1 -> r2
|
# r1 <- sw1 -> r2
|
||||||
@ -70,6 +74,10 @@ class PIMTopo(Topo):
|
|||||||
sw.add_link(tgen.gears['r1'])
|
sw.add_link(tgen.gears['r1'])
|
||||||
sw.add_link(tgen.gears['rp'])
|
sw.add_link(tgen.gears['rp'])
|
||||||
|
|
||||||
|
# 10.0.40.0/24
|
||||||
|
sw = tgen.add_switch('sw3')
|
||||||
|
sw.add_link(tgen.gears['r1'])
|
||||||
|
sw.add_link(tgen.gears['r3'])
|
||||||
|
|
||||||
def setup_module(mod):
|
def setup_module(mod):
|
||||||
"Sets up the pytest environment"
|
"Sets up the pytest environment"
|
||||||
@ -130,12 +138,15 @@ def test_pim_send_mcast_stream():
|
|||||||
pytest.skip(tgen.errors)
|
pytest.skip(tgen.errors)
|
||||||
|
|
||||||
rp = tgen.gears['rp']
|
rp = tgen.gears['rp']
|
||||||
|
r3 = tgen.gears['r3']
|
||||||
r2 = tgen.gears['r2']
|
r2 = tgen.gears['r2']
|
||||||
r1 = tgen.gears['r1']
|
r1 = tgen.gears['r1']
|
||||||
|
|
||||||
# Let's establish a S,G stream from r2 -> r1
|
# Let's establish a S,G stream from r2 -> r1
|
||||||
CWD = os.path.dirname(os.path.realpath(__file__))
|
CWD = os.path.dirname(os.path.realpath(__file__))
|
||||||
r2.run("{}/mcast-tx.py --ttl 5 --count 5 --interval 10 229.1.1.1 r2-eth0 > /tmp/bar".format(CWD))
|
r2.run("{}/mcast-tx.py --ttl 5 --count 5 --interval 10 229.1.1.1 r2-eth0 > /tmp/bar".format(CWD))
|
||||||
|
# And from r3 -> r1
|
||||||
|
r3.run("{}/mcast-tx.py --ttl 5 --count 5 --interval 10 229.1.1.1 r3-eth0 > /tmp/bar".format(CWD))
|
||||||
|
|
||||||
# Let's see that it shows up and we have established some basic state
|
# Let's see that it shows up and we have established some basic state
|
||||||
out = r1.vtysh_cmd("show ip pim upstream json", isjson=True)
|
out = r1.vtysh_cmd("show ip pim upstream json", isjson=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user