1. TFTP protocol
Simple File Transfer Protocol Trivial file Transfer Protocol ( tftp " is a simple, low-overhead file Transfer protocol based on the UDP protocol that allows a client get or put file to be on a remote host. Because of its overhead,
Chinese Wiki or english Wiki
RFC 1350 the TFTP PROTOCOL (REVISION 2)
2. Configure and start TFTP under Mac1) configuration
The Mac comes with TFTP by default. Configuration file location:/system/library/launchdaemons/tftp.plist.
To modify the configuration file, remove the following two lines:
<key>Disabled</key> <true/>
Add the following configuration (optional), which is to add the-l option:
<array><string>/usr/libexec/tftpd</string><string>-i</string> <string> -l</string><string>/private/tftpboot</string></array>
Brief description:
I,-i option to turn on unsafe mode. The-l option uses syslog to log all requests. For instructions please refer to: Man tftpd (Open terminal, enter this command to see).
II,/private/tftpboot is the default path, need to change its read and write permissions ( very important ), execute the command:
2) Start
sudo launchctl load-f/system/library/launchdaemons/tftp.plistsudo launchctl start com.apple.tftpd
Execute the top two, if there is no error, then the start is successful. If you want to see the log, you can use the following command:
Tail-f/var/log/system.log
The resulting log should be as follows:
Mar 7 14:04:02 ***.local sudo[589]: * * *: tty=ttys000; pwd=/users/***; User=root; Command=/bin/launchctl load-f/system/library/launchdaemons/tftp.plist
Mar 7 14:04:09 ***.local sudo[591]: * * *: tty=ttys000; pwd=/users/***; User=root; Command=/bin/launchctl start Com.apple.tftpdMar 7 14:04:09 ***.local tftpd[593]: Recvfrom:resource temporarily Unavailablemar 7 14:04:09 * * * com.apple.xpc.launchd[1] (com.apple.tftpd[593]): Service exited with abnormal code:1
This position seems to have an error, but does not affect the use, if there are experts please advise how to deal with.
3) Close
sudo launchctl unload-f/system/library/launchdaemons/tftp.plistsudo launchctl Stop com.apple.tftpd
3. Use of TFTP protocol
After starting the TFTP server, we can use TFTP to connect to the server and get or submit the file. Below, use the command line to demonstrate:
: ~ ***$ tftptftp> connect localhosttftp> statusconnected to localhost. Mode:netascii verbose:off tracing:offrexmt-interval:5 seconds, max-timeout:25 secondstftp> verboseVerbose mode on. Tftp> get 1.txtgetting from Localhost:1.txt to 1.txt [netascii]received 9 bytes in 0.0 seconds [INF bits/sec]tftp> q Uit
Simple note: we get 1.txt (/private/tftpboot/1.txt) files from the TFTP server via TFTP.
Connect Host-name [port] to the server. For other commands please refer to: Man tftp.
4. Use TFTP to Tp-link firmware upgrade
If the above steps have been successfully completed, then using the Mac TFTP to Tp-link upgrade is very simple, just need to go to the Tp-link website to search your router's corresponding firmware download, and then put the bin file in the/private/tftpboot directory, and enter the router 192.168.1.1, and then the firmware upgrade, a few clicks on the button will be done. Please feel free to send them all.
Configuration of the TFTP server on Mac and firmware upgrade for Tp-link