Community discussions

MikroTik App
 
juanmol
just joined
Topic Author
Posts: 2
Joined: Thu Jan 15, 2015 3:11 pm

variable with the MAC

Thu Jan 15, 2015 4:49 pm

Hi, i need a variable with the MAC. I've experience with bash but nothing with RouterOS. If i run:
interface print
i can see the MAC, but how i put it on a variable?
 
Nova
newbie
Posts: 25
Joined: Mon Aug 04, 2014 3:44 pm
Location: Spain // Germany

Re: variable with the MAC

Fri Jan 16, 2015 12:34 pm

hello,

for example:
:local macaddress [/interface get ether1 mac-address]
 
juanmol
just joined
Topic Author
Posts: 2
Joined: Thu Jan 15, 2015 3:11 pm

Re: variable with the MAC

Fri Jan 16, 2015 2:05 pm

i'm doing something wrong:
[admin@MikroTik] > :local macaddress [/interface get ether1 mac-address]
[admin@MikroTik] > :put $macaddress

[admin@MikroTik] >

:?
 
Nova
newbie
Posts: 25
Joined: Mon Aug 04, 2014 3:44 pm
Location: Spain // Germany

Re: variable with the MAC

Mon Jan 19, 2015 10:40 am

together:
:local macaddress [/interface get ether1 mac-address]; :put $macaddress

Who is online

Users browsing this forum: No registered users and 5 guests