dn42 wiki / IPv6 Multicast

dn42

IPv6 Multicast

The following guide illustrates how to set up an IPv6 multicast router using PIM-SM (Protocol Independent Multicast in Sparse Mode) with your own personal multicast prefix.

rfc8815 deprecated pim-sm, please take a look at the new multicast page about pim-ssm: </howto/multicast>

Quickstart


Testing & Applications

Creating a test network namespace

On your router:

allow-hotplug pim-ns0
iface pim-ns0 inet manual
    pre-up ip link add pim-ns0 type veth peer name pim-ns1
    post-up ip netns add pim-ns0
    post-up ip link set addr 02:11:22:00:00:02 netns pim-ns0 name pim-ns0 up dev pim-ns1
    post-up ip link set addr 02:11:22:00:00:01 up dev pim-ns0
    post-up ip -6 a a fdd5:69d5:c530:1::1/64 dev pim-ns0
    post-up ip netns exec pim-ns0 ip -6 a a fdd5:69d5:c530:1::2/64 dev pim-ns0
    post-up ip netns exec pim-ns0 ip -6 r a default via fdd5:69d5:c530:1::1
    post-down ip link del pim-ns0
    post-down ip netns del pim-ns0

You can now switch into this test network namespace via “ip netns exec /bin/bash”. Inside this network namespace you can try:

Creating a test multicast listener

$ socat -u UDP6-RECV:1234,reuseaddr,ipv6-join-group="[ff7e:230:fdd5:69d5:c530::123]:eth0" -

Creating a test multicast sender

First select which interface should be the default one for your multicast traffic. Then send multicast packets via ICMPv6:

$ ip -6 route add ff7e:230:fdd5:69d5:c530::/96 dev eth0 table local
$ ping6 -t 16 ff7e:230:fdd5:69d5:c530::123

The “-t 16”, a hop-limit of 16, is important here as by default all multicast traffic is usually send with a hop-limit of just 1.


Advanced Configurations

Nomenclature

Bootstrap Router (BSR)

Router that collects multicast group information from all RP in the network and advertises it across the network.

Rendezvous Point (RP)

Router where senders and receivers will meet for a certain multicast address. Senders must send their data to it, after which it will be forwarded to receivers. As soon as a receivers DR learns of the sender it will ask their router to forward data along a direct path between sender and receiver.

Designated Router (DR)

First-hop router that stand in for sender and receiver on their downstream networks. The senders DR sends their data towards the RP encapsulated in PIM Register packets. The receivers DR will send join and prune messages to the RP, managing the group subscription.

RFC3306: “Unicast-Prefix-based IPv6 Multicast Addresses”

Before RFC3956 (embedded RP addresses) personal, network prefix based multicast prefixes were calculated via RFC3306. Example:

However you can usually just announce and use both RFC3306 and RFC3956 based multicast prefixes, if you want to. pim6sd allows adding multiple group_prefix entries.

Address Management

Bootstrap Router

If you want to be participate as a bootstrap router candidate, please read up on how PIM works first. If you join with a bootstrap router candidate add it here below with contact information and join #dn42-multicast on HackInt:

Shared multicast addresses

Next to personal multicast prefixes generated by network prefix (RFC3306 or RFC3956) there can also be multicast addresses not owned by a specific AS. In general any one can just set up a multicast sender or listener for those. However to work, they need a reliable RP for coordination.

If you want to offer an RP candidate for a shared multicast address, please read up on how PIM works first. If you join with an RP candidate for a shared multicast address add it here below with contact information and join #dn42-multicast on HackInt:

Questions?


ToDo: