I’will try this for you, the problem is I do not use this IP Range on my Router !
My Question to you, You use dynamic or static IP leases ???
And why do you need this only for 9 IP addresses ???
I do make-static lease, I want to add them to an address list for mangle rules for queues. I have my Business PC in this range, another has Gaming Console, another TV/DVR, etc..
I had already made changes to your original script to put the addresses in one list and I added host-name to the comments and log output!
## IPv6 address lists for subnet range ##
## Adapted from: ##
## IPv6 auto address lists ##
## Orignally Written by:BrasDeutscher,PA,Brazil ##
## Tested under RouterOS v6.37rc30 ##
{
## Set your list name here ##
:local listn "Priority"
## Set your list time-out here ##
:local tou "7d"
:local host
:local ipv4
:local ipv6
:local mac
:local comm
## Set your range in from= and to= ##
:for i from= 80 to= 89 do={
## Set your IP address ##
:set ipv4 "192.168.88.$i";
## !!-- DO NOT CHANGE ANY MORE BELOW --!! ##
:if ([/ip dhcp-server lease find where address=$ipv4 ] != "") do={
:set host [/ip dhcp-server lease get [find where address=$ipv4 ] host-name];
:set mac [/ip dhcp-server lease get [find where address=$ipv4 ] mac-address];
:if ([/ipv6 neighbor find where mac-address=$mac ] != "" ) do={
:set ipv6 [/ipv6 neighbor get [find where mac-address=$mac ] address ];
:if ([/ipv6 firewall address-list find where address=$ipv6 ] != $ipv6 ) do={
:set comm "$host - $ipv4";
/ipv6 firewall address-list add list= $listn address="$ipv6" timeout="$tou" comment= $comm
:log warning ("Add IPv6 Address List for $listn - $comm : $ipv6");
}}}}}
thanks, i add some code to the script for my simple queue Qos on target device in my home network.
Create task scheduler that run the script every 15 min.
look:
IPv6 address lists for subnet range
Adapted from:
IPv6 auto address lists
Orignally Written by:BrasDeutscher,PA,Brazil
Tested under RouterOS v6.37rc30
{
Set your list name here
:local listn "Dispositivos"
Set your list time-out here
:local tou "6h"
:local host
:local ipv4
:local ipv6
:local mac
:local comm
Set your range in from= and to=
:for i from= 10 to= 252 do={
Set your IP address
:set ipv4 "192.168.10.$i";
!!-- DO NOT CHANGE ANY MORE BELOW --!!
:if ([/ip dhcp-server lease find where address=$ipv4 ] != "") do={
:set host [/ip dhcp-server lease get [find where address=$ipv4 ] host-name];
:set mac [/ip dhcp-server lease get [find where address=$ipv4 ] mac-address];
:if ([/ipv6 neighbor find where mac-address=$mac ] != "" ) do={
:set ipv6 [/ipv6 neighbor get [find where mac-address=$mac ] address ];
:if ([/ipv6 firewall address-list find where address=$ipv6 ] != $ipv6 ) do={
:set comm "Agregando $host - $ipv4";
/ipv6 firewall address-list add list= $listn address="$ipv6" timeout="$tou" comment= $comm
:log warning ("Add IPv6 Address List for $listn - $comm : $ipv6");
Added for Mauricio Nowak - update simple queue target with ipv6 addres from prefix isp.