Get a specific ipv6

Hello,

I am trying to get a specific ipv6 address of an interface.

I have this:

/ipv6 address print as-value where interface=ether1 from-pool=pool_dg

This one is working. At least it shows me the correct address inside the console. Is it correct to have 2 statements after one “where”? Its like an “and” condition right?

/ipv6 address print as-value where interface=ether1 from-pool=pool_dg

Unfortunately this give me no output and I don’t really know why.
I need just the ipv6 without prefix in my var to update a DNS record.


Maybe someone has some minutes for me to explain to me what I am doing wrong? :slight_smile:

I found a solution for me.

:local ipv6 [/ipv6 address get 0 address]

Gives me my current address with prefix.

But I still would like to know why its not working with. It looks like “find” is only working with ipv4.

:local ipv6 [/ipv6 address get [find interface=ether1] address]

The find command can return multiple items.

Have you tried specifying the search to limit the number of results?


:put [ /ipv6 address get [ find interface=bridge-lan ] address ]
invalid internal item number
:put [ /ipv6 address get [ find interface=bridge-lan !link-local ] address ]
2a02::xx:xx:xxxx::/64