PROGRAMMIAMO
Internet - Come è fatto un protocollo
Request For Comment (RFC)

Quando il concetto di rete era agli albori e Internet era ancora molto in là a venire, nel 1969 era stata realizzata la prima rudimentale rete ARPANET che collegava fra loro quattro computer situati in California e nel vicino Utah. Steve Crocker, un ingegnere che allora lavorava alla UCLA (University of California, Los Angeles), si occupava dello sviluppo di software per gli enormi computer mainframe di rete dell'epoca. Volendo sollecitare consigli e opinioni da parte degli altri ingegneri impegnati sul progetto, egli scrisse un memorandum intitolato semplicemente "Host Software".

Allo scopo di tenere traccia dei successivi sviluppi e aggiornamenti del documento, un po' alla maniera con cui i programmatori tengono traccia delle diverse versioni e modifiche di un software, egli denominò il suo documento Request For Comment e la numerò con il numero 1. Questo tipo di memorandum, più comunemente noto col suo acronimo RFC, divenne in breve il metodo con il quale gli sviluppatori discutevano nuove proposte e progetti.

Le RFC si dimostrarono un utile e conveniente metodo per documentare e diffondere il lavoro dei ricercatori e finì per diventare una sorta di registro ufficiale delle scelte progettuali e architetturali e degli standard tecnici di Internet.

Oggi le RFC vengono emanate dalla Internet Engineering Task Force (IETF) and the Internet Society (Isoc), due organizzazioni che si occupano appunto, fra le altre cose, della stesura degli standard relativi a Internet (anche se in teoria chiunque può proporre la propria RFC e sottoporla alle precedenti organizzazioni). Sebbene le RFC abbiano mantenuto il nome originario (letteralmente "richiesta di commenti"), esse si sono trasformate col tempo in documenti strutturati e organizzati, contenenti molti dettagli tecnici e implementativi. Dopo la loro pubblicazione le RFC non vengono più modificate (si dice che sono statiche), ma, se occorrono aggiornamenti, vengono emanate delle nuove RFC che vanno a sostituire quelle ormai obsolete.

Il sito ufficiale RFC-Editor tiene memoria di tutte le RFC pubblicate (attualmente sono oltre 7000) e contiene un comodo motore di ricerca.

Le diverse fasi della creazione di uno standard

Non tutte le RFC costituiscono degli standard. I documenti in procinto di diventare standard evolvono secondo i seguenti passi:

I documenti che non sono ritenuti adatti ad essere Internet Standard vengono etichettati come:

Come è fatta in pratica una RFC

Per capire come è fatta in pratica una RFC la cosa migliore da fare è esaminarne brevemente una. Sul già citato sito RFC-Editor si possono facilmente reperire tutte le RFC. La tabella seguente cita le principali RFC relative ai protocolli più importanti:

Protocollo

Acronimo

RFC

Internet Protocol

IP

RFC-791

Internet Control Message Protocol

ICMP

RFC-792

Transmission Control Protocol

TCP

RFC-793

User Datagram Protocol

UDP

RFC-768

Telnet Protocol

TELNET

RFC-764

File Transfer Protocol

FTP

RFC-765

Simple Mail Transfer Protocol

SMTP

RFC-788

Network News Transfer Protocol

NNTP

RFC-977

Hypertext Transfer Protocol

HTTP

RFC-2068

Ogni RFC è un documento di testo (txt) strutturato in un ordine preciso. Qui sotto per esempio viene riportata integralmente la RFC 768 relativa all'UDP, uno dei protocolli più semplici:

RFC 768                                                        J. Postel
                                                                     ISI
                                                          28 August 1980

                         User Datagram Protocol
                         ----------------------

Introduction
------------

This User Datagram  Protocol  (UDP)  is  defined  to  make  available  a
datagram   mode  of  packet-switched   computer   communication  in  the
environment  of  an  interconnected  set  of  computer  networks.   This
protocol  assumes  that the Internet  Protocol  (IP)  [1] is used as the
underlying protocol.

This protocol  provides  a procedure  for application  programs  to send
messages  to other programs  with a minimum  of protocol mechanism.  The
protocol  is transaction oriented, and delivery and duplicate protection
are not guaranteed.  Applications requiring ordered reliable delivery of
streams of data should use the Transmission Control Protocol (TCP) [2].

Format
------

                                   
                  0      7 8     15 16    23 24    31 
                 +--------+--------+--------+--------+
                 |     Source      |   Destination   |
                 |      Port       |      Port       |
                 +--------+--------+--------+--------+
                 |                 |                 |
                 |     Length      |    Checksum     |
                 +--------+--------+--------+--------+
                 |                                    
                 |          data octets ...           
                 +---------------- ...                

                      User Datagram Header Format

Fields
------

Source Port is an optional field, when meaningful, it indicates the port
of the sending  process,  and may be assumed  to be the port  to which a
reply should  be addressed  in the absence of any other information.  If
not used, a value of zero is inserted.

Destination  Port has a meaning  within  the  context  of  a  particular
internet destination address.

Length  is the length  in octets  of this user datagram  including  this
header  and the data.   (This  means  the minimum value of the length is
eight.)

Checksum is the 16-bit one's complement of the one's complement sum of a
pseudo header of information from the IP header, the UDP header, and the
data,  padded  with zero octets  at the end (if  necessary)  to  make  a
multiple of two octets.

The pseudo  header  conceptually prefixed to the UDP header contains the
source  address,  the destination  address,  the protocol,  and the  UDP
length.   This information gives protection against misrouted datagrams.
This checksum procedure is the same as is used in TCP.

                  0      7 8     15 16    23 24    31
                 +--------+--------+--------+--------+
                 |          source address           |
                 +--------+--------+--------+--------+
                 |        destination address        |
                 +--------+--------+--------+--------+
                 |  zero  |protocol|   UDP length    |
                 +--------+--------+--------+--------+

If the computed  checksum  is zero,  it is transmitted  as all ones (the
equivalent  in one's complement  arithmetic).   An all zero  transmitted
checksum  value means that the transmitter  generated  no checksum  (for
debugging or for higher level protocols that don't care).

User Interface
--------------

A user interface should allow

  the creation of new receive ports,

  receive  operations  on the receive  ports that return the data octets
  and an indication of source port and source address,

  and an operation  that allows  a datagram  to be sent,  specifying the
  data, source and destination ports and addresses to be sent.


IP Interface
-------------

The UDP module  must be able to determine  the  source  and  destination
internet addresses and the protocol field from the internet header.  One
possible  UDP/IP  interface  would return  the whole  internet  datagram
including all of the internet header in response to a receive operation.
Such an interface  would  also allow  the UDP to pass  a  full  internet
datagram  complete  with header  to the IP to send.  The IP would verify
certain fields for consistency and compute the internet header checksum.

Si note l'indicazione dell'autore della RFC e la data di creazione all'inizio del documento. Segue una breve introduzione nella quale sono indicati gli scopi e le funzioni del protocollo.

Segue la specifica del formato del datagram UDP col significato di ciascuno dei campi e la definizione dell'interfaccia col livello superiore (User Interface) e con quello inferiore (IP Interface).

Non solo protocolli seri...

Alcune RFC sono state create per scherzo e non sono destinate ovviamente a divenire standard. Per esempio la RFC 1149 descrive un metodo sperimentale per la consegna dei pacchetti IPv4 per mezzo di piccioni viaggiatori. Di solito queste RFC vengono pubblicate il primo di aprile di ogni anno. Qui potete leggere l'inizio della RFC 1149:

 
Network Working Group                                        D. Waitzman
Request for Comments: 1149                                       BBN STC
                                                            1 April 1990
   A Standard for the Transmission of IP Datagrams on Avian Carriers
Status of this Memo
   This memo describes an experimental method for the encapsulation of
   IP datagrams in avian carriers.  This specification is primarily
   useful in Metropolitan Area Networks.  This is an experimental, not
   recommended standard.  Distribution of this memo is unlimited.
Overview and Rational
   Avian carriers can provide high delay, low throughput, and low
   altitude service.  The connection topology is limited to a single
   point-to-point path for each carrier, used with standard carriers,
   but many carriers can be used without significant interference with
   each other, outside of early spring.  This is because of the 3D ether
   space available to the carriers, in contrast to the 1D ether used by
   IEEE802.3.  The carriers have an intrinsic collision avoidance
   system, which increases availability.  Unlike some network
   technologies, such as packet radio, communication is not limited to
   line-of-sight distance.  Connection oriented service is available in
   some cities, usually based upon a central hub topology.
Frame Format
   The IP datagram is printed, on a small scroll of paper, in
   hexadecimal, with each octet separated by whitestuff and blackstuff.
   The scroll of paper is wrapped around one leg of the avian carrier.
   A band of duct tape is used to secure the datagram's edges.  The
   bandwidth is limited to the leg length.  The MTU is variable, and
   paradoxically, generally increases with increased carrier age.  A
   typical MTU is 256 milligrams.  Some datagram padding may be needed.
   Upon receipt, the duct tape is removed and the paper copy of the
   datagram is optically scanned into a electronically transmittable
   form.

Si noti come, anche nelle RTF scherzose, sia mantenuto lo stesso rigoroso formato di quelle serie.

 

 

precedente - successiva

Sito realizzato in base al template offerto da

http://www.graphixmania.it