[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tftp



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marcelo, os serviços inet ouve conexões  e inicia o servidor
especifico para cada serviço. Já tive problemas parecidos com o seu e
o que fiz foi alterar a linha

 tftp        dgram   udp wait    nobody  /usr/sbin/tcpd
/usr/sbin/in.tftpd /srv/tftp
para

 tftp        dgram   udp wait.100    nobody  /usr/sbin/tcpd
/usr/sbin/in.tftpd /srv/tftp

ou ainda

tftp        dgram   udp nowait    nobody  /usr/sbin/tcpd
/usr/sbin/in.tftpd /srv/tftp

Este numero 100 (pode ser maior ou menor) indica quantas instâncias
serão abertas e ficaram ouvindo por conexões. Portanto, serve até como
um limitador de conexões.

Teste e reporte na dup se tiver sucesso.

Abraco

Francisco.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org

iD8DBQFHTbFAqhvCVgG8c9YRAmpHAJ9XpjCp6IH0oCcn1qkc9fTxUbWMaACfTN2C
rIHlCHmlw2jPe1fZITUmuvE=
=RSRu
-----END PGP SIGNATURE-----

On 11/28/07, marcellobm <marcellobm@gmail.com> wrote:
> Olá pessoal,
>         estou enfrentando um problema bem estranho com TFTPd no debian etch, onde ele simplesmente para sem motivo aparente.
>         Eu uso o tftp pois tenho uma rede de Cable Modens que precisam pegar arquivos de modem desse TFTP para efetuar o procedimento de ficar online (implementar o DOCSIS 1.1).
>         Pois bem, o tftpd que instalei é o pacote padrão (apt-get install tftpd), e o mesmo roda no inetd. Por motivos de compatibilidade com um sistema de gerenciamento que tenho, coloquei o repositório do TFTP no /tftpboot.
>
>         Segue configuração do inetd e dir para o TFTP:
>
> ###Arquivo de configuração
> ns-mns:/var/log# cat /etc/inetd.conf
> #:BOOT: TFTP service is provided primarily for booting.  Most sites
> #       run this only on machines acting as "boot servers."
> tftp            dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /tftpboot
>
> ###Permissões
>  ns-mns:/var/log# ls -la
>  drwxrwxrwx  2 root root  4096 2007-11-24 21:23 tftpboot
>
>  ns-mns:/tftpboot# ls -la
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-05 10:17 UP0300K
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-05 10:17 UP0600K
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-05 10:23 UP0MDU
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-05 10:19 UP1100K
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-06 10:35 UP1150K
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-05 10:20 UP1200K
>  -rwxrwxrwx  1 nobody suporte   4203 2007-06-05 10:20 UP1300K
>
>  ns-mns:/var/log# cat /etc/hosts.allow
>  in.tftpd : ALL
>
> ###LOGS
>  ns-mns:/var/log# grep tftp daemon.log
>  ### Momentos antes da parada
>  Nov 27 11:41:02 ns-mns in.tftpd[10997]: connect from 10.0.0.1 (10.0.0.1)
>  Nov 27 11:41:02 ns-mns tftpd[10998]: tftpd: trying to get file: UP0100K
>  Nov 27 11:41:02 ns-mns tftpd[10998]: tftpd: serving file from /tftpboot
>  Nov 27 11:41:11 ns-mns in.tftpd[10999]: connect from 10.0.0.1 (10.0.0.1)
>  Nov 27 11:41:11 ns-mns tftpd[11000]: tftpd: trying to get file: UP0150K
>  Nov 27 11:41:11 ns-mns tftpd[11000]: tftpd: serving file from /tftpboot
>
>  ### Momentos após killall inetd
>  Nov 27 13:54:41 ns-mns in.tftpd[12605]: connect from 10.0.0.1 (10.0.0.1)
>  Nov 27 13:54:41 ns-mns in.tftpd[12607]: connect from 10.0.0.1 (10.0.0.1)
>  Nov 27 13:54:41 ns-mns tftpd[12608]: tftpd: trying to get file: UP0150K
>  Nov 27 13:54:41 ns-mns tftpd[12608]: tftpd: serving file from /tftpboot
>  Nov 27 13:54:41 ns-mns in.tftpd[12609]: connect from 10.0.0.1 (10.0.0.1)
>  Nov 27 13:54:41 ns-mns tftpd[12610]: tftpd: trying to get file: UP3100K
>  Nov 27 13:54:41 ns-mns tftpd[12610]: tftpd: serving file from /tftpboot
>
> ###Um dado muito estranho que noto quando o TFTP para (atentar para o valor de Recv-Q):
>  ns-mns:/var/log# netstat -ntlpu
>  Active Internet connections (only servers)
>  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
>  udp   109344   0    0.0.0.0:69              0.0.0.0:*                          12604/inetd
>  Ps.: Valor normal para o Recv-Q é zero "0".
>
> ###Conferindo o manual do netstat
>  ns-mns:/var/log#man netstat
>    Recv-Q
>        The count of bytes not copied by the user program connected to this socket.
>
> Ps.: O que pode causar essa situação, dado que entre o Cable Modem e o TFTPd, tem apenas um CMTS fazendo relay de DHCP (o procedimento de pegar o arquivo do TFTP e pegar IP estão íntimamente ligados).
>
> ### Tentativa desesperada de parar a instabilidade - Reinstalando o serviço
>  ns-mns:/var/log# grep tftp * | grep -v daemon.log | grep -v syslog
>  dpkg.log.1:2007-11-23 08:32:31 status installed tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:33 remove tftpd 0.17-15 0.17-15
>  dpkg.log.1:2007-11-23 08:32:33 status half-configured tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status half-installed tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status config-files tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 purge tftpd 0.17-15 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status config-files tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status config-files tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status config-files tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status config-files tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status config-files tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:34 status not-installed tftpd <none>
>  dpkg.log.1:2007-11-23 08:32:49 install tftpd <none> 0.17-15
>  dpkg.log.1:2007-11-23 08:32:49 status half-installed tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:49 status unpacked tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:49 status unpacked tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:50 status unpacked tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:50 status half-configured tftpd 0.17-15
>  dpkg.log.1:2007-11-23 08:32:50 status installed tftpd 0.17-15
>
> ###Interfaces e rotas
>  eth1      Link encap:Ethernet  HWaddr 00:15:C5:5F:FA:E6
>            inet addr:10.1.0.2  Bcast:10.1.255.255  Mask:255.255.0.0
>            inet6 addr: fe80::215:c5ff:fe5f:fae6/64 Scope:Link
>            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>            RX packets:44505679 errors:0 dropped:0 overruns:0 frame:0
>            TX packets:38978230 errors:0 dropped:0 overruns:0 carrier:0
>
>  ns-mns:/var/log# route -n
>  Kernel IP routing table
>  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
>  10.0.0.0        10.1.0.1        255.255.0.0     UG    0      0        0 eth1
>
>  Nota:
>  10.0.0.0/16 - Rede dos CM
>  10.1.0.1/16 - CMTS
>  10.1.0.2/16 - TFTP/DHCP
>
>
> --
> ------------------------------
> Marcello Barreto de Medeiros
>   Network Admin/Programmer
>   +55 84 3231 4617 [Office]
>   +55 84 9914 3254 [Mobile]
> marcello@linconet.com.br [MSN]
>       Linconet Brasil
> ------------------------------
>



Reply to: