Hello everyone,
I am encountering a problem while trying to create a new DDNS domain to Cloudflare using a script in RouterOS. I have noticed that the following command does not produce any output, despite confirming that my router has an IPv6 address and can access the internet via IPv6:
/ipv6/dhcp-client/get/pppoe-out1 address
However, when I enter the following command, it does display all IPv6 addresses for each port:
/ipv6/address/print
In order to set up DDNS for a specific subdomain on Cloudflare, I need to obtain the IPv6 address bound to pppoe-out1 using the aforementioned command (which did not provide any output). I have tried numerous approaches and tests, but this command simply does not generate any output.
I would greatly appreciate any assistance in resolving this issue. because I am worm out for this mysterious Questions.
I use this for IPv4. Perhaps, you could also use it with IPv6.
My code
([/interface pppoe-client monitor [find name="interface-name"] once as-value]->"local-address")
Try this CLI in your terminal and see if it shows your IPv6 as a return to your query. Then, you can use it in your script.
:put ([/interface pppoe-client monitor [find name="interface-name"] once as-value]->"local-ipv6-address")

I still didn’t get any output when I tested using the commands you provided.
When I checked Interface → pppoe-out1 → status, I found that the IPv6 address here is a local link address, which may be the reason why these commands output nothing.

However, when I checked IPv6 → address, I found that the public IPv6 address has indeed been assigned to the physical port pppoe-out1, and I can access the internet through IPv6. But at the same time, ROS automatically generates several internal IPv6 addresses for local links. Even if I delete these addresses and restart the router, they will still be regenerated.

I am obtaining IPv6 address information via ROS on another computer through SSH and then trimming it into a format usable by Cloudflare through a script. However, I still want to accomplish this script within ROS.