On a Mac configure the TFTP server and upgrade the firmware for the TP-Link

1, TFTP protocol
Trivial File Transfer Protocol Trivial File Transfer Protocol (TFTP) is a simple, low-overhead file transfer protocol based on UDP, it allows the client to get or put a file to the remote host. Since it is very cost effective, thus TFTP is used to guide a computer, for example, the router no large memory. This is why many routers are used as an upgrade tftp way. This agreement is very interesting, if you are interested, please refer to the following two URLs:

Chinese or English wiki wiki

RFC 1350 THE TFTP PROTOCOL (REVISION 2)

2, under Mac configure and start the TFTP
1) Configuration
Mac comes with default TFTP. Profile Location: /System/Library/LaunchDaemons/tftp.plist.

Modify the configuration file, remove the following two lines:

<Key> Disabled </ Key>
<to true />
add the following configuration (optional), the -l option is to add:

<array>
<string>/usr/libexec/tftpd</string>
<string>-i</string>
<string>-l</string>
<string>/private/tftpboot</string>
</array>
简要说明:

I, -i option, open unsafe mode. -l option, using the syslog log of all requests. Notes Please refer to: man tftpd (open a terminal and enter this command will be able to see).

II, / private / tftpboot is the default path, needs to change its read and write permissions (very important), execute the command:

-R & lt 777 the chmod / Private / tftpboot
2) Start
the sudo the launchctl Load -F /System/Library/LaunchDaemons/tftp.plist
the sudo the launchctl Start com.apple.tftpd
perform two upper side, if there is no error, then that start successfully. If you want to see the logs can use the following command:

tail -f /var/log/system.log
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 *** the sudo [591]: ***: the TTY = ttys000; = the PWD / the Users / ***; the USER = the root; the COMMAND = / bin /. Start com.apple.tftpd the launchctl
. *** local-Mar 14:04:09 the tftpd. 7 [593]: recvfrom: temporarily. It is unavailable Sign of the Resource
-Mar. 7 14:04:09 *** com.apple.xpc.launchd [. 1] ( com.apple.tftpd [593]): Service exited with abnormal code: 1
this position looks like an error, but does not affect the use, if there is a master Please advise how to deal with.

3) Close
sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl STOP com.apple.tftpd
3, using TFTP protocol
after starting the TFTP server, we can use TFTP to connect to this server, and obtain or submit files. To demonstrate the following command line:


***: *** $ ~ the TFTP
the TFTP> localhost Connect
the TFTP> Status
Connected to localhost.
Mode: netascii Verbose: Tracing OFF: OFF
REXMT-interval The: 5 seconds The, Max-timeout: 25 seconds The
the TFTP> verbose
Verbose the MODE ON.
tftp> gET 1.txt
the Getting from localhost: 1.txt 1.txt to [netascii]
Received 9 bytes in 0.0 seconds the [INF bits / sec]
tftp> quit
simple: we get 1.txt from the tftp server via tftp ( /private/tftpboot/1.txt) file.

Connection Server connect host-name [port]. Other commands, refer to: man tftp.

4, using TFTP to TP-Link firmware update
If the above steps have been successfully completed, with the MAC to TP-Link TFTP upgrade is very simple, just you need to search for TP-Link official website corresponding to your router firmware download, then the bin file into the / private / tftpboot directory, and enter the router 192.168.1.1, then the firmware upgrade, to get a few clicks of a button. Please enjoy almost made it.


---------------------
Author: ForeverNull
Source: CSDN
Original: https: //blog.csdn.net/forevernull/article/details/44115751
Disclaimer: This article as a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/lin-yue/p/11113351.html