:local MGMTIP [/ip address get value-name=address number=[:pick [find interface=LOOPBACK ] 0]]
Curiously, if you use 1 instead of 0, and DON'T have more than one address on the interface, it will grab an address from another interface. :-( On Jan 18, 2014, at 4:01 PM, Butch Evans <[email protected]> wrote: > I have the following code: > :local MGMTIP [/ip address get value-name=address number=[find > interface=LOOPBACK ]] > > (sorry...line wrap) > > This works as expected and sets the variable correctly IF there is only one > IP on the interface. I need to set this variable to the FIRST IP assigned to > the interface. Any ideas how to accomplish this? This code fails with > "invalid internal item number" if more than one IP is assigned. > > -- > Butch Evans > 702-537-0979 > Network Support and Engineering > http://store.wispgear.net/ > http://www.butchevans.com/ > _______________________________________________ > Mikrotik mailing list > [email protected] > http://mail.butchevans.com/mailman/listinfo/mikrotik > > Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS _______________________________________________ Mikrotik mailing list [email protected] http://mail.butchevans.com/mailman/listinfo/mikrotik Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS

