LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   tftp (https://www.linuxquestions.org/questions/slackware-14/tftp-578279/)

slpdave 08-19-2007 07:32 PM

tftp
 
Hello all here is another one of my newb questions.

I have an Avila Gateworks routerboard. I need to use tftp to install firmware on it. The directions on how to do this are sketchy at best. I have downloaded the firmware and associated files from www.dd-wrt.com. When I connect to the serial port nothing happens. I have enable the serial port in CMOS, used setserial to set it to hi-speed. setserial gives proper responses to the port located at /dev/ttyS0. how do you tell if tftp is connected?

If anyone has done this before some direction would be great. BTW I have tried it under XP also with no luck telling if the board is working. The processor gets hot and if you plug in a network cable the connection lights light up. but no responses that I know of.

Thanks in advance.
slpdave

ludist 08-20-2007 04:05 AM

Also newbie on this, never tried: But tftp is for lan not for serial (as far as I know)

man tftp

To my understanding, the route has an tftp server. Otherwise you need the opposite.

tftp server on your box and tftp client on your router.

man in.tftpd

slpdave 08-20-2007 07:23 AM

Thank you for the reply. I will retry using the network interface next.

slpdave

erklaerbaer 08-20-2007 09:29 AM

tftp is the protocol you use for network boot, so you'll have to reboot your router and hopefully it will pick up, what is served. you can read how to setup it up on http://alien.slackbook.org/dokuwiki/...=slackware:pxe


EDIT: see next post. thanks for clarifying, eric

Alien Bob 08-20-2007 12:24 PM

Hm... please note that TFTP is not the protocol used for network booting.
TFTP stands for "trivial file transfer protocol" and is used (among others) by network-booting computers to transfer files from a network server to the client.
The tftp protocol is often used for uploads as well - uploads of firmware to embedded devices. Although using a serial cable is safest (you do not share the serial cable with other devices that can interrupt your transfers) using tftp over a network cable is a good second.

Read this link on the OpenWrt Wiki (I would prefer openwrt over dd-wrt because of the controversy about dd-wrt initially being a rip-off of others' hard work): http://wiki.openwrt.org/OpenWrtDocs/...OpenWrtViaTftp
which explains the process of firmware flashing using your Slackware's tftp program.

Eric

slpdave 08-20-2007 01:26 PM

Quote:

Originally Posted by Alien Bob (Post 2864770)
Hm... please note that TFTP is not the protocol used for network booting.
TFTP stands for "trivial file transfer protocol" and is used (among others) by network-booting computers to transfer files from a network server to the client.
The tftp protocol is often used for uploads as well - uploads of firmware to embedded devices. Although using a serial cable is safest (you do not share the serial cable with other devices that can interrupt your transfers) using tftp over a network cable is a good second.

Read this link on the OpenWrt Wiki (I would prefer openwrt over dd-wrt because of the controversy about dd-wrt initially being a rip-off of others' hard work): http://wiki.openwrt.org/OpenWrtDocs/...OpenWrtViaTftp
which explains the process of firmware flashing using your Slackware's tftp program.

Eric


Thank you, Those are some great instructions. I will try that later today.

slpdave

smarthouseguy 08-20-2007 02:56 PM

I have cisco phones that rely on tftp so this is how I went about it...

Code:

nano /etc/inetd.conf
find this line
Code:

# Tftp service is provided primarily for booting.  Most sites
# run this only on machines acting as "boot servers."
# tftp  dgram  udp    wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize

remove the comment.. then make the dir
Code:

mkdir /tftpboot
then...
Code:

nano /etc/dhcpd.conf
this is just an example... use your own subnets dns etc and your own tftp which would probably be eth1 in your machine
Code:

ddns-update-style ad-hoc;
subnet 10.77.76.0 netmask 255.255.255.0
{
range 10.0.0.1 10.0.0.254;
default-lease-time 720;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.1, 10.0.0.2;
option tftp-server-name "10.0.0.1";
}

next...
Code:

nano /etc/rc.d/rc.firewall
just basic ipfwd, not very secure...
Code:

echo 1 > /proc/sys/net/ipv4/ip_forward



iptables --flush


iptables --table nat --flush
iptables --delete-chain


iptables --table nat --delete-chain


iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT

then make it exec and bootable
Code:

chmod 744 /etc/rc.d/rc.firewall
Code:

chmod +x /etc/rc.d/rc.firewall
next...
Code:

nano /etc/rc.d/rc.local
just add a line that says
Code:

dhcpd ethX
replacing X with the eth adapt. u will be using

now, u should be able to run a few simple commands to get everything up and running
Code:

/etc/rc.d/rc.inetd start
/etc/rc.d/rc.firewall
dhcpd

now i would try rebooting that router with it pulling from the linux based router u just created, it should pull the config file from the tftp and there ya go....
u can refer to the man pages for tftp.... i just know this works for me for every tftp need I run into... you will probably want to verify if the filename is mac specific. I know a lot are, and require the mac addy for it to pull the right file... the device makes request for router_config_005896ad5fxx.cfg if the file is not found, nothing happens.

have a great day... hope this helped

Alien Bob 08-20-2007 03:12 PM

Indeed VOIP phones rely on a tftp server for provisioning and firmware updates (the phone is a client in the network), but routers don't pull their firmware off a server. Instead, you need to use a tftp client program on another computer that connects to the tftp server on the router in order to upload a firmware image to the router.

Eric


All times are GMT -5. The time now is 10:49 PM.