Automa a stati
Questa sezione descrive il modello di automa a stati per EGP, incluse le variabili e le costanti che stabiliscono lo stato in ogni momento, gli eventi che causano le transizioni di stato, le azioni che risultano da tali transizioni e la tabella delle transizioni di stato che definisce il comportamento.
3.1. Variabili di stato
Il modello di automa a stati comprende una serie di variabili di stato che stabiliscono lo stato del protocollo tra il gateway e ciascuno dei suoi vicini. Pertanto, un gateway che mantiene EGP con più vicini deve mantenere un insieme separato di queste variabili di stato per ciascun vicino. Lo stato corrente, gli eventi e le azioni dell'automa si applicano a ciascun vicino separatamente.
Il modello presuppone che le risorse di sistema, incluso l'insieme di variabili di stato, vengano allocate quando l'automa lascia lo stato Idle, o per l'arrivo di un Request che specifica un nuovo indirizzo di vicino, o per un evento Start che specifica un nuovo indirizzo di vicino. Quando si verifica uno di questi eventi, i valori delle variabili di stato vengono inizializzati come indicato di seguito. Al ritorno allo stato Idle tutte le risorse, incluso l'insieme di variabili di stato, vengono deallocate e restituite al sistema. Gli implementatori possono naturalmente scegliere di dedicare risorse e variabili di stato in modo permanente.
Tra l'insieme delle variabili di stato figurano le seguenti, che determinano le transizioni di stato del modello. I valori iniziali di tutte le variabili, tranne il numero di sequenza di invio S, sono impostati durante lo scambio iniziale Request/Confirm. Il valore iniziale di S è arbitrario.
Name Function
--------------------------------------------------------------
R receive sequence number
S send sequence number
T1 interval between Hello command retransmissions
T2 interval between Poll command retransmissions
T3 interval during which neighbor-reachability
indications are counted
M hello polling mode
t1 timer 1 (used to control Request, Hello and Cease
command retransmissions)
t2 timer 2 (used to control Poll command retransmissions)
t3 timer 3 (abort timer)
Possono essere necessarie ulteriori variabili di stato per supportare vari timer e analoghe funzioni interne di gestione. La funzione e la gestione delle variabili citate sono trattate nella sezione 4.
3.2. Parametri fissi
Questa sezione definisce diversi parametri fissi che caratterizzano le funzioni del gateway. Per ciascun parametro è incluso un valore suggerito basato su implementazioni sperimentali nel sistema Internet. Questi valori possono o meno essere appropriati per la singola configurazione.
Segue un elenco di parametri di intervallo di tempo che controllano le ritrasmissioni e altre funzioni dipendenti dal tempo.
Name Value Description
--------------------------------------------------------------
P1 30 sec minimum interval acceptable between successive
Hello commands received
P2 2 min minimum interval acceptable between successive
Poll commands recieved
P3 30 sec interval between Request or Cease command
retransmissions
P4 1 hr interval during which state variables are
maintained in the absence of commands or
responses in the Down and Up states.
P5 2 min interval during which state variables are
maintained in the absence of responses in the
Acquisition and Cease states
I parametri P4 e P5 sono usati solo se è implementata l'opzione del timer di interruzione. Il parametro P4 stabilisce per quanto tempo l'automa rimarrà negli stati Down e Up in assenza di comandi o risposte e verrebbe ordinariamente impostato per mantenere le informazioni di stato mentre il vicino viene, ad esempio, sottoposto a dump e riavviato. Il parametro P5 stabilisce per quanto tempo l'automa rimarrà negli stati Acquisition o Cease in assenza di risposte e verrebbe ordinariamente impostato nello stesso ordine di grandezza del valore atteso delle variabili T3.
Segue un elenco di altri parametri di interesse.
Name Active Passive Description
-----------------------------------------------
j 3 1 neighbor-up threshold
k 1 4 neighbor-down threshold
I parametri j e k stabiliscono l'«immunità al rumore» del protocollo di raggiungibilità del vicino descritto più avanti. I valori nella colonna Active sono suggeriti se il gateway sceglie di eseguire l'hello polling, mentre i valori nella colonna Passive sono suggeriti in caso contrario.
3.3. Eventi
Segue un elenco degli eventi che possono causare transizioni di stato nel modello.
Name Event
----------------------------------------------------------------------
Up At least j neighbor-reachability indications have been
received within the last T3 seconds.
Down At most k neighbor-reachabilitiy indications have been
received within the last T3 seconds.
Request Request command has been received.
Confirm Confirm command has been received.
Refuse Refuse response has been received.
Cease Cease command has been received.
Cease-ack Cease-ack response has been received.
Hello Hello command has been received.
I-H-U I-H-U response has been received.
Poll Poll command has been received.
Update Update response has been received.
Start Start event has been recognized due to system or
operator intervention.
Stop/t3 Stop event has been recognized due to (a) system or
operator intervention or (b) expiration of the abort
timer t3.
t1 Timer t1 has counted down to zero.
t2 Timer t2 has counted down to zero.
Esiste un evento speciale, chiamato indicazione di raggiungibilità del vicino (neighbor-reachability indication), che si verifica quando:
-
Il gateway opera in modalità attiva (hello polling abilitato) e viene ricevuta una risposta Confirm, I-H-U o Update.
-
Il gateway opera in modalità passiva (hello polling disabilitato) e viene ricevuto un comando Hello o Poll con il codice «Up state» nel campo Status.
3.4. Tabella delle transizioni di stato
La tabella seguente riassume le transizioni di stato che possono verificarsi in risposta agli eventi sopra elencati. Le transizioni sono mostrate nella forma n/a, dove n è lo stato successivo e a rappresenta l'azione.
0 Idle 1 Aqsn 2 Down 3 Up 4 Cease
+-----------+-----------+-----------+-----------+-----------+
Up |0 |1 |3/Poll |3 |4 |
Down |0 |1 |2 |2 |4 |
Request |2/Confirm *|2/Confirm |2/Confirm |2/Confirm |4/Cease |
Confirm |0/Cease **|2 |2 |3 |4 |
Refuse |0/Cease **|0 |2 |3 |4 |
Cease |0/Cease-ack|0/Cease-ack|0/Cease-ack|0/Cease-ack|0/Cease-ack|
Cease-ack |0 |1 |2 |3 |0 |
Hello |0/Cease **|1 |2/I-H-U |3/I-H-U |4 |
I-H-U |0/Cease **|1 |2/Process |3/Process |4 |
Poll |0/Cease **|1 |2 |3/Update |4 |
Update |0/Cease **|1 |2 |3/Process |4 |
Start |1/Request |1/Request |1/Request |1/Request |4 |
Stop/t3 |0 |0 |4/Cease |4/Cease |0 |
t1 |0 |1/Request |2/Hello |3/Hello |4/Cease |
t2 |0 |1 |2 |3/Poll |4 |
+-----------+-----------+-----------+-----------+-----------+
Note *: The transition shown applies to the case where the
neighbor-acquisition request is accepted. The transition "0/Refuse"
applies to the case where the request is rejected.
Note **: The Cease action shown is optional.
3.5. Transizioni di stato e azioni
La tabella seguente descrive in dettaglio le transizioni dell'automa a stati e le azioni evocate.
Next Message
Event State Sent Actions
------------------------------------------------------------------------
Idle State (0)
Request 2 Confirm Initialize state variables and
Hello reset timer t1 to T1 seconds and
reset timer t3 to P5 seconds.
(or) 0 Refuse Return resources.
Cease 0 Cease-ack Return resources.
Start 1 Request Reset timer t1 to P3 seconds and
reset timer t3 to P5 seconds.
Acquisition State (1)
Request 2 Confirm Initialize state variables and
Hello reset timer t1 to T1 seconds and
reset timer t3 to P5 seconds.
Confirm 2 Hello Initialize state variables and
reset timer t1 to T1 seconds and
reset timer t3 to P5 seconds.
Refuse 0 Stop timers and return
resources.
Cease 0 Cease-ack Stop timers and return
resources.
Start 1 Request Reset timer t1 to P3 seconds and
reset timer t3 to P5 seconds.
Stop/t3 0 Stop timers and return
resources.
t1 1 Request Reset timer t1 to P3 seconds.
Down State (2)
Note: Reset timer t3 to P4 seconds on receipt of a reachability
indication.
Up 3 Poll Reset timer t2 to T2 seconds.
Request 2 Confirm Reinitialize state variables and
Hello reset timer t1 to T1 seconds and
reset timer t3 to P5 seconds.
Cease 0 Cease-ack Stop timers and return
resources.
Hello 2 I-H-U
I-H-U 2 Process neighbor-reachability
info.
Start 1 Request Reset timer t1 to P3 seconds and
reset timer t3 to P5 seconds.
Stop/t3 4 Cease Reset timer t1 to P3 seconds and
reset timer t3 to P5 seconds.
t1 2 Hello Reset timer t1 to T1 seconds.
Up State (3)
Note: Reset timer t3 to P4 seconds on receipt of a reachability
indication.
Down 2 Stop timer t2.
Request 2 Confirm Renitialize state variables and
Hello reset timer t1 to T1 seconds and
reset timer t3 to P5 seconds.
Cease 0 Cease-ack Stop timers and return
resources.
Hello 3 I-H-U
I-H-U 3 Process neighbor-reachability
info.
Poll 3 Update
Update 3 Process net-reachability info.
Start 1 Request Reset timer t1 to P3 seconds and
reset timer t3 to P5 seconds.
Stop/t3 4 Cease Reset timer t1 to P3 seconds and
reset timer t3 to P5 seconds.
t1 3 Hello Reset timer t1 to T1 seconds.
t2 3 Poll Reset timer t2 to T2 seconds.
Cease State (4)
Request 4 Cease
Cease 0 Cease-ack Stop timers and return
resources.
Cease-ack 0 Stop timers and return
resources.
Stop/t3 0 Stop timers and return
resources.
t1 4 Cease Reset timer t1 to P3 seconds.