Skip to main content
Version: 7.26

Group Management Protocol

The Group Management Protocol (GMP) menu, /routing/gmp, makes a RouterOS interface a multicast receiver. For each configured group, the router sends membership reports out of the interface the way a host does: IGMP reports for IPv4 groups and Multicast Listener Discovery (MLD) reports for IPv6 groups. It answers the queries of the multicast router on the network and leaves the group when you disable or remove the entry.

Use it to test multicast routing (PIM-SM or the IGMP proxy) and IGMP/MLD snooping without a dedicated IGMP or MLD client. GMP supports IGMP versions 1, 2 and 3, and MLD versions 1 and 2.

Join a multicast group​

This example makes ether2 of a RouterOS device a receiver for the group 239.1.1.1 on the network 192.168.10.0/24. A multicast router on the same network (192.168.10.1) runs PIM-SM with an IGMP querier.

Add an IP address on the interface and the group:

/ip/address
add address=192.168.10.10/24 interface=ether2
/routing/gmp
add groups=239.1.1.1 interfaces=ether2

The device sends an IGMP membership report as soon as the entry is created. On the multicast router, the group appears in the PIM-SM group list:

[admin@MikroTik] > /routing/pimsm/uib-g/print
Columns: INSTANCE, GROUP
# INSTANCE GROUP
0 pimsm-instance-1 239.1.1.1

Check the other multicast routers and switches on the path for the group in the same way. To see whether multicast data arrives on the interface, use the interface statistics, Torch or the Packet Sniffer.

Join a group from specific sources​

With IGMPv3 and MLDv2, a receiver can ask for a group from selected sources only. Set the source addresses in sources. This receiver asks for the source-specific multicast (SSM) channel 192.0.2.10, 232.1.1.1:

/routing/gmp
add groups=232.1.1.1 sources=192.0.2.10 interfaces=ether2

The multicast router creates a source-specific (S,G) entry for the channel:

[admin@MikroTik] > /routing/pimsm/uib-sg/print
Columns: INSTANCE, GROUP, SOURCE
# INSTANCE GROUP SOURCE
0 pimsm-instance-1 232.1.1.1 192.0.2.10

With exclude, the receiver asks for the group from all sources except the ones in sources. Without sources, the receiver asks for the group from all sources.

Join an IPv6 group​

Add an IPv6 group address to groups, and the device joins it with MLD. The interface needs only its IPv6 link-local address:

/routing/gmp
add groups=ff0e::1:1 interfaces=ether2

The multicast router (here a PIM-SM instance with afi=ipv6 and an MLD querier on the network) lists the group:

[admin@MikroTik] > /routing/pimsm/uib-g/print
Columns: INSTANCE, GROUP
# INSTANCE GROUP
0 pimsm-instance-2 ff0e::1:1
1 pimsm-instance-1 232.1.1.1
2 pimsm-instance-1 239.1.1.1

The interfaces property also accepts interface lists, and groups accepts several group addresses. List the receivers:

[admin@MikroTik] > /routing/gmp/print
0 interfaces=ether2 groups=239.1.1.1

1 interfaces=ether2 groups=232.1.1.1 sources=192.0.2.10

2 interfaces=ether2 groups=ff0e::1:1

How GMP behaves​

  • Versions: an interface sends IGMPv3 reports for IPv4 groups and MLDv2 reports for IPv6 groups. When it receives an IGMPv1, IGMPv2 or MLDv1 query, it falls back to that version and answers in it. For example, behind a RouterOS IGMP proxy, which sends IGMPv2 queries, the interface answers with IGMPv2 reports.
  • Join: when you create or enable an entry, the interface sends two unsolicited membership reports for its groups.
  • Queries: the interface answers the general queries of the multicast router with a report for each group.
  • Leave: when you disable or remove an entry, the interface leaves its groups. For an entry without sources, the IGMPv3 leave is a report that changes the group to include mode with no sources.

For all properties, see /routing/gmp in the CLI reference.