Hi All.
I need to get neighbors by interface. The code below works in v6, but v7 (including 7.20.6) gives me 0
:put [:len [/ip neighbor find interface="ether1"]]
Did I miss any changes, or is this a bug?
Hi All.
I need to get neighbors by interface. The code below works in v6, but v7 (including 7.20.6) gives me 0
:put [:len [/ip neighbor find interface="ether1"]]
Did I miss any changes, or is this a bug?
No that should work. Unless... ether1 is part of a bridge (and IP neighbors show BOTH ether1 and bridge) because in that case you need find interface=ether1,bridge or find interface~"ether1"
Thanks Amm0, ~"ether1" works. My mistake, all tested v7 routers had the port in bridge.
Yeah, the fact interface can be array is new in V7 if I recall.
So the ~ is regex matcher, but.. you do have to be careful that you don't have a ether11 since that would also match.