Forum Discussion
Matthew_Gamble_
Nimbostratus
Mar 12, 2009TFTP Server?
Is it possible to write a simple TFTP server as an iRule to return static content? I see some examples for load balancing TFTP requests, but not for actually acting as a TFTP server. I have a very small and static TFTP file that I need to distribute, and rather than running a dedicated TFTP server it would be far better if it could be deployed as an iRule.
Is this possible? Any resources I should be looking at?
25 Replies
- JRahm
Admin
Yeah, I read the RFC the same way, the server really should ack each segment before sending the next block. I'll work on completing the implementation for future use cases, but it will be a little while. - James_Quinby_46Historic F5 AccountNow if you guys can just figure out a way to serve the LTM ISO from a datagroup, you could build an "Enterprise Manager in an iRule" rule! :D
Hmmm.... - Matthew_Gamble_
Nimbostratus
What format are you putting the file on disk in? I've tried text, binary, and hex, but I keep getting this error:
Mar 23 15:24:54 tmm tmm[13663]: Rule Test-TFTP_Server : Opcode is 1
Mar 23 15:24:54 tmm tmm[13663]: Rule Test-TFTP_Server : String is test.txtÀnetasciiÀ
Mar 23 15:24:54 tmm tmm[13663]: Rule Test-TFTP_Server : File is test.txt, Mode is netascii
Mar 23 15:24:54 tmm tmm[13663]: Rule Test-TFTP_Server : Block is integer, no increment necessary
Mar 23 15:24:54 tmm tmm[13663]: 01220001:3: TCL error: Rule Test-TFTP_Server - expected hexadecimal string but got "M2M2NjZjNjE3NDJkNzA3MjZmNjY2OTZjNjUzZWRhMjAyMDNjMjEyZDJkMjA0MzZmNmU2NjY5Njc3NTcyNjE3NDY5NmY2ZTIwNTA3MjZmNjY2OTZjNjUyMDRkNDcyMDJkMjA0ZDYxNzI2MzY4MjAzMjMzNzI2NDJjMjAzMjMwMzAzOTIwMmQyZDNlZGEyMDIwM2M1MDcyNmY3NjY5NzM2OTZmNmU1ZjQ1NmU2MTYyNmM2NTIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjA3NTYxM2Q1YzIyNmU2MTVjMjIzZTU5NjU3MzNjMmY1MDcyNmY3NjY5NzM2OTZmNmU1ZjQ1NmU2MTYyNmM2NTNlZGEyMDIwM2M1MjY1NzM3OTZlNjM1ZjRmNmU1ZjUyNjU3MzY1NzQyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjA3NTYxM2Q1YzIyNmU2MTVjMjIzZTU5NjU3MzNjMmY1MjY1NzM3OTZlNjM1ZjRmNmU1ZjUyNjU3MzY1NzQzZWRhMjAyMDNjNTI2NTczNzk2ZTYzNWY1MjYxNmU2NDZmNmQ1ZjQ0NjU2YzYxNzkyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwNzU2MTNkNWMyMjZlNjE1YzIyM2UzMjNjMmY1MjY1NzM3OTZlNjM1ZjUyNjE2ZTY0NmY2ZDVmNDQ2NTZjNjE3OTNlZGEyMDIwM2M1MjY1NzM3OTZlNjM1ZjUwNjU3MjY5NmY2NDY5NjMyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjAyMDIwMjA3NTYxM2Q1YzIyNmU2MTVjMjIzZTMwM2MyZjUyNjU3Mzc5NmU2MzVmNTA2NTcyNjk2ZjY
I followed the directions in http://devcentral.f5.com/wiki/default.aspx/iRules/LTMMaintenancePage.html and it's all on a single line. I'm sure I'm doing something pretty stupid, but if anyone could point me in the right direction it would be greatly appreciated.
Thanks! - James_Quinby_46Historic F5 Accountmgamble -
See here:
http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=343
...for a more complete writeup on the iRule, including a link that will do the hex encoding of the file. - HR_38560
Nimbostratus
Hi there, nice solution.
I'm trying to change this irule to make use of ifiles instead of hex/string converted files/arrays. Anyone manage to do this already, i'm kind of stuck on the part where i divide the binary (ifile) into 512 byte chunks....
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
