5e3d3311234a3349e2643c8ce3a61fe75f101ace
howto/multicast.md
| ... | ... | @@ -11,8 +11,56 @@ For it to work, you'll need to do the following: |
| 11 | 11 | |
| 12 | 12 | You're done! You should receive the multicast routes from peers advertising them. |
| 13 | 13 | |
| 14 | -[FRR configuration](https://git.lemonsh.moe/C4TG1RL5/dn42/src/branch/master/lab.rtr.famfo.catgirls.dn42/frr) used by C4TG1RL5. |
|
| 15 | -_Please make sure you understand how to configure and use frr before you use anything from this configuration!_ |
|
| 14 | +### frr configuration |
|
| 15 | + |
|
| 16 | +Enable PIM: |
|
| 17 | +``` |
|
| 18 | +router pim |
|
| 19 | + no autorp discovery |
|
| 20 | +exit |
|
| 21 | +router pim6 |
|
| 22 | +exit |
|
| 23 | +``` |
|
| 24 | +For IPv4, you can also add the `send-v6-secondary` directive, which allows you to omit an IPv4 address (as with "extended next hop") on the interface. (Does this work? I haven't tried it yet.) |
|
| 25 | + |
|
| 26 | +Import kernel multicast table into frr: |
|
| 27 | +``` |
|
| 28 | +ip import-table [TABLE NUMBER] mrib |
|
| 29 | +ipv6 import-table [TABLE NUMBER] mrib |
|
| 30 | +``` |
|
| 31 | +This method is suitable when frr is used only as a multicast routing daemon and another daemon, such as bird, is used for BGP. In this case, bird can export the unicast routes intended for multicast to a special kernel routing table, and frr can import them. If frr also handles BGP, it can store the corresponding unicast routes directly in mrib. |
|
| 32 | + |
|
| 33 | +Enable PIM on a interface: |
|
| 34 | +``` |
|
| 35 | +interface [INTERFACE NAME] |
|
| 36 | + ip pim |
|
| 37 | + ip pim use-source [SOURCE IPv4 ADDRESS] |
|
| 38 | + ipv6 pim |
|
| 39 | + ipv6 pim use-source [SOURCE IPv6 ADDRESS] |
|
| 40 | +exit |
|
| 41 | +``` |
|
| 42 | +Specifying a source address is optional, but can be used if frr would otherwise select the wrong address. |
|
| 43 | + |
|
| 44 | +Enable multicast for a client: |
|
| 45 | +``` |
|
| 46 | +interface client21 |
|
| 47 | + ip igmp |
|
| 48 | + ip igmp max-groups 32 |
|
| 49 | + ip igmp require-router-alert |
|
| 50 | + ip igmp version 3 |
|
| 51 | + ip pim |
|
| 52 | + ip pim passive |
|
| 53 | + ipv6 mld |
|
| 54 | + ipv6 mld max-groups 32 |
|
| 55 | + ipv6 mld require-router-alert |
|
| 56 | + ipv6 mld version 2 |
|
| 57 | + ipv6 pim |
|
| 58 | + ipv6 pim passive |
|
| 59 | +exit |
|
| 60 | +``` |
|
| 61 | +The number of maximum groups is optional and can be set freely. For security reasons, this number should not be set unreasonably high. Specifying an explicit IGMP or MLD version is also optional. |
|
| 62 | +IGMP and MLD messages must follow a specific format. `require-router-alert` filters out invalid messages. |
|
| 63 | +Even if an interface is only intended to handle IGMP/MLD, PIM must be enabled on it. If you still do not want to use PIM, a firewall rule is recommended. |
|
| 16 | 64 | |
| 17 | 65 | ### Participants |
| 18 | 66 |