• tftp configuration

    From Hactar@110:110/2002 to All on Mon Jun 23 18:38:06 2014
    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

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From ein@110:110/2002 to All on Tue Jun 24 02:07:15 2014
    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.





    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: ATMAN - ATM S.A. (110:110/2002@linuxnet)
  • From Hactar@110:110/2002 to All on Tue Jun 24 02:52:34 2014
    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

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From ein@110:110/2002 to All on Tue Jun 24 07:29:11 2014
    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_ne twork_booting


    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: ATMAN - ATM S.A. (110:110/2002@linuxnet)
  • From Hactar@110:110/2002 to All on Tue Jun 24 19:05:25 2014
    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_ne twork_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

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: A noiseless patient Spider (110:110/2002@linuxnet)
  • From ein@110:110/2002 to All on Wed Jun 25 06:58:56 2014
    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.


    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: ATMAN - ATM S.A. (110:110/2002@linuxnet)
  • From ein@110:110/2002 to All on Wed Jun 25 07:04:10 2014
    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


    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: ATMAN - ATM S.A. (110:110/2002@linuxnet)
  • From ein@110:110/2002 to All on Wed Jun 25 07:07:54 2014
    Another idea, try to power it up with pressed reset button, release it
    after 30 sec. Watch at Wireshark output in meantime.

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: ATMAN - ATM S.A. (110:110/2002@linuxnet)