I selected the A column, then clicked on the tab named Data and clicked on the Text to Columns button.
#Mikrotik address list new Pc#
I transferred this file to my PC and opened it in Excel.Įxcel will open it as the text file, where every line is in the single cell. I didn’t need all those values, but I had the good starting point to begin with. This option allowed me to export all settings as the text file with values separated with spaces. I checked again all print options and found the solution ip dhcp-server lease print terse file=dhcp_leases This option printed all information, but parsing is too complicated. The second attempt was with the command: ip dhcp-server lease print value-list file=dhcp_leases When I opened the file dhcp_leases.txt it was in the same output like on the screen. I tried to print the list into the file with the command: ip dhcp-server lease print file=dhcp_leases Even better, we can add the option file=filename (notice that we don’t need to specify extension) to redirect output into the file with name filename.txt. The print command can be modified to display information in the different formats. The solution was to change the output format.
#Mikrotik address list new mac#
I had only the IP addresses and MAC addresses, but not the host names too. MikroTik printed the portion of this list and that was not what I want. I opened the integrated terminal window and typed the command: ip dhcp-server lease print It’s time for the power of the command line. However, we can’t export this list from the GUI. Keep in mind – in most cases, the columns Address and Active Address, like MAC Address and Active MAC Address, will contain the same values. The most interesting columns are (Active) Address, (Active) MAC Address and Active Host Name. I chose the Leases tab.Īs you can see on this screenshot, we have the complete list of all active leases (and even reservations).
![mikrotik address list new mikrotik address list new](https://netpro.lv/wp-content/uploads/2020/12/1-1024x507.png)
I opened WinBox and navigated to the DHCP Server window. I exported the whole list into the text file that can be later parsed in Excel.
![mikrotik address list new mikrotik address list new](https://linux-sys-adm.com/wp-content/uploads/2015/07/mikrotik1.jpg)
![mikrotik address list new mikrotik address list new](https://i.ytimg.com/vi/a1ztldSXDxI/maxresdefault.jpg)
To speed up this process, the customer asked me for the current DHCP leases list. After a while, the customer decided to move that DHCP to another host. In one productional network, I used the MikroTik router also as the DHCP server for their LAN.