Last active
November 16, 2022 05:12
-
-
Save afriza/4f0c4e6fd3d1a8e1ebb88cd78935ac26 to your computer and use it in GitHub Desktop.
Automatically add & remove PPP Profile connections to & from Mikrotik IGMP Proxy Multicast Routing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The actual on-down script. local variable matching against comment is required as of RouterOS v6.49.7 | |
/log info "igmp-proxy interface removing $interface" | |
:local komen $interface | |
/routing igmp-proxy interface remove [/routing igmp-proxy interface find comment=$komen] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The actual on-up script | |
/log info "igmp-proxy interface adding $[/interface get $interface name] $interface" | |
/routing igmp-proxy interface add interface=$interface comment=$interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Paste the following into Mikrotik WinBox Terminal to modify all PPP Profiles. | |
# Existing on-up/down scripts will be replaced. | |
# IGMP Proxy is included in RouterOS v7 but needs to be manually added in RouterOS v6 | |
# by installing "multicast" package. | |
:local p; :foreach p in=[/ppp profile find] do={/ppp profile set $p \ | |
on-up="/log info \"igmp-proxy interface adding \$[/interface get \$interface name] \$interface\"\r\ | |
\n/routing igmp-proxy interface add interface=\$interface comment=\$interface\r\ | |
\n" on-down="/log info \"igmp-proxy interface removing \$interface\"\r\ | |
\n:local komen \$interface\r\ | |
\n/routing igmp-proxy interface remove [/routing igmp-proxy interface find comment=\$komen]\r\ | |
\n"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment