Zijici IP adresa

Petr Baudis pasky na pasky.ji.cz
Sobota Únor 10 12:01:19 CET 2001


> uhlar na fantomas.sk napsal(a):
> > Jan Marek <jmarek na jcu.cz> wrote:
> > -> traceroute IMHO pouziva pouze a jenom protokol ICMP a vytvari
> > -> paket tak, ze postupne zvysuje polozku TTL v paketu. Tim se mu
> > -> paket vraci postupne od vsech routeru na ceste se zpravou
> > -> "time-exceeded". Pokud ale tuhle zpravu na routeru zakazete, tak
> > -> se paket nevrati...
> > 
> > pokial viem, na icmp pakety sa reply nesmie posielat:
> > 
> > rfc792:
> > 
> >    The ICMP messages typically report errors in the processing of
> >    datagrams.  To avoid the infinite regress of messages about messages
> >    etc., no ICMP messages are sent about ICMP messages.  Also ICMP
> >    messages are only sent about errors in handling fragment zero of
> >    fragemented datagrams.  (Fragment zero has the fragment offeset equal
> >    zero).
> > 
> no, ja nechci tvrdit, ze traceroute posila jen ICMP pakety, tady
> jste me presvedcili, ale proti vyseuvedenemu bych se celkem
> ohradil: co ping? IMHO posila ICMP pakety s zadosti o odpoved,
> ne? A na tyhle pakety se proste odpovida... (alespon jsem se na
> to ted koukal v etherealu...)

O ICMP echo paketech se v onom RFC hovori takto:

 . . .

   Addresses

      The address of the source in an echo message will be the
      destination of the echo reply message.  To form an echo reply
      message, the source and destination addresses are simply reversed,
      the type code changed to 0, and the checksum recomputed.

 . . .

   Description

      The data received in the echo message must be returned in the echo
      reply message.

      The identifier and sequence number may be used by the echo sender
      to aid in matching the replies with the echo requests.  For
      example, the identifier might be used like a port in TCP or UDP to
      identify a session, and the sequence number might be incremented
      on each echo request sent.  The echoer returns these same values
      in the echo reply.

 . . .

> Ethereal mi taky ukazal, ze traceroute opravdu pouziva UDP pakety
> nekam na port > 33000.

Ve zdrojaku traceroute6 (src traceroute ted nemam k dispozici) se o tom mluvi
takto:

/* Probe packets are UDP format.  We don't want the destination
 * host to process them so the destination port is set to an
 * unlikely value (if some clod on the destination is using that
 * value, it can be changed with the -p flag).
 */   

ani v normalnim traceroute ani v traceroute6 jsem nenalezl moznost, aby se
_posilaly_ ICMP pakety...

-- 

				Peter "Pasky" Baudis

Whoever coded that patch should be taken out and shot, hung, drawn and
quartered then forced to write COBOL for the rest of their natural
life.
-- Keith Owens <kaos na ocs.com.au> in linux-kernel

My public PGP key is on: http://pasky.ji.cz/~pasky/pubkey.txt
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s++:++ a--- C+++ UL++++$ P+ L+++ E--- W+ N !o K- w-- !O M-
!V PS+ !PE Y+ PGP+>++ t+ 5 X(+) R++ tv- b+ DI(+) D+ G e-> h! r% y?
------END GEEK CODE BLOCK------


Další informace o konferenci Linux