Caps-Man Mac Addresses to IP-ARP and Hotspot IP Binding

Caps-Man Mac Addresses to IP-ARP and Hotspot IP Binding

!!-- Important, you must add each Cap’s IP Address to Cap Comment --!!

Written by:BrasDeutscher,PA,Brazil

Testet under RouterOS v6.37rc32

{

Set here the Interface or Bridge Name

:global int “interface-name”

Set here the Hotspot Name

:global sv “hotspot-name”

\

!!-- DO NOT CHANGE ANY MORE BELOW --!!

:global mac
:global cap
:global com
:global action1
:global action2
:foreach c in=[/caps-man interface find where ! disabled ] do={
:set mac [/caps-man interface get $c mac-address ];
:set cap [/caps-man interface get $c name ];
:set com [/caps-man interface get $c comment ];
:if ([/ip hotspot ip-binding find where mac-address=“$mac” address=“$com”
comment=“$cap” ] = “” ) do={
:set action1 [/ip hotspot ip-binding add mac-address=“$mac” address=“$com”
to-address=“$com” server=“$sv” type=bypassed comment=“$cap” ];
:if ([/ip arp find where mac-address=“$mac” ] = “” ) do={
:set action2 [/ip arp add mac-address=“$mac” address=“$com” interface=“$int”
comment=“$cap” ];
:log warning (“IP Binding + ARP for CAP-$cap with Mac-$mac + IP-$com”);
}}}}

offiziell forum sprache ist Englisch.
Bitte schreibe in Englisch

O.K. Ich werde alles Ueberstzen !