PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Noms de domaine > comp.protocols.tcp-ip > TFTP questions
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.protocols.tcp-ip TCP and IP network protocols.

TFTP questions

Réponse
 
LinkBack Outils de la discussion
Vieux 07/06/2006, 18h31   #1
andrew queisser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut TFTP questions

About to implement TFTP for transfers to/from embedded system and I have a
couple of questions:

1) Why does the server switch to an ephemeral port after the initial
connection? The reason I heard is that the pair of ephemeral ports on client
and server side act as a transaction ID. Wouldn't the ephemeral client port
be enough? I don't see the advantage on the server side since the server
already knows which client IP and port each packet belongs to. What am I
missing?

2) The built-in Windows TFTP client does not appear to support server
sockets other than the default 69. Is this typical of most clients? Of
course I could easily write my own client but I'm wondering if it would be
possible to implement a TFTP server on my embedded device (which is limited
to one single UDP port!) and assume that the client already has a TFTP
client available that permits connecting to an arbitrary server socket.


Thanks,
Andrew


  Réponse avec citation
Vieux 08/06/2006, 01h06   #2
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: TFTP questions

In article <Z3Ehg.1615$Kx2.602@news.cpqcorp.net>,
"andrew queisser" <andrewdotqueisser@hp.com> wrote:

> About to implement TFTP for transfers to/from embedded system and I have a
> couple of questions:
>
> 1) Why does the server switch to an ephemeral port after the initial
> connection? The reason I heard is that the pair of ephemeral ports on client
> and server side act as a transaction ID. Wouldn't the ephemeral client port
> be enough? I don't see the advantage on the server side since the server
> already knows which client IP and port each packet belongs to. What am I
> missing?


When the protocol was designed, many UDP API's didn't provide anything
like the connect() operation for UDP sockets, so you couldn't specify
that a socket should only receive packets from a particular remote
address/port. UDP applications could only specify the local port to
listen on. So there was no way to easily dispatch packets to the
appropriate server process for each transfer. So they require the
server to listen on a new, unused port for each connection, and the
well-known port is just used for the initial setup.

> 2) The built-in Windows TFTP client does not appear to support server
> sockets other than the default 69. Is this typical of most clients? Of
> course I could easily write my own client but I'm wondering if it would be
> possible to implement a TFTP server on my embedded device (which is limited
> to one single UDP port!) and assume that the client already has a TFTP
> client available that permits connecting to an arbitrary server socket.


The most common use of TFTP is for network booting, which typically
doesn't provide a way to configure details like this -- the TFTP client
is in the device's ROM, and there's no place for user-specified
parameters.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
Vieux 08/06/2006, 16h55   #3
andrew queisser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: TFTP questions


"Barry Margolin" <barmar@alum.mit.edu> wrote in message
news:barmar-E685E7.20062707062006@comcast.dca.giganews.com...
> In article <Z3Ehg.1615$Kx2.602@news.cpqcorp.net>,
> "andrew queisser" <andrewdotqueisser@hp.com> wrote:
>
>> About to implement TFTP for transfers to/from embedded system and I have
>> a
>> couple of questions:
>>
>> 1) Why does the server switch to an ephemeral port after the initial
>> connection? The reason I heard is that the pair of ephemeral ports on
>> client
>> and server side act as a transaction ID. Wouldn't the ephemeral client
>> port
>> be enough? I don't see the advantage on the server side since the server
>> already knows which client IP and port each packet belongs to. What am I
>> missing?

>
> When the protocol was designed, many UDP API's didn't provide anything
> like the connect() operation for UDP sockets, so you couldn't specify
> that a socket should only receive packets from a particular remote
> address/port. UDP applications could only specify the local port to
> listen on. So there was no way to easily dispatch packets to the
> appropriate server process for each transfer. So they require the
> server to listen on a new, unused port for each connection, and the
> well-known port is just used for the initial setup.
>

Thanks for the background but I think must still be missing something.
Wouldn't the server simply dispatch packets based on the source (client)
IPAddr:port value? Anything coming in on 69 would be assumed to be TFTP and
for each new source IP:port value a new server process would handle all
subsequent packets from that address?

Andrew


  Réponse avec citation
Vieux 09/06/2006, 04h39   #4
Barry Margolin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: TFTP questions

In article <2MXhg.1663$X33.433@news.cpqcorp.net>,
"andrew queisser" <andrewdotqueisser@hp.com> wrote:

> "Barry Margolin" <barmar@alum.mit.edu> wrote in message
> news:barmar-E685E7.20062707062006@comcast.dca.giganews.com...
> > In article <Z3Ehg.1615$Kx2.602@news.cpqcorp.net>,
> > "andrew queisser" <andrewdotqueisser@hp.com> wrote:
> >
> >> About to implement TFTP for transfers to/from embedded system and I have
> >> a
> >> couple of questions:
> >>
> >> 1) Why does the server switch to an ephemeral port after the initial
> >> connection? The reason I heard is that the pair of ephemeral ports on
> >> client
> >> and server side act as a transaction ID. Wouldn't the ephemeral client
> >> port
> >> be enough? I don't see the advantage on the server side since the server
> >> already knows which client IP and port each packet belongs to. What am I
> >> missing?

> >
> > When the protocol was designed, many UDP API's didn't provide anything
> > like the connect() operation for UDP sockets, so you couldn't specify
> > that a socket should only receive packets from a particular remote
> > address/port. UDP applications could only specify the local port to
> > listen on. So there was no way to easily dispatch packets to the
> > appropriate server process for each transfer. So they require the
> > server to listen on a new, unused port for each connection, and the
> > well-known port is just used for the initial setup.
> >

> Thanks for the background but I think must still be missing something.
> Wouldn't the server simply dispatch packets based on the source (client)
> IPAddr:port value? Anything coming in on 69 would be assumed to be TFTP and
> for each new source IP:port value a new server process would handle all
> subsequent packets from that address?


You don't want everything funneled through a single dispatcher process.
It's preferable to have each server process listening on its own socket,
and for that it needs a unique local port.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h50.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12185 seconds with 12 queries