Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #2998 > unrolled thread

tftp configuration

Started byebenZEROONE@verizon.net (Hactar)
First post2014-06-23 14:38 -0400
Last post2014-06-25 09:07 +0200
Articles 8 — 2 participants

Back to article view | Back to comp.os.linux.networking


Contents

  tftp configuration ebenZEROONE@verizon.net (Hactar) - 2014-06-23 14:38 -0400
    Re: tftp configuration ein <ein@no.spam> - 2014-06-24 04:07 +0200
      Re: tftp configuration ebenZEROONE@verizon.net (Hactar) - 2014-06-23 22:52 -0400
        Re: tftp configuration ein <ein@no.spam> - 2014-06-24 09:29 +0200
          Re: tftp configuration ebenZEROONE@verizon.net (Hactar) - 2014-06-24 15:05 -0400
            Re: tftp configuration ein <ein@no.spam> - 2014-06-25 08:58 +0200
              Re: tftp configuration ein <ein@no.spam> - 2014-06-25 09:04 +0200
                Re: tftp configuration ein <ein@no.spam> - 2014-06-25 09:07 +0200

#2998 — tftp configuration

FromebenZEROONE@verizon.net (Hactar)
Date2014-06-23 14:38 -0400
Subjecttftp configuration
Message-ID<ep8m7b-3h9.ln1@pc.home>
I'm trying to set up a TFTP server on my machine (Ubuntu 13.04 LTS I
think, or maybe 12.04 LTS).  It's hpa-tftp, run by xinetd.  I need it to
download the firmware loader into a router so I can put DD-WRT on it.
How do I configure the server?  Is there some file that maps a MAC
address to a given file?  Does the client identify itself somehow and
the image needs to be named a certain thing or in a certain place to
go to that client?  Does the server log something on success?  Do I have
to do something to hosts_allow to enable it?  Curious minds, etc.

Oh, the xinetd control file I have is:

{
            socket_type     = dgram
            protocol        = udp
            wait            = yes
            user            = root
            server          = /usr/sbin/in.tftpd
            server_args     = -s /var/lib/tftpboot
}

Does that look reasonable?  Thanks

-- 
-eben    QebWenE01R@vTerYizUonI.nOetP    ebmanda.redirectme.net:81
LIBRA:  A big promotion is just around the corner for someone
much more talented than you.  Laughter is the very best medicine,
remember that when your appendix bursts next week.  -- Weird Al

[toc] | [next] | [standalone]


#2999

Fromein <ein@no.spam>
Date2014-06-24 04:07 +0200
Message-ID<loamgc$j48$1@node2.news.atman.pl>
In reply to#2998
Hactar wrote:
> I'm trying to set up a TFTP server on my machine (Ubuntu 13.04 LTS
> I think, or maybe 12.04 LTS).  It's hpa-tftp, run by xinetd.  I
> need it to download the firmware loader into a router so I can put
> DD-WRT on it. How do I configure the server?  Is there some file
> that maps a MAC address to a given file?  Does the client identify
> itself somehow and the image needs to be named a certain thing or
> in a certain place to go to that client?  Does the server log
> something on success?  Do I have to do something to hosts_allow to
> enable it?  Curious minds, etc.

It's hard to say. Show us - How recovery procedure looks like?
Is device dead?

The most common way is usually hard reset of the device or bricked
device sends broadcast packets with DHCP discover with selected option 60.

Then device starts bootstrap and tries to download a file from TFTP
server. You will see that in logs, I mean who want to download what
and if it succeed. It's very big shortcut. Go there to read more how
PXE-DHCP Handshake looks like:
http://blogs.technet.com/b/dominikheinz/archive/2011/03/18/dhcp-amp-pxe-basics.aspx

DHCP server must be configured for this. My config looks like:

# DHCP server network
subnet 10.1.1.0
# network mask
netmask 255.255.255.224
{
     authoritative;
     range 10.1.1.21 10.1.1.30;
     option broadcast-address 10.1.1.31;
     option routers 10.1.1.1;

     option netbios-name-servers 10.1.1.1;
     range dynamic-bootp 10.1.1.15 10.1.1.17;
     option domain-name-servers 10.1.1.1,62.179.1.62,62.179.1.63;
     use-host-decl-names on;

### Begin of PXE part ###
     if substring (option vendor-class-identifier, 0, 9) = "PXEClient"
         {
                filename "pxe/pxelinux.0";
         }
### End of PXE part ###
}


> Oh, the xinetd control file I have is:
> 
> { socket_type     = dgram protocol        = udp wait            =
> yes user            = root server          = /usr/sbin/in.tftpd 
> server_args     = -s /var/lib/tftpboot }
> 
> Does that look reasonable?  Thanks

Yes, add "-vvv" to arguments to get more noise about tftpd actions.



[toc] | [prev] | [next] | [standalone]


#3000

FromebenZEROONE@verizon.net (Hactar)
Date2014-06-23 22:52 -0400
Message-ID<io5n7b-7of.ln1@pc.home>
In reply to#2999
In article <loamgc$j48$1@node2.news.atman.pl>, ein  <ein@no.spam> wrote:
> Hactar wrote:
> > I'm trying to set up a TFTP server on my machine (Ubuntu 13.04 LTS
> > I think, or maybe 12.04 LTS).  It's hpa-tftp, run by xinetd.  I
> > need it to download the firmware loader into a router so I can put
> > DD-WRT on it. How do I configure the server?  Is there some file
> > that maps a MAC address to a given file?  Does the client identify
> > itself somehow and the image needs to be named a certain thing or
> > in a certain place to go to that client?  Does the server log
> > something on success?  Do I have to do something to hosts_allow to
> > enable it?  Curious minds, etc.
> 
> It's hard to say. Show us - How recovery procedure looks like?
> Is device dead?

Dunno.  How do I tell?  When I power it up, the power light blinks for a
while and eventually turns green.  No other light turn on.   If I then
connect its WAN port to my other router, the "WAN Ethernet" light turns
green and flickers every few seconds, and the "Internet" lights turns
orange.

> The most common way is usually hard reset of the device or bricked
> device sends broadcast packets with DHCP discover with selected option 60.

I've given it a 30/30/30 reset.  The DHCP server (the other router) lists
several devices to which it has given addresses in the last few hours,
but none are this router.  I thought maybe it gave up on DHCP before the
ethernet was connected so I power-cycled it with the ethernet hooked up;
same story, no go.

> Then device starts bootstrap and tries to download a file from TFTP
> server. You will see that in logs, I mean who want to download what
> and if it succeed. It's very big shortcut. Go there to read more how
> PXE-DHCP Handshake looks like:
> http://blogs.technet.com/b/dominikheinz/archive/2011/03/18/dhcp-amp-pxe-basics.aspx

Thanks.  It doesn't like this machine (or me in particular), as neither
Firefox nor Chrome can log in.  I'll have to try it elsewhere.

> DHCP server must be configured for this. My config looks like:
> 
> # DHCP server network
> subnet 10.1.1.0
> # network mask
> netmask 255.255.255.224
> {
>      authoritative;
>      range 10.1.1.21 10.1.1.30;
>      option broadcast-address 10.1.1.31;
>      option routers 10.1.1.1;
> 
>      option netbios-name-servers 10.1.1.1;
>      range dynamic-bootp 10.1.1.15 10.1.1.17;
>      option domain-name-servers 10.1.1.1,62.179.1.62,62.179.1.63;
>      use-host-decl-names on;
> 
> ### Begin of PXE part ###
>      if substring (option vendor-class-identifier, 0, 9) = "PXEClient"
>          {
>                 filename "pxe/pxelinux.0";
>          }
> ### End of PXE part ###
> }

I guess I need to implement that in the router's DHCP server.  Where does
one get pxelinux.0 and where does it go?

> > Oh, the xinetd control file I have is:
> > 
> > { socket_type     = dgram protocol        = udp wait            =
> > yes user            = root server          = /usr/sbin/in.tftpd 
> > server_args     = -s /var/lib/tftpboot }
> > 
> > Does that look reasonable?  Thanks
> 
> Yes, add "-vvv" to arguments to get more noise about tftpd actions.

Thanks.

-- 
-eben    QebWenE01R@vTerYizUonI.nOetP    ebmanda.redirectme.net:81
LIBRA:  A big promotion is just around the corner for someone
much more talented than you.  Laughter is the very best medicine,
remember that when your appendix bursts next week.  -- Weird Al

[toc] | [prev] | [next] | [standalone]


#3001

Fromein <ein@no.spam>
Date2014-06-24 09:29 +0200
Message-ID<lob9c0$33u$1@node2.news.atman.pl>
In reply to#3000
Hactar wrote:
> In article <loamgc$j48$1@node2.news.atman.pl>, ein  <ein@no.spam> wrote:
>> Hactar wrote:
>>> I'm trying to set up a TFTP server on my machine (Ubuntu 13.04 LTS
>>> I think, or maybe 12.04 LTS).  It's hpa-tftp, run by xinetd.  I
>>> need it to download the firmware loader into a router so I can put
>>> DD-WRT on it. How do I configure the server?  Is there some file
>>> that maps a MAC address to a given file?  Does the client identify
>>> itself somehow and the image needs to be named a certain thing or
>>> in a certain place to go to that client?  Does the server log
>>> something on success?  Do I have to do something to hosts_allow to
>>> enable it?  Curious minds, etc.
>>
>> It's hard to say. Show us - How recovery procedure looks like?
>> Is device dead?
> 
> Dunno.  How do I tell?  When I power it up, the power light blinks for a
> while and eventually turns green.  No other light turn on.   If I then
> connect its WAN port to my other router, the "WAN Ethernet" light turns
> green and flickers every few seconds, and the "Internet" lights turns
> orange.

Most of devices has recovery procedure(s). You should study your
device's user manual. You didn't even write its name.

>> The most common way is usually hard reset of the device or bricked
>> device sends broadcast packets with DHCP discover with selected option 60.
> 
> I've given it a 30/30/30 reset.  The DHCP server (the other router) lists
> several devices to which it has given addresses in the last few hours,
> but none are this router.  I thought maybe it gave up on DHCP before the
> ethernet was connected so I power-cycled it with the ethernet hooked up;
> same story, no go.

If the device doesn't have recovery procedure then most likely there is
also an option to connect service console port and upload firmware via
so called zmodem protocol using that console serial connection.

>> Then device starts bootstrap and tries to download a file from TFTP
>> server. You will see that in logs, I mean who want to download what
>> and if it succeed. It's very big shortcut. Go there to read more how
>> PXE-DHCP Handshake looks like:
>> http://blogs.technet.com/b/dominikheinz/archive/2011/03/18/dhcp-amp-pxe-basics.aspx
> 
> Thanks.  It doesn't like this machine (or me in particular), as neither
> Firefox nor Chrome can log in.  I'll have to try it elsewhere.
> 
>> DHCP server must be configured for this. My config looks like:
>>
>> # DHCP server network
>> subnet 10.1.1.0
>> # network mask
>> netmask 255.255.255.224
>> {
[...]
>>
>> ### Begin of PXE part ###
>>      if substring (option vendor-class-identifier, 0, 9) = "PXEClient"
>>          {
>>                 filename "pxe/pxelinux.0";
>>          }
>> ### End of PXE part ###
>> }
> 
> I guess I need to implement that in the router's DHCP server.  Where does
> one get pxelinux.0 and where does it go?

Please study documentation:
http://www.syslinux.org/wiki/index.php/PXELINUX
http://www.debian-administration.org/article/478/Setting_up_a_server_for_PXE_network_booting

[toc] | [prev] | [next] | [standalone]


#3002

FromebenZEROONE@verizon.net (Hactar)
Date2014-06-24 15:05 -0400
Message-ID<louo7b-q3b.ln1@pc.home>
In reply to#3001
In article <lob9c0$33u$1@node2.news.atman.pl>, ein  <ein@no.spam> wrote:
> Hactar wrote:
> > In article <loamgc$j48$1@node2.news.atman.pl>, ein  <ein@no.spam> wrote:
> >> Hactar wrote:
> >>> I'm trying to set up a TFTP server on my machine (Ubuntu 13.04 LTS
> >>> I think, or maybe 12.04 LTS).  It's hpa-tftp, run by xinetd.  I
> >>> need it to download the firmware loader into a router so I can put
> >>> DD-WRT on it. How do I configure the server?  Is there some file
> >>> that maps a MAC address to a given file?  Does the client identify
> >>> itself somehow and the image needs to be named a certain thing or
> >>> in a certain place to go to that client?  Does the server log
> >>> something on success?  Do I have to do something to hosts_allow to
> >>> enable it?  Curious minds, etc.
> >>
> >> It's hard to say. Show us - How recovery procedure looks like?
> >> Is device dead?
> > 
> > Dunno.  How do I tell?  When I power it up, the power light blinks for a
> > while and eventually turns green.  No other light turn on.   If I then
> > connect its WAN port to my other router, the "WAN Ethernet" light turns
> > green and flickers every few seconds, and the "Internet" lights turns
> > orange.
> 
> Most of devices has recovery procedure(s). You should study your
> device's user manual.

I bought it used.  Didn't get a manual.  It may be online, but odds are
it wouldn't say jack about how to configure a TFTP server.

> You didn't even write its name.

That's because my question was "how do you configure a TFTP server", not
something about this router or DHCP.  It's an Actiontec MI424-WR rev D,
BTW. I mean, step 4 of the DD-WRT installation instructions at
http://dd-wrt.com/wiki/index.php/MI424WR is "Prep a TFTP server or
install one for use.".  Installation and (re)starting one I got.

> >> The most common way is usually hard reset of the device or bricked
> >> device sends broadcast packets with DHCP discover with selected option 60.
> > 
> > I've given it a 30/30/30 reset.  The DHCP server (the other router) lists
> > several devices to which it has given addresses in the last few hours,
> > but none are this router.  I thought maybe it gave up on DHCP before the
> > ethernet was connected so I power-cycled it with the ethernet hooked up;
> > same story, no go.
> 
> If the device doesn't have recovery procedure then most likely there is
> also an option to connect service console port and upload firmware via
> so called zmodem protocol using that console serial connection.

The JTAG port was removed in rev D.  If I brick it, looks like I'm hosed.

> > I guess I need to implement that in the router's DHCP server.  Where does
> > one get pxelinux.0 and where does it go?
> 
> Please study documentation:
> http://www.syslinux.org/wiki/index.php/PXELINUX
> http://www.debian-administration.org/article/478/Setting_up_a_server_for_PXE_network_booting

-- 
-eben    QebWenE01R@vTerYizUonI.nOetP    ebmanda.redirectme.net:81
LIBRA:  A big promotion is just around the corner for someone
much more talented than you.  Laughter is the very best medicine,
remember that when your appendix bursts next week.  -- Weird Al

[toc] | [prev] | [next] | [standalone]


#3003

Fromein <ein@no.spam>
Date2014-06-25 08:58 +0200
Message-ID<lodrv7$ba3$1@node1.news.atman.pl>
In reply to#3002
Hactar wrote:
> The JTAG port was removed in rev D.  If I brick it, looks like I'm hosed.

It looks that way... Use Wireshark and confirm that router does not
sends nothing @ broadcast. If not and you're not able to find another
way to connect to serial console then I don't see any other way.

[toc] | [prev] | [next] | [standalone]


#3004

Fromein <ein@no.spam>
Date2014-06-25 09:04 +0200
Message-ID<lods91$bmt$1@node1.news.atman.pl>
In reply to#3003
ein wrote:
> Hactar wrote:
>> The JTAG port was removed in rev D.  If I brick it, looks like I'm hosed.
> 
> It looks that way... Use Wireshark and confirm that router does not
> sends nothing @ broadcast. If not and you're not able to find another
> way to connect to serial console then I don't see any other way.

Try to scan also "popular" IP ranges for ICMP echo replay:
192.168.*/16
172.16.*/12
10.*/8
169.254.*/16

nmap -sP -n subnet1_address/mask subnet2_address/mask

[toc] | [prev] | [next] | [standalone]


#3005

Fromein <ein@no.spam>
Date2014-06-25 09:07 +0200
Message-ID<lodsg1$bmt$2@node1.news.atman.pl>
In reply to#3004
Another idea, try to power it up with pressed reset button, release it
after 30 sec. Watch at Wireshark output in meantime.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.networking


csiph-web