Manual:Routing/IGMP-Proxy: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
(37 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==IGMP-Proxy==
{{Versions|v4.5}}


IGMP-Proxy works by IGMP frame forwarding and commonly is used when there is no need to use more advanced protocol e.g. PIM-SM.
*''Packages required:'' '''multicast'''
*''Incompatible with:'' '''routing-test (v3)'''


Internet Group Management Protocol Proxy allows users to proxy non-standard IGMP implementations IGMP traffic over to other networks behind the router, thus allowing proprietary solution to distribute their content over network where network devices does not know anything about used inner workings of proprietary solution.
==Summary==


'''IGMP-Proxy features:'''
Internet Group Management Protocol (IGMP) proxy can be used to implement multicast routing. It is forwarding IGMP frames and commonly is used when there is no need for more advanced protocol like PIM.


* Distribute different IGMP based solution packets over network
'''IGMP proxy features:'''
* Manage distribution of IGMP based solutions
* On less powerful hardware when PIM-SM would be too heavy to run for it
* Ease of configuration


'''Resources on the internet'''
* The simplest way how to do multicast routing;
* Can be used in topologies where PIM-SM is not suitable for some reason;
* Takes slightly less resources than PIM-SM;
* Ease of configuration.


[http://www.ietf.org/rfc/rfc4605.txt RFC 4605 IGMP-Proxy]
On the other hand, IGMP proxy is not well suited for complicated multicast routing setups. Compared to PIM based solutions, IGMP proxy does not support more than one upstream interface and routing loops are not detected or avoided.


==routing igmp-proxy==
By default, IGMP proxy upstream interface will send IGMPv3 membership reports and it will detect what IGMP version the upstream device (e.g. multicast router) is using based on received queries. In case IGMPv1/v2 queries are received, the upstream port will fallback to lower IGMP version. It will convert back to IGMPv3 when IGMPv1/v2 querier present timer (400s) expires. Downstream interfaces of IGMP proxy will only send IGMPv2 queries.


* '''query-interval''' (integer[s|m|h] in range from 00:00:01 to 01:00:00) : it can be set as, an example, 685 or 685s or 00:11:25 sends you queries on interfaces that are not upstream for clients that want to join some IGMP groups
==Example==
* '''query-response-interval''' (integer[s|m|h] in range from 00:00:01 to 01:00:00) : it can be set as, an example, 685 or 685s or 00:11:25 time when query failes
* '''quick-leave''' (yes|no) : should router itself stop sending igmp data stream or should it forward igmp leave request forward, so next IGMP aware device tops sending igmp data stream after leave command was initiated.


==routing igmp-proxy interface==
To forward all multicast data coming from ''ether1'' interface to all other interfaces, where subscribers are connected:


It is used to configure what interfaces will participate as IGMP proxy interfaces on router. If interface is not configured as IGMP proxy interface, then all IGMP traffic received on port will be ignore.
[admin@MikroTik] /routing igmp-proxy> interface add interface=ether1 upstream=yes
[admin@MikroTik] /routing igmp-proxy> interface add interface=all
[admin@MikroTik] /routing igmp-proxy> interface print
Flags: X - disabled, I - inactive, D - dynamic, U - upstream
  #    INTERFACE                                                            THRESHOLD
  0  U ether1                                                                1
  1    all                                                                   1
  2 D  ether2                                                                1
  3 D  ether3                                                                1


* '''alternative-subnets''' (ip address/subnet) : if IGMP data source comes from other network then configure on interface with upsrteam=yes then you have to set up this field to network, or address of source.
You may also need to configure '''alternative-subnets''' on upstream interface - in case if the multicast sender address is in an IP subnet that is not directly reachable from from the local router.
* '''comment''' (text) : commentary on the entry in the entry in imgp-proxy interface list
[admin@MikroTik] /routing igmp-proxy> interface set [find upstream=yes] \
* '''disabled''' (yes|no) : is interface disabled
  alternative-subnets=1.2.3.0/24,2.3.4.0/24
* '''interface''' (interface name) : interface that this entry is set up for
* '''rate-limit''' (integer) : does not work, will be omitted in the future
* '''threshold''' (integer) : minimal TTL
* '''upstream''' (yes|no) : set to yes if a proxy device's interface in the direction of the root of the tree, if no then a proxy device's interfaces that is not in the direction of the root of the tree. Router should have one and only one upstream interface. Upstream interface is responsible for forwarding IGMP membership requests.


==routing igmp-proxy mfc==
==/routing igmp-proxy==
Here you can see what active group streams are going through the router


* '''group''' (IP address) : IGMP group that is the owner of the data pasing
General configuration.
* '''source''' (IP address) : router that these packets are originating from
 
* '''query-interval''' (time, 00:00:01 - 01:00:00) : how often to send out IGMP Query messages over downstream interfaces.
* '''query-response-interval''' (time, 00:00:01 - 01:00:00) : how long to wait for responses to an IGMP Query message.
* '''quick-leave''' (yes|no) : specifies action on IGMP Leave message. If quick-leave is on, then an IGMP Leave message is sent upstream as soon as a leave is received from the first client on the downstream interface. Use set to '''yes''' only in case there is only one subscriber behind the proxy.
{{Note| use quick leave only if there is one subscriber behind the proxy}}
 
==/routing igmp-proxy interface==
 
Used to configure what interfaces will participate as IGMP proxy interfaces on router. If an interface is not configured as IGMP proxy interface, then all IGMP traffic received on it will be ignored.
 
* '''alternative-subnets''' (list of IP prefixes) : by default, only packets from directly attached subnets are accepted. This parameter can be used to specify a list of alternative valid packet source subnets, both for data or IGMP packets. Has effect only on upstream interface. Should be used when the source of multicast data often is in a different IP network.
* '''interface''' (interface name) : RouterOS interface
* '''threshold''' (integer) : minimal TTL; packets received with a lower TTL value are ignored
* '''upstream''' (yes|no) : interface is called "upstream" if it's in the direction of the root of the multicast tree. An IGMP forwarding router must have exactly one upstream interface configured. The upstream interface is used to sent out IGMP membership requests.
 
==/routing igmp-proxy mfc==
 
Multicast forwarding cache (MFC) status.
 
* '''group''' (IP address) : IGMP group address
* '''source''' (IP address) : multicast data originator address
* '''incoming-interface''' (interface name) : packet stream is coming in router through this interface
* '''incoming-interface''' (interface name) : packet stream is coming in router through this interface
* '''outgoing-interface''' (interface name) : packet stream is going out of router through this interface
* '''outgoing-interface''' (interface name) : packet stream is going out of router through this interface


[[Category:Manual]]
 
[[Category:Unfinished]]
==Static multicast forwarding cache (MFC) entries==
Since RouterOS 4.5 MFC is enabled to add static multicast forwarding rules. If a static rule is added, all dynamic rules for that group will be ignored.
 
====Configuration====
These rules will take effect only if IGMP-proxy interfaces are configured (upstream and downstram interfaces should be set) or these rules wont be active.
 
*'''downstream-interfaces''' (list of interfaces) : received stream will be sent out to listed interfaces only.
*'''group''' (multicast group address) : multicast stream group address this rule applies  ''should be set''
*'''source''' (IP address) : IP address we are receiving stream from ''should be set''
*'''upstream-interface''' (interface) : interface that is receiving stream data  ''should be set''
 
==Examples==
 
====IGMP-proxy====
Will forward stream unconditionally if it comes in from ether1 with set source and will be sent out to ether2, clients that will try to get stream on interface ether3 will not receive that stream.
/routing igmp-proxy interface add comment="" disabled=no interface=ether1 threshold=1 upstream=yes
/routing igmp-proxy interface add comment="" disabled=no interface=ether2 threshold=1
/routing igmp-proxy interface add comment="" disabled=no interface=ether3 threshold=1
/routing igmp-proxy mfc add source=192.168.0.1 upstream-interface=ether1 \
downstream-interface=ether2 group=224.10.10.11 disabled=no
 
====MFC static entry====
 
224.10.10.10 group will not be sent at all
 
/routing igmp-proxy mfc add source=192.168.0.1 upstream-interface=ether1 \
group=224.10.10.11 disabled=no
 
==References==
 
[http://www.ietf.org/rfc/rfc4605.txt RFC 4605 IGMP/MLD - Based Multicast Forwarding]
 
[[Category:Manual|I]]
[[Category:Routing|I]]
[[Category:Internetworking|I]]
[[Category:Multicast]]

Revision as of 08:09, 13 November 2019

Version.png

Applies to RouterOS: v4.5

  • Packages required: multicast
  • Incompatible with: routing-test (v3)

Summary

Internet Group Management Protocol (IGMP) proxy can be used to implement multicast routing. It is forwarding IGMP frames and commonly is used when there is no need for more advanced protocol like PIM.

IGMP proxy features:

  • The simplest way how to do multicast routing;
  • Can be used in topologies where PIM-SM is not suitable for some reason;
  • Takes slightly less resources than PIM-SM;
  • Ease of configuration.

On the other hand, IGMP proxy is not well suited for complicated multicast routing setups. Compared to PIM based solutions, IGMP proxy does not support more than one upstream interface and routing loops are not detected or avoided.

By default, IGMP proxy upstream interface will send IGMPv3 membership reports and it will detect what IGMP version the upstream device (e.g. multicast router) is using based on received queries. In case IGMPv1/v2 queries are received, the upstream port will fallback to lower IGMP version. It will convert back to IGMPv3 when IGMPv1/v2 querier present timer (400s) expires. Downstream interfaces of IGMP proxy will only send IGMPv2 queries.

Example

To forward all multicast data coming from ether1 interface to all other interfaces, where subscribers are connected:

[admin@MikroTik] /routing igmp-proxy> interface add interface=ether1 upstream=yes
[admin@MikroTik] /routing igmp-proxy> interface add interface=all
[admin@MikroTik] /routing igmp-proxy> interface print
Flags: X - disabled, I - inactive, D - dynamic, U - upstream
 #    INTERFACE                                                             THRESHOLD
 0  U ether1                                                                1
 1    all                                                                   1
 2 D  ether2                                                                1
 3 D  ether3                                                                1

You may also need to configure alternative-subnets on upstream interface - in case if the multicast sender address is in an IP subnet that is not directly reachable from from the local router.

[admin@MikroTik] /routing igmp-proxy> interface set [find upstream=yes] \
 alternative-subnets=1.2.3.0/24,2.3.4.0/24

/routing igmp-proxy

General configuration.

  • query-interval (time, 00:00:01 - 01:00:00) : how often to send out IGMP Query messages over downstream interfaces.
  • query-response-interval (time, 00:00:01 - 01:00:00) : how long to wait for responses to an IGMP Query message.
  • quick-leave (yes|no) : specifies action on IGMP Leave message. If quick-leave is on, then an IGMP Leave message is sent upstream as soon as a leave is received from the first client on the downstream interface. Use set to yes only in case there is only one subscriber behind the proxy.
Icon-note.png

Note: use quick leave only if there is one subscriber behind the proxy


/routing igmp-proxy interface

Used to configure what interfaces will participate as IGMP proxy interfaces on router. If an interface is not configured as IGMP proxy interface, then all IGMP traffic received on it will be ignored.

  • alternative-subnets (list of IP prefixes) : by default, only packets from directly attached subnets are accepted. This parameter can be used to specify a list of alternative valid packet source subnets, both for data or IGMP packets. Has effect only on upstream interface. Should be used when the source of multicast data often is in a different IP network.
  • interface (interface name) : RouterOS interface
  • threshold (integer) : minimal TTL; packets received with a lower TTL value are ignored
  • upstream (yes|no) : interface is called "upstream" if it's in the direction of the root of the multicast tree. An IGMP forwarding router must have exactly one upstream interface configured. The upstream interface is used to sent out IGMP membership requests.

/routing igmp-proxy mfc

Multicast forwarding cache (MFC) status.

  • group (IP address) : IGMP group address
  • source (IP address) : multicast data originator address
  • incoming-interface (interface name) : packet stream is coming in router through this interface
  • outgoing-interface (interface name) : packet stream is going out of router through this interface


Static multicast forwarding cache (MFC) entries

Since RouterOS 4.5 MFC is enabled to add static multicast forwarding rules. If a static rule is added, all dynamic rules for that group will be ignored.

Configuration

These rules will take effect only if IGMP-proxy interfaces are configured (upstream and downstram interfaces should be set) or these rules wont be active.

  • downstream-interfaces (list of interfaces) : received stream will be sent out to listed interfaces only.
  • group (multicast group address) : multicast stream group address this rule applies should be set
  • source (IP address) : IP address we are receiving stream from should be set
  • upstream-interface (interface) : interface that is receiving stream data should be set

Examples

IGMP-proxy

Will forward stream unconditionally if it comes in from ether1 with set source and will be sent out to ether2, clients that will try to get stream on interface ether3 will not receive that stream.

/routing igmp-proxy interface add comment="" disabled=no interface=ether1 threshold=1 upstream=yes
/routing igmp-proxy interface add comment="" disabled=no interface=ether2 threshold=1
/routing igmp-proxy interface add comment="" disabled=no interface=ether3 threshold=1
/routing igmp-proxy mfc add source=192.168.0.1 upstream-interface=ether1 \
downstream-interface=ether2 group=224.10.10.11 disabled=no

MFC static entry

224.10.10.10 group will not be sent at all

/routing igmp-proxy mfc add source=192.168.0.1 upstream-interface=ether1 \
group=224.10.10.11 disabled=no

References

RFC 4605 IGMP/MLD - Based Multicast Forwarding