Community discussions

MikroTik App
 
dlyash00
just joined
Topic Author
Posts: 1
Joined: Mon Dec 18, 2023 3:57 pm

Add switch host mac-address to switch rule

Mon Dec 18, 2023 4:19 pm

I've tried the following script:
:foreach i in=[/interface ethernet switch host find where ports=ether1] do={

    :local currHost value=[/interface ethernet switch host get $i];

    /interface ethernet switch rule add switch=switch1 ports=($currHost->"ports") src-mac-address="($currHost->mac-address)/FF:FF:FF:FF:FF:FF";

};
for adding a ether1 switch host to switch rule for ether1, but it did nothing. Would be grateful for any advice for how can I perform this task by script

Who is online

Users browsing this forum: Bing [Bot] and 10 guests