Setup or configure a TFTP Server on Solaris

This is the procedure on how to setup or configure a TFTP Server on Solaris host.

/tftpboot is the default location of tftp, it can be changed through /etc/inetd.conf file. On this below example, lets juts enable the tftp line and use default /tftpboot

root@solaris10 # vi /etc/inetd.conf

*uncomment this line:
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

*create /tftpboot directory:
root@solaris10 # mkdir /tftpboot
root@solaris10 # chown root /tftpboot
root@solaris10 # chmod 755 /tftpboot
root@solaris10 # cd /tftpboot
root@solaris10 # ln -s . tftpboot

*on this below sample, I move file c2960-lanbasek9-mz.122-55.SE12.bin from root to folder /tftpboot
root@solaris10 # mv c2960-lanbasek9-mz.122-55.SE12.bin /tftpboot/

*chmod the file to 444 (owner/group/other only able to read):
root@solaris10 # chmod 444 c2960-lanbasek9-mz.122-55.SE12.bin
root@solaris10 #

*Use inetconv command to install tftp SMF (Service Management Facility) and bring it online:
root@solaris10 # inetconv -i /etc/inetd.conf
inetconv: Notice: Service manifest for 100235/1 already generated as /var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml, skipped
tftp -> /var/svc/manifest/network/tftp-udp6.xml
Importing tftp-udp6.xml ...Done
root@solaris10 #
root@solaris10 # svcs -a | grep -i tftp
online 12:50:11 svc:/network/tftp/udp6:default
root@solaris10 #

*Let’s do tftp and test download the file:
* is the IP address of Solaris tftp server

*from other Solaris/unix host:
# tftp <tftp-server-host/IP>
tftp> get
Received xxx bytes in x.x seconds
tftp> quit

*Example from Cisco switch:
c2960-SWITCH#copy tftp: flash:
Address or name of remote host []?
Source filename [c2960-lanbasek9-mz.122-55.SE12.bin]?
Destination filename [c2960-lanbasek9-mz.122-55.SE12.bin]?
Accessing tftp://
Loading c2960-lanbasek9-mz.122-55.SE12.bin from (via Vlan1): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 9827106 bytes]
9827106 bytes copied in 187.057 secs (52535 bytes/sec)