Code: Select all
:put [/ip address get [find interface="ether1"] address];
So after som testing I come up with this:
Code: Select all
:put [/ip address get [find interface=[/ip route get [find dst-address=0.0.0.0/0] vrf-interface]] address]
This should find the interface name on the interface with route sending you to internet.
Anyone see anything wrong with this?
Will it work with all MT?