High-Level Data Link Control: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Inizio traduzione da en.wiki
 
(58 versioni intermedie di 41 utenti non mostrate)
Riga 1:
'''High-Level Data Link Control''' ('''HDLC''', controllo collegamento dati ad alto livello) è un protocollo di rete del livello [[data link]].
{{W|informatica}}
'''High-Level Data Link Control''' ('''HDLC''') è un [[protocollo]] ''[[bit]] oriented'', usa la tecnica del bit stuffing (inserimento/eliminazione di zeri).
 
Si tratta di un protocollo a riempimento di ''[[bit]]'' e usa la tecnica del [[bit stuffing]] (inserimento di zeri aggiuntivi) per evitare che le sequenze di terminazione compaiano all'interno dei frame.
'''Address''' utilizzato nelle linee multipunto, identifica i diversi terminali (necessario per il dialogo fra un concentratore e diversi terminali)
 
Gli standard ISO originali erano:
'''Control''' contiene numeri di sequenza, ack, ecc.
* ISO 0009 — Struttura dei frame
* ISO 4335 <!-- — Elements of Procedure -->
* ISO 6159 <!-- — Unbalanced Classes of Procedure -->
* ISO 6256 <!-- — Balanced Classes of Procedure -->
 
Lo standard attuale è ISO 13239, che rimpiazza tutti questi.
'''Dati''' contiene i dati da trasportare
 
HDLC può utilizzare o meno la modalità connessa. Può essere usato per connessioni multipunto, ma attualmente è usato quasi esclusivamente per collegare due dispositivi, usando la ABM ([[Asynchronous Balanced Mode]]). Le altre modalità disponibili sono NRM (Normal Response Mode) e ARM (Asynchronous Response Mode).
'''Checksum''' è calcolata con CRC-CCITT
 
== Storia ==
Caratteristiche dell'HDLC:
HDLC è basato sul protocollo [[SDLC]] dell'[[IBM]], che è un protocollo di livello 2 proprietario.
* usa una finestra scorrevole con numeri di sequenza a 3 bit, contenuti nel campo Seq del campo Control;
Fu inglobato nella pila di protocolli [[X.25]] come [[LAPB]], nel protocollo [[V.42]] come [[LAPM]], nella pila [[Frame Relay]] come [[LAPF]] e nella pila [[ISDN]] come [[Link Access Procedures, D channel|LAPD]].
* utilizza il campo Next del campo Control, per il [[piggyback|piggybacking]];
Adesso è la base per il meccanismo di framing usato con il protocollo [[Point-to-Point Protocol]] nelle linee sincrone, essendo usato da molti server per connettersi a una [[Wide Area Network|WAN]] (in genere [[Internet]]).
* prevede tre tipi di [[Data frame|frame]] (identificati dai primi due bit di Control):
Una versione un po' diversa è usata anche come canale di controllo per le linee telefoniche [[E-carrier]] (E1) e [[SONET]].
** Information, per la trasmissione dati;
Alcuni produttori, come Cisco, hanno implementato protocolli come [[Cisco HDLC]] che usavano le tecniche per il framing HDLC a basso livello ma non usavano l'intestazione standard HDLC.
** Supervisory, per comandare diverse modalità di ritrasmissione;
** Unnumbered (manca il numero di sequenza), per finalità di controllo o per trasportare il traffico di [[connessioni]] non affidabili.
 
[[Categoria:Protocolli livello collegamento]]
[[Categoria:Standard ISO]]
{{informatica}}
 
<!-- '''High-Level Data Link Control''' ('''HDLC''') is a bit-oriented [[synchronous]] [[data link layer]] [[Communications protocol|protocol]] developed by the [[International Organization for Standardization]] (ISO). The original ISO standards for HDLC were:
 
*ISO 0009 &mdash; Frame Structure
*ISO 4335 &mdash; Elements of Procedure
*ISO 6159 &mdash; Unbalanced Classes of Procedure
*ISO 6256 &mdash; Balanced Classes of Procedure
 
The current standard for HDLC is ISO 13239, which replaces all of those standards.
 
HDLC provides both connection oriented and connectionless service.
 
HDLC can be used for point to multipoint connections, but is now used almost exclusively to connect one device to another, using what is known as [[Asynchronous Balanced Mode]] (ABM). The other modes are Normal Response Mode and Asynchronous Response Mode.
 
==History==
 
HDLC is based on [[IBM]]'s [[Synchronous Data Link Control|SDLC]] protocol, which is the layer 2 protocol for IBM's [[Systems Network Architecture]] (SNA). It was imported by the [[International Telecommunication Union|ITU]] into the [[X.25]] protocol stack as [[LAPB]] , into the [[V.42]] protocol as [[LAPM]], into the [[Frame Relay]] protocol stack as [[LAPF]] and into the [[ISDN]] protocol stack as [[Link_Access_Procedures%2C_D_channel | LAPD]]. It is now the basis for the framing mechanism used with the [[Point-to-Point Protocol]] on synchronous lines, as used by many servers to connect to a [[wide area network]], most commonly the [[Internet]]. A mildly different version is also used as the control channel for [[E-carrier]] (E1) and [[SONET]] multichannel telephone lines. Some vendors, such as Cisco, implemented protocols such as [[Cisco HDLC]] that used the low-level HDLC framing techniques but didn't use the standard HDLC header.
 
==Framing==
 
HDLC [[data frame|frames]] can be transmitted over [[Synchrony|synchronous]] or [[Asynchrony|asynchronous]] links. Those links have no mechanism to mark the beginning or end of a frame, so the beginning and end of each frame has to be identified. This is done by using a frame delimiter, or ''flag'', which is a unique sequence of bits that is guaranteed not to be seen inside a frame. This sequence is '01111110', or, in [[hexadecimal]] notation, 7E. Each frame begins and ends with a frame delimiter.
 
== Framing ==
When no frames are being transmitted on a synchronous link, a frame delimiter is continuously transmitted on the link. Using the standard [[NRZI]] encoding from bits to line levels (0 bit = transition, 1 bit = no transition), this generates a continuous bit pattern:
I frame dati HDLC possono essere trasmessi attraverso collegamenti sincroni o asincroni. Questi collegamenti non possono determinare l'inizio o la fine di un frame, quindi questo deve essere fatto. In questo caso viene usato un delimitatore (o ''flag''), che è una sequenza di bit che non potrà mai apparire nel resto del frame. Questa sequenza è '01111110', cioè in [[esadecimale]] '7E'. Ogni frame inizia e finisce con essa.
Quando non sta venendo trasmesso nessun frame, viene trasmesso continuamente un delimitatore. Usando lo standard [[NRZI]] per codificare gli stati logici in livelli di tensione (bit 0 = cambiamento, bit 1 = mantenuto il valore precedente), si genera una sequenza continua di bit:
 
0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0
Line 49 ⟶ 28:
_/ \_/ \_/ \_/ \
 
ThisQuesto isviene usedusato bydai [[modem]]s to train and synchronizeper theirsincronizzarsi clocksattraverso viacircuiti [[phasePhase-locked loop]]s.
Nella pratica, nei dati da spedire può comparire facilmente la sequenza usata come delimitatore e bisogna quindi trasmetterla in modo da non spedirla come delimitatore.
Nei collegamenti sincroni, il problema è risolto con il [[bit stuffing]]. Il trasmettitore fa in modo che ogni sequenza di cinque bit a 1 vicini sia seguita da uno 0. È un semplice circuito digitale ad inserire lo 0.
Il ricevente, conoscendo questo sistema, toglierà automaticamente i bit 0 aggiunti. In questo modo, se viene ricevuto il flag, avrà 6 bit 1 consecutivi. Il ricevente vedrà 6 bit a 1 e capirà che è un flag — altrimenti il sesto bit sarebbe stato a 0.
Questo (sempre considerando la codifica NRZI) garantisce una transizione almeno ogni 6 periodi di trasmissione, in modo da mantenere il sincronismo con il trasmittente.
I collegamenti asincroni che usano la [[porta seriale]] o una [[UART]] mandano i bit a gruppi di 8. Non possiedono circuiti per inserire altri bit. Usano invece il [[byte stuffing]] (o "octet stuffing"). L'ottetto che delimita i frame è 01111110 (in esadecimale 7E). Un ottetto "control escape" è formato dalla sequenza '01111101' (in esadecimale 7D). Un ottetto di questo tipo viene mandato prima di ogni byte uguale a sé stesso o al flag. Il byte successivo avrà il bit 5 invertito (contando da destra a sinistra e partendo da 0). Ad esempio, la sequenza dati '01111110' (in esadecimale 7E) verrebbe trasmessa come "01111101 01011110" (in esadecimale "7D 5E").
 
== Struttura ==
Actual binary data could easily have a sequence of bits that is the same as the flag sequence. So the data's bit sequence must be transmitted so that it doesn't appear to be a frame delimiter.
Il contenuto di un frame HDLC, compreso il flag, è:
 
On synchronous links, this is done with [[bit stuffing]]. The sending device ensures that any sequence of 5 contiguous 1-bits is automatically followed by a 0-bit. A simple [[digital circuit]] inserts a 0-bit after 5 1-bits. The receiving device knows this is being done, and will automatically strip out the extra 0-bits. So if a flag is received, it will have 6 contiguous 1-bits. The receiving device see 6 1-bits and knows it is a flag &mdash; otherwise the 6th bit would have been a 0-bit.
 
This also (again, assuming NRZI encoding of the output) provides a minimum of one transition per 6 bit times, so the receiver can stay in sync with the transmitter.
 
Asynchronous links using [[serial port]]s or [[UART]]s just send bits in groups of 8. They lack the special bit-stuffing digital circuits. Instead they use "control-octet transparency", also called "byte stuffing" or "octet stuffing". The frame boundary octet is 01111110, (7E in [[hexadecimal]] notation). A "control escape octet", has the bit sequence '01111101', (7D hexadecimal). The escape octet is sent before a data byte with the same value as either an escape or frame octet. Then, the following data has bit 5 (counting from right to left and starting at zero) inverted. For example, the data sequence "01111110" (7E hex) would be transmitted as "01111101 01011110" ("7D 5E" hex). Any octet value can be escaped in the same fashion.
 
==Structure==
 
The contents of an HDLC frame, including the flag, are
 
{| class="wikitable"
|-
!Flag
!Indirizzo
!Address
!Controllo
!Control
!Dati
!Information
!FCS
!Flag
|-
|8 bitsbit
|8 bitsbit
|8 oro 16 bitsbit
|VariableLunghezza lengthvariabile, 0 oro morepiù bits,bit ina multiplesmultipli ofdi 8
|16 oro 32 bitsbit
|8 bitsbit
|}
 
Bisogna stare attenti al fatto che il flag di fine di un frame può essere anche l'inizio del successivo.
Note that the end flag of one frame can be (but does not have to be) the beginning (start) flag of the next frame.
I dati arrivano a gruppi di 8 bit. I sistemi telefonici o telegrafici organizzavano il mezzo di trasmissione per spedire 8 bit alla volta, e HDLC adatta semplicemente questo all'invio di dati binari.
L'FCS ([[Frame Check Sequence]]) è una versione più sofisticata dei bit di parità. Questo campo contiene i risultati di un calcolo binario sui bit che compongono i tre campi precedenti. Questo viene fatto per rilevare errori di trasmissione (bit persi, errati o in più) in modo da poter scartare il frame in ricezione se viene rilevato un errore. È a causa di questo metodo di controllo degli errori che possono esserci limiti massimi nelle dimensioni del campo dati. Più lunga diventa la zona dati, più difficile sarà garantire il rilevamento di errori di trasmissione. L'FCS è a 16 ([[CRC-CCITT]]) o 32 ([[CRC-32]]) bit.
Quando fu creato HDLC, venivano prodotti mezzi trasmissivi per le linee telefoniche, che avevano bisogno di un tasso di errore minore di <math>10^{-5}</math> (errori/bit). Invece, i dati spediti dai PC, necessitano di maggior precisione, minore di <math>10^{-12}</math>. Attraverso l'FCS si possono controllare i dati. Se sono corretti, viene spedito un pacchetto di conferma (ACKnowledge) a chi aveva trasmesso in modo da permettergli di spedire il prossimo frame. Altrimenti il ricevente manda una conferma negativa (Negative ACKnowledge) o, più semplicemente, scarta il frame.
Se manda il NACK ed esso arriva a chi aveva trasmesso, può essere spedito un altro frame; altrimenti, dopo un certo tempo scadrà un timer del trasmettitore (che aveva fatto partire appena dopo aver spedito il frame) e il frame verrà ritrasmesso.
Le reti ottiche moderne hanno affidabilità molto migliore di <math>10^{-5}</math> (errori/bit), e ciò rende HDLC ancora più affidabile.
 
== Tipi di stazioni (Computer) e modi di trasmissione dati ==
Note that the data comes in groups of 8 bits. The [[telephone]] and [[teletype]] systems arranged most long-haul digital transmission media to send bits eight at a time, and HDLC simply adapts that standard to send bulk binary data. Voice is encoded by [[A-law]] or [[u-law]] into 8-bit samples. Teletypes send 8-bit [[ASCII|code]]s to represent each character.
I tipi di stazioni sono 3:
 
* Terminale primario: è responsabile delle operazioni di controllo sul collegamento. Manda i frame di controllo (comandi).
The FCS is the [[Frame Check Sequence]], and is a more sophisticated version of the parity bit. The field contains the result of a binary calculation that uses the bit sequences that make up the 'Address', 'Control' and 'Information' fields. The calculation is designed to detect errors in the transmission of the frame &mdash; lost bits, flipped bits, extraneous bits &mdash; so that the frame can be dropped by the receiver if an error is detected. It is this method of detecting errors that can set an upper bound on the size of the data portion of the frame. Essentially, the longer the length of the data portion of the frame becomes, the harder it is to guarantee that certain types of transmission errors will be found. The Frame Check Sequence is either a 16-bit [[CRC-CCITT]] or a 32-bit [[CRC-32]].
* Terminale secondario: lavora sotto il controllo di quello primario. Spedisce solo pacchetti di risposta. Il primario è collegato ai secondari attraverso collegamenti logici multipli.
* Terminale combinato: ha le caratteristiche di entrambi i terminali sopra. Spedisce sia comandi sia risposte.
 
Questa classificazione contraddistingue tre modalità di funzionamento:
The FCS is needed to detect transmission errors. When HDLC was designed, long-haul digital media were designed for telephone systems, which only need a bit error rate of 1{{e|−5}} errors per bit. Digital data for computers normally requires a bit error rate better than 1{{e|−12}} errors per bit. By checking the FCS, the receiver can discover bad data. If the data is ok, it sends an "acknowledge" packet back to the sender. The sender can then send the next frame. If the receiver sends a "negative acknowledge" or simply drops the bad frame, the sender either receives the negative acknowledge, or runs into its time limit while waiting for the acknowledge. It then retransmits the failed frame. Modern optical networks have reliability substantially better than 1{{e|−5}} errors per bit, but that simply makes HDLC even more reliable.
* ABM (Asynchronous Balanced Mode): in cui interagiscono terminali combinati.
* NRM (Normal Response Mode): in cui un terminale primario inizia a trasmettere e il secondario risponde se interpellato.
* ARM (Asynchronous Response Mode): fondamentalmente come l'NRM, con la differenza che un terminale secondario può trasmettere anche senza l'autorizzazione di un terminale primario.
 
== Operazioni HDLC e tipi di frame ==
== Types of Stations (Computers), and Data Transfer Modes ==
=== Frame 'I' (dati) ===
*'''Primary terminal''' is responsible for operation control over the link. It issues the frames which are called commands.
I frame 'I' sono usati per trasportare i dati dal livello di rete. In aggiunta possono anche comprendere informazioni per il controllo di flusso e degli errori insieme ai dati ([[Piggyback]]ing). Per queste funzioni vengono usati i sottocampi del campo di controllo.
*'''Secondary terminal''' operates under the control of the primary. Frames issues, are responses only. Primary is linked with secondaries by multiple logical links.
*'''Combined terminal''', has the features of both primary and secondary terminals. It issues both commands and responses.
 
* Campo di controllo dei frame 'I'
== HDLC Operations, and Frame Types ==
===I-Frames (user data)===
I frames are used to transport user data from the network layer. In addition they can also include flow and error control information piggybacked on data. The subfields in the control field are used to define these functions.
 
*'''I-Frame control field'''
 
{| class="wikitable"
|-
!0
!SendManda sequenceil nonumero di sequenza N(S)
!Poll/Final
!ReceiveRicevi numero sequencedi nosequenza N(R)
|-
|1 bitsbit
|3 oro 7 bitsbit
|1 bitsbit
|3 oro 7 bitsbit
|}
 
TheIl firstprimo fieldcampo definesdefinisce the typeil tipo. '0' meansindica anun I-frame 'I'.
N(S) indica il numero di sequenza del frame spedito. 3 bit possono indicare valori da 0 a 7, ma nel formato esteso (in cui il campo di controllo è di 2 byte) è usato un intervallo più grande.
 
Il campo Poll/Final è un solo bit con due utilizzi. È chiamato Poll se viene usato dalla stazione primaria per chiedere una risposta alle stazioni secondarie, invece Final quando viene usato da una stazione secondaria per indicare una risposta al termine della trasmissione. Ha significato
N(S) define the sequence number of send frame . 3 bit can define a sequence between 0 to 7 , but in extended format in which the control field is 2 bytes the sequence is larger
solo se impostato a 1.
 
Poll/Final filed is a single bit with dual purpose . It is called Poll when used by the primary station to obtain a response from a secondary station, and Final when used by the secondary station to indicate a response or the end of transmission. It has meaning only when it is set (P/F=1) and can mean poll or final
 
*In NRM the primary terminal sets the P-bit to poll. The secondary sets the F-bit in last I-frame to a response.
*IN ARM and ABM, the P/F bits are used to force response.
 
* In NRM il terminale primario imposta il bit Poll. Il secondario imposta il bit Final nell'ultimo frame I di una risposta.
=== S-Frames (control)===
* In ARM e ABM, il bit Poll/Final è usato per forzare una risposta.
 
== Frame 'S' (controllo) ==
Supervisory Frames are used for flow and error control whenever piggypacking is impossible or inappropriate , for example when primary field has to send only command or response or acknowledge and not data. S-frame '''do not ''' have information fileds.
I frame di supervisione sono usati per controllo degli errori e di flusso, quando il [[piggyback]]ing è impossibile o inappropriato, ad esempio quando il campo primario deve mandare solo comandi, risposte o conferme (non dati). I frame 'S' '''non''' hanno campi dati.
 
* Campo di controllo dei frame S
*'''S-Frame control field'''
 
S-FramePuò controlessere field can bea 8 bit oro 16 bit field
 
{| class="wikitable"
Line 134 ⟶ 113:
!Send sequence no N(S)
!Poll/Final
!Receive sequence no N(R)
|-
|2 bitsbit
|2 bitsbit
|1 bitsbit
|3 bitsbit
|}
 
Line 157 ⟶ 136:
|}
 
TheI firstprimi 2 bitsbit ('10') meanindicano itche isè un S-frame S
<!--
 
====Receive Ready (RR)====
*used as positive acknowledgement (thruN(r)-1) and a request that no more I-frames be sent until a subsequent RR is in use.
*Primary terminal can issue a POLL by P-bit setting
*Secondary terminal responds with F-bit set, if it has no data to send.
 
==== Receive Not Ready (RNR) ====
*Used as positive ACK and a request that no more i-frames should be sent till the subsequent RR is received.
*Either Primary or Combined station can set P-bit to solicit the receive status of a secondary/combined station.
*Secondary/Combined station response to Poll with F-bit set if the station is busy.
 
==== Reject (REJ) ====
Uses Go-Back-N technique (Retransmitt from N(r))
==== Selective Reject ====
Uses Selective Repeat Technique ((Repeat N(r))
 
=== U-Frames ===
U-Frames are used for link management. The are used to exchange session management and control information between connected devices.
 
Line 195 ⟶ 160:
 
The first 2 bits (11) mean it is U-frame . The 5 code bits (2 before P/F bit and 3 bit after P/F bit) can create 32 different types of U-frame
 
 
*Mode settings (SNRM, SNRME, SARM, SARME, SABM, SABME, UA, DM, RIM, SIM, RD, DISC)
Line 206 ⟶ 170:
*Miscalleneaous (XID, TEST)
 
== Link Configurations ==
 
Link configurations can be categorized as being either:
*''Unbalanced'', which consists of one primary terminal, and one or more secondary terminals.
*''Balanced'', which consists of two peer terminals.
 
[[ImageImmagine:HDLC Policies.jpg|thumb|500pix500px|HDLC Data Transfer Modes illustrated]]
 
The three link configurations are:
Line 220 ⟶ 183:
*''Asynchronous Balanced Mode'' (ABM) is a balanced configuration in which either station may initiate the transmission.
 
== HDLC Command and response repertoire ==
*Commands (I, RR, RNR, (SNRM or SARM or SABM) DISC
*Responses (I, RR, RNR, UA, DM, FRMR)
 
===Basic Operations===
=== Basic Operations ===
*Initialization can be requested by either side. When the six-mode set-command is issued. This command:
**Signals the other side that initialization is requested
Line 230 ⟶ 194:
The HDLC module on the other end transmitts (UA) frame when the request is accepted. And if the request is rejected it sends (DM) disconnect mode frame.
 
=== Functional Extensions (Options) ===
*For [[Switched Circuits]]
**Commands: ADD - XID
Line 298 ⟶ 262:
|.-N(R)-... P/F...1...1...0...1
|}
 
===Unnumbered Frames===
=== Unnumbered Frames ===
Unnumbered frames are identified by the low two bits being 1. With the P/F flag, that leaves 5 bits as a frame type. Even though less than 32 values are in use, some types have different meanings depending on the direction they are sent: as a request or as a response. The relationship between the '''DISC''' (disconnect) command and the '''RD''' (request disconnect) response seems clear enough, but the reason for making '''SARM''' command numerically equal to the '''DM''' response is obscure.
 
Line 421 ⟶ 386:
|}
 
==See alsoBibliography ==
* [[Point-to-Point Protocol|PPP]], [[Synchronous Data Link Control|SDLC]], [[Serial line IP|SLIP]]
* RFC 2687, Proposed Standard, PPP in a Real-time Oriented HDLC-like Framing
* RFC 1662, standard 51, PPP in HDLC-like Framing
* [http://www.interfacebus.com/Design_HDLC.html HDLC information page]
 
[[Category:Link protocols]]
[[Category:Logical Link Control]]
[[Category:ISO standards]]
 
==Bibliography ==
*Computer Communications (course notes) by Chaim Zieglier PhD, [[Brooklyn College]].
*Data and Computer communications, by Willam Stallings. (Seventh Edition, Prentice Hall)
-->
<!--
'''Address''' utilizzato nelle linee multipunto, identifica i diversi terminali (necessario per il dialogo fra un concentratore e diversi terminali)
 
'''Control''' contiene numeri di sequenza, ack, ecc.
[[da:HDLC]]
 
[[de:High-Level Data Link Control]]
'''Dati''' contiene i dati da trasportare
[[en:High-Level Data Link Control]]
 
[[es:HDLC]]
'''Checksum''' è calcolata con CRC-CCITT
[[eu:HDLC]]
 
[[fi:HDLC]]
Caratteristiche dell'HDLC:
[[fr:High-Level Data Link Control]]
* usa una finestra scorrevole con numeri di sequenza a 3 bit, contenuti nel campo Seq del campo Control;
[[he:High-level Data Link Control]]
* utilizza il campo Next del campo Control, per il [[piggyback]]ing;
[[ja:High-Level Data Link Control]]
* prevede tre tipi di [[Data frame|frame]] (identificati dai primi due bit di Control):
[[pl:HDLC]]
** Information, per la trasmissione dati;
[[pt:HDLC]]
** Supervisory, per comandare diverse modalità di ritrasmissione;
[[ru:HDLC]]
** Unnumbered (manca il numero di sequenza), per finalità di controllo o per trasportare il traffico di [[connessioni]] non affidabili.
[[sv:HDLC]]
 
[[tr:HDLC]]
-->
[[zh:高级数据链路控制]]
 
== Voci correlate ==
* [[Point-to-Point Protocol]]
* [[Synchronous Data Link Control]]
* [[Serial Line Internet Protocol]]
* [[Procedure avanzate di controllo della comunicazione dati]]
 
{{Standard ISO}}
{{Portale|telematica}}
 
[[Categoria:Protocolli livello collegamento]]
[[Categoria:Standard ISO]]