Home > Uncategorized > Creating a tftp server on OS X so that I can update my cisco router

Creating a tftp server on OS X so that I can update my cisco router

July 12th, 2009

Creating a tftp server on Mac OS X so that I can update my cisco router

Setting up

Option One: point to new directory

A config file, tftp.plist for tftpd(8) is in /System/Library/LaunchDaemons/ directory.
This is an XML file. If you need to change tftpd(8) root directory to something other than
/private/tftpboot, edit tftp.plist file and change the <array> tag as follows:

<array>
  <string>/usr/libexec/tftpd</string>
  <string>-i</string>
  <string>/private/tftpboot</string>
</array>

Note: you must restart the tftp server after a change

Option Two: symlink

# sudo ln -s /Users/me/src/running-config running-config

Permissions

chmod 777 file


Personally, what I have done it symlinked files/folders from this directory.

Starting up

If you ever need to use tftpd(8) server on Mac OS X:

# sudo /sbin/service tftp start


This will start a tftpd(8) server on Mac OS X.

Stopping

After the change, tftpd(8) needs to be restarted.

# /sbin/service tftp stop


h2. Checking

To check if everything is working fine type (my ip at the time was 192.1.168.101). I need to set the mode to octet via binary

$ tftp
tftp> connect 192.168.0.101
tftp> status
Connected to 192.168.0.101.
Mode: netascii Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> verbose
Verbose mode on.
tftp> trace
Packet tracing on.
tftp> binary
mode set to octet

Test Run

To get a file type

tftp> get running-config
Categories: Uncategorized Tags: ,
Comments are closed.