Community discussions

MikroTik App
 
tomislav91
Member
Member
Topic Author
Posts: 303
Joined: Fri May 26, 2017 12:47 pm

export dhcp lease with only hostname

Mon Aug 20, 2018 3:36 pm

can i get via terminal ip address of hostname only?

part of my script is
ip dhcp-server lease print file=$n
but this give me all dhcp lease addresses. can I find somehow ip of hostname="pc"?
My all devices have all the same hostname, and i need all ip addresses for all pc's.
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: export dhcp lease with only hostname

Tue Aug 21, 2018 2:52 pm

If I understood correctly, this is what you need.
/ip dhcp-server lease print where hostname=“pc” file=$n

Who is online

Users browsing this forum: baragoon, k6ccc, Lupin, ramin110 and 110 guests