Datto NIC Re-order Script


1. Scope

This article explains how to use the Datto NIC reordering script to re-associate the network card configurations on a Datto device. We use this script when doing OS hard drive replacements. In rare cases, we might use it when a NIC fails.

Although Datto appliances no longer depend on a connection to eth0 to check in, this process is still applicable, because eth0 needs to have an expected MAC address matching the device serial. To complete this procedure, you must be on-site with the Datto device.

2. Procedure

Follow these steps:

  1.  Unplug the Datto device from the network.

  2. Connect a keyboard, monitor, and mouse to the Datto device.

  3. Open the Terminal short cut icon located on the desktop of the Datto device. Alternatively, you could press Ctrl-Alt-F1 on the keyboard to access the console.

    Figure 1 - Terminal shortcut icon on the desktop of a Datto Device

  4. In the terminal, run this command to switch to the backup-admin user: 
    su backup-admin

  5. To find your password, go to the partners.dattobackup.com and go to Device > Status.

  6. Switch to the root user: sudo -i

  7. Once logged in as the root user, run the Datto NIC Re-ordering Script:
    php /datto/scripts/reorder.php

    NICReorderLookingforLinkonNetworkJack1.jpgFigure 2 - php /datto/scripts/reorder.php

  8. You should see a prompt requesting that the first NIC be identified. ​​Once this prompt appears, connect a live network cable to the NIC you wish to use as eth0. The terminal prompt will automatically refresh once it detects that the cable has been connected, and will then prompt for the next NIC to be plugged in.

    Remove the network cable from eth0, and plug it into the NIC that you wish to use as eth1. Repeat this process until the message NICs have been reordered is displayed. The prompt should then return you to the root user upon completion.

  9. Connect a live Ethernet cable into NIC1 (eth0). Type in dhclient eth0 to get a DHCP address from the network.

    NICReorderCompleted.jpgFigure 3 - NICs have been reordered

    Tip: In the event that the Datto NIC re-ordering script locates a link on jack 1 and jack 2 at the same time, retry these steps from the beginning. It is often successful on the second try.

  10. Reboot the Datto appliance by typing reboot.

3. Confirm the Datto NIC Re-ordering Script Completed Successfully

After you've run the script, follow these steps to make sure that it worked:

  1. From the terminal prompt, check the inet addr (IP) and subnet mask that are displayed after entering this command:

    terminalifconfig.jpgFigure 4 - Output of an ifconfig command run from the terminal prompt

  2. From the terminal prompt, run this command to check for network connectivity to Datto:

    ping dattobackup.com

    Tip: Unlike the ping command in Windows, the Linux ping command continues until you press CTRL-C.

    terminalping.jpgFigure 5 - Successful ping requests

    You can also type checkin as the root user to allow the device to check in with monitoring services. 
After completing the NIC reorder, you must contact Datto Support to have the device's new MAC address updated in the Administration database. Otherwise, the device will not be able to check in successfully.

Was this article helpful?

3 out of 3 found this helpful

You must sign in before voting on this article.

Want to talk about it? Head on over to our Community Forum!