Restore Huawei SmartAX MA5600 Configuration

On the test, I will give an example of creating a backup of the Huawei SmartAX MA5683T configuration to a TFTP server, as well as its restoration.
Recovery is often useful when you need to quickly return to the previous configuration or to make massive changes to the configuration or to profiles that are active and used by the ONT.
OLT reboot is required.

Continue reading “Restore Huawei SmartAX MA5600 Configuration”

Ubiquiti (UBNT) device recovery

It happened when during the process of updating the firmware of RocketM, NanoBeam, NanoStation and other Ubiquiti devices power was lost, or there were some other problems after which the device could not be accessed via the web interface and it did not work.

I will describe in points how you can restore the firmware:

1) Download firmware from the official site, which you need to flash the device.

2) Start TFTP server. I described the launch example in these articles:
Starting a TFTP server in Windows
Installing and Configuring a TFTP Server in Ubuntu.

3) It is imperative to assign the computer exactly this IP address and the subnet mask

4) Turn off the device in which you need to restore the firmware, with the device turned off, press the RESET button and hold it to turn on the power to the device, continue to hold the RESET for 8-10 seconds, and then lower it. With these manipulations, we activate the recovery mode and the LED indicators will flash alternately. The IP address of the device should start pinging, if not pinging, then alas will not be able to recover. To check the ping, the command is executed on the command line:


5) Now we’ll upload the previously downloaded firmware file to the TFTP server directory and send it. From windows, this can be done with the command:

tftp -i put XM-v5.5.4.build16501.bin

From Linux, this is done by commands (you may have to put the firmware file in the user’s home directory):

put XM-v5.5.4.build16501.bin

When the firmware file from the TFTP server is sent to the device, you must wait until the firmware update process occurs and the device automatically reboots.

Is done.

Configuring DHCP+TFTP for DOCSIS

Recently, it was necessary to configure the issuance of IP addresses to several old DOCSIS modems and the host located after the modem.
At hand was the Arris Cadant C3 and Thomson TCM-420 modems.

First of all, let’s start a DHCP server that will issue IP addresses to modems, for example, as I described in this article – Installing and configuring isc-dhcp-server.
And also we will launch a TFTP server on which there will be files for modems, for example, as I described in the article – Installing and Configuring a TFTP Server

Continue reading “Configuring DHCP+TFTP for DOCSIS”

Installing and Configuring a TFTP Server in Ubuntu

TFTP (Trivial File Transfer Protocol) It is mainly used for initial loading of diskless workstations. TFTP, unlike FTP, does not contain authentication capabilities (although it is possible to filter on the IP address) and is based on the transport protocol UDP.
atftpd server
atftp client


sudo apt-get install atftpd atftp

The server uses the port: 69/udp
The default directory is /srv/tftp if it does not exist, create:

sudo mkdir -p /srv/tftp
sudo chown nobody /srv/tftp

To start automatically, you need to comment out (put # at the beginning of the line) the start line in /etc/inetd.conf:

#tftp dgram udp4 wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd –tftpd-timeout 300 –retry-timeout 5 –mcast-port 1758 –mcast-addr –mcast-ttl 1 –maxthread 100 –verbose=5 /srv/tftpd

And change the value of the variable USE_INETD in the file /etc/default/atftpd from true to false.
This can be done in any editor, for example using nano:

sudo nano /etc/default/atftpd

(in the editor the key combination Ctrl+O is used to save the changes, and Ctrl+X to exit).

To apply the changes and run atftpd, run the following command:

sudo /etc/init.d/atftpd restart

Done, TFTP server should work, accept and return files from the /srv/tftp directory.

See also my articles:
IPTables rules for TFTP
Starting a TFTP server in Windows
Configuring DHCP + TFTP for DOCSIS
Install and configure tftpd-hpa

Starting a TFTP server in Windows

One of the options for running the tftp server on Windows is to download and run the application from the link

After running the application to test it, you need to run the tftp client, if it is not installed on Windows, we set it by typing:

dism /online /Enable-Feature /FeatureName:TFTP

Or you can also open the “Control Panel” – “Uninstall the program” or “Programs and components” – “Enable or disable Windows components”, tick the “TFTP Client” and click “OK”.

To transfer and download files from the TFTP server, open the command line and execute the commands:

tftp PUT file.txt
tftp GET file.txt

See also:
Installing and Configuring a TFTP Server in Ubuntu

Backup configuration of TP-Link switches

I wrote a script for backup configuration of TP-Link switches.
The script runs on Linux where the TFTP server is running, it is connected via telnet to the switch and the configuration command is sent to the specified TFTP, when the telnet connection is closed, the file is moved to the desired directory, and the last command deletes files longer than 30 days, as more of them I do not need to store.
You can also make a copy of all the files in the cloud every month.
As you can see, before entering a password in the script, you can not pause.

echo "PASSWORD";
echo "enable";
echo "PASSWORD";
echo "copy startup-config tftp ip-address filename tplink";
sleep 2;
echo "exit";
sleep 1;
echo "exit";
} | telnet

mv /srv/tftp/tplink.cfg /backups/devices/tplink/`date +%Y-%m-%d`_tplink.cfg
find /backups/devices/tplink/ -type f -mtime +30 -exec rm {} \;