The configuration of the TFTP server on Mac and the firmware upgrade for TP-Link, tftptp-link

Source: Internet
Author: User
Tags file transfer protocol

The configuration of the TFTP server on Mac and the firmware upgrade for TP-Link, tftptp-link
1. TFTP protocol

Simple File Transfer Protocol Trivial File Transfer Protocol (TFTP) is a simple and low-cost File Transfer Protocol based on UDP Protocol, allowing the client to get or put files to a remote host. Because of its high overhead, TFTP is used to guide computers, such as routers without large storage capacity. This is why many routers use tftp for upgrade. This Protocol is very interesting. If you are interested, please refer to the following two URLs:

Chinese wiki or English wiki

RFC 1350 the tftp protocol (REVISION 2)

2. Configure and start TFTP1 in Mac)

Mac comes with TFTP by default. Configuration File Location:/System/Library/LaunchDaemons/tftp. plist.

Modify the configuration file and remove the following two lines:

        <key>Disabled</key>        <true/>

Add the following configuration (optional) 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, enable insecure mode. -L option. Use syslog To record logs of all requests. For more information, see man tftpd. (open the terminal and enter this command ).

II./private/tftpboot is the default path. You need to change its read/write permissions (very important) and run the following command:

chmod -R 777 /private/tftpboot 

2) Start

sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plistsudo launchctl start com.apple.tftpd

Run the preceding two commands. If no error is reported, the startup is successful. To view logs, run the following command:

tail -f /var/log/system.log

The obtained log is 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 location seems to have an error, but it does not affect usage. If you have a master, please advise how to handle it.

3) Disable

sudo launchctl unload -F /System/Library/LaunchDaemons/tftp.plistsudo launchctl stop com.apple.tftpd

3. Use of the TFTP protocol

After starting the TFTP server, we can use TFTP to connect to the server and obtain or submit files. The following command line is used for Demonstration:

***:~ ***$ 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> quit

Simple Description: we have obtained the 1.txt (/private/tftpboot/1.txt) file from the tftpserver through tftp.

Connect host-name [port] to connect to the server. For other commands, see man tftp.

4. Use TFTP to update TP-Link firmware

If the above steps have been completed successfully, it is easy to use TFTP of MAC to upgrade TP-Link. You only need to search for the firmware download of your vro on the TP-Link official website, put the BIND file in the/private/tftpboot directory, and enter the vro192.168.192.168.1.1. Then, upgrade the firmware and click a few buttons. Please try again.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.