Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

examples: new PIM-SM examples in FRRouting #26

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/frr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ The following directories contain FRRouting simulations for the following
protocols:

* `./ospf` OSPFv2
* `./pim` PIM and IGMP
9 changes: 9 additions & 0 deletions examples/frr/pim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PIM and IGMP FRRouting Simulations
==================================

The following directories contain simulations showcasing PIM-SM features:

* `./asm` Any Source Multicast (ASM)
* `./ssm` Source Specific Multicast (SSM)
* `./spt-switchover` Shortest Path Tree (SPT) Switchover
* `./assert` PIM Assert
48 changes: 48 additions & 0 deletions examples/frr/pim/asm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Any Source Multicast (ASM) Simulation
=====================================

This simulation demonstrates the configuration of ASM Multicast via PIM and IGMP
in FRRouting through Munet. The network also utilizes OSPF to populate all
routing tables.

```

+------+ +------+
| src- | <-- Source of 224.1.1.1 | rec- |
| rtr1 | | rtr3 |
| | (*, 224.1.1.1) Member --> | |
+--+---+ +--+---+
|.10 |.10
| |
| 11.0.1.0/24 | 11.0.3.0/24
| local-rtr1 | local-rtr3
| |
|.1 |.3
+--+---+ +--+---+
| | 10.0.1.0/24 10.0.2.0/24 | |
| rtr1 +----------------\ /----------------+ rtr3 |
| |.1 net1 \ / net2 .3| |
+------+ \.2 /.2 +------+
+------+
| |
| rtr2 |
| (RP) |
+--+---+
|.2 \.2 +------+
| \ 10.0.3.0/24 | |
| \----------------+ rtr4 |
No Multicast packets! --> | net3 .4| |
| +--+---+
| 10.0.5.0/24 |.4
| net4 |
| | 11.0.4.0/24
|.5 | local-rtr4
+--+---+ |
| | |.10
| rtr5 | +--+---+
| | | rec- |
+------+ | rtr4 |
| |
(*, 224.1.1.1) Member --> +------+

```
89 changes: 89 additions & 0 deletions examples/frr/pim/asm/munet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
version: 1
kinds:
- name: frr
cmd: |
chown frr:frr -R /var/run/frr
chown frr:frr -R /var/log/frr
/usr/lib/frr/frrinit.sh start
tail -F /var/log/frr/frr.log
cleanup-cmd: |
/usr/lib/frr/frrinit.sh stop
volumes:
- "./%NAME%/etc.frr:/etc/frr"
- "%RUNDIR%/var.log.frr:/var/log/frr"
- "%RUNDIR%/var.run.frr:/var/run/frr"
cap-add:
- SYS_ADMIN
- AUDIT_WRITE
merge: ["volumes"]

topology:
networks:
- name: net1
ip: 10.0.1.254/24
- name: net2
ip: 10.0.2.254/24
- name: net3
ip: 10.0.3.254/24
- name: net4
ip: 10.0.4.254/24
- name: local-rtr3
ip: 11.0.3.254/24
- name: local-rtr4
ip: 11.0.4.254/24
- name: local-rtr1
ip: 11.0.1.254/24
nodes:
- name: rtr1
kind: frr
connections:
- to: "net1"
- to: "local-rtr1"
- name: src-rtr1
connections:
- to: "local-rtr1"
cmd: |
ip address add 11.0.1.10/24 dev eth0
ip route add default via 11.0.1.1
ping 224.1.1.1 -t 128
- name: rtr2
kind: frr
connections:
- to: "net1"
- to: "net2"
- to: "net3"
- to: "net4"
- name: rtr3
kind: frr
connections:
- to: "net2"
- to: "local-rtr3"
- name: rec-rtr3
kind: frr
connections:
- to: "local-rtr3"
- name: rtr4
kind: frr
connections:
- to: "net3"
- to: "local-rtr4"
- name: rec-rtr4
kind: frr
connections:
- to: "local-rtr4"
- name: rtr5
kind: frr
connections:
- to: "net4"
cli:
commands:
- name: ""
exec: "vtysh -c '{}'"
format: "[ROUTER ...] COMMAND"
help: "execute vtysh COMMAND on the router[s]"
kinds: ["frr"]
- name: "vtysh"
exec: "/usr/bin/vtysh"
format: "vtysh ROUTER [ROUTER ...]"
new-window: true
kinds: ["frr"]
7 changes: 7 additions & 0 deletions examples/frr/pim/asm/rec-rtr3/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
zebra=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rec-rtr3/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

ip route 0.0.0.0/0 11.0.3.3 eth0

interface eth0
ip address 11.0.3.10/24
ip igmp
ip igmp join 224.1.1.1
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rec-rtr3/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
7 changes: 7 additions & 0 deletions examples/frr/pim/asm/rec-rtr4/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
zebra=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rec-rtr4/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

ip route 0.0.0.0/0 11.0.4.4 eth0

interface eth0
ip address 11.0.4.10/24
ip igmp
ip igmp join 224.1.1.1
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rec-rtr4/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rtr1/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zebra=1
ospfd=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
ospfd_options="-d -F traditional --log=file:/var/log/frr/ospfd.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
22 changes: 22 additions & 0 deletions examples/frr/pim/asm/rtr1/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

interface eth0
ip address 10.0.1.1/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth1
ip address 11.0.1.1/24
ip pim
ip pim passive
ip igmp

ip pim rp 10.0.1.2 224.1.1.0/24

router ospf
ospf router-id 172.16.0.1
network 10.0.0.0/16 area 0.0.0.0
redistribute connected
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rtr1/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rtr2/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zebra=1
ospfd=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
ospfd_options="-d -F traditional --log=file:/var/log/frr/ospfd.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
41 changes: 41 additions & 0 deletions examples/frr/pim/asm/rtr2/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

interface eth0
ip address 10.0.1.2/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth1
ip address 10.0.2.2/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth2
ip address 10.0.3.2/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth3
ip address 10.0.4.2/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth4
ip address 10.0.5.2/24
ip pim
ip igmp

ip pim rp 10.0.1.2 224.1.1.0/24

router ospf
ospf router-id 172.16.0.2
network 10.0.0.0/16 area 0.0.0.0
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rtr2/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rtr3/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zebra=1
ospfd=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
ospfd_options="-d -F traditional --log=file:/var/log/frr/ospfd.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
22 changes: 22 additions & 0 deletions examples/frr/pim/asm/rtr3/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

interface eth0
ip address 10.0.2.3/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth1
ip address 11.0.3.3/24
ip pim
ip pim passive
ip igmp

ip pim rp 10.0.1.2 224.1.1.0/24

router ospf
ospf router-id 172.16.0.3
network 10.0.0.0/16 area 0.0.0.0
redistribute connected
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rtr3/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rtr4/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zebra=1
ospfd=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
ospfd_options="-d -F traditional --log=file:/var/log/frr/ospfd.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
22 changes: 22 additions & 0 deletions examples/frr/pim/asm/rtr4/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

interface eth0
ip address 10.0.3.4/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

interface eth1
ip address 11.0.4.4/24
ip pim
ip pim passive
ip igmp

ip pim rp 10.0.1.2 224.1.1.0/24

router ospf
ospf router-id 172.16.0.4
network 10.0.0.0/16 area 0.0.0.0
redistribute connected
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rtr4/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
9 changes: 9 additions & 0 deletions examples/frr/pim/asm/rtr5/etc.frr/daemons
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
zebra=1
ospfd=1
pimd=1
vtysh_enable=1
watchfrr_enable=1
zebra_options="-d -F traditional --log=file:/var/log/frr/zebra.log"
ospfd_options="-d -F traditional --log=file:/var/log/frr/ospfd.log"
pimd_options="-d -F traditional --log=file:/var/log/frr/pimd.log"
staticd_options="-d -F traditional --log=file:/var/log/frr/staticd.log"
15 changes: 15 additions & 0 deletions examples/frr/pim/asm/rtr5/etc.frr/frr.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
log file /var/log/frr/frr.log
service integrated-vtysh-config

interface eth0
ip address 10.0.4.5/24
ip pim
ip igmp
ip ospf dead-interval 16
ip ospf hello-interval 4

ip pim rp 10.0.1.2 224.1.1.0/24

router ospf
ospf router-id 172.16.0.5
network 10.0.0.0/16 area 0.0.0.0
1 change: 1 addition & 0 deletions examples/frr/pim/asm/rtr5/etc.frr/vtysh.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service integrated-vtysh-config
Loading