120 likes | 124 Views
This article discusses the basic and interleaved transmit and receive processes used in network protocols, including symmetric and broadcast modes. Examples of on-wire protocol operations and automatic protocol detection are also covered.
E N D
Chap_16 David L. Mills University of Delaware http://www.eecis.udel.edu/~mills mailto:mills@udel.edu 21-Dec-19 1
Transmit Process. - Basic and Interleaved Transmit Process.- Broadcast torg = rec trec = dst If (x == 0) {/* basic mode */ aorg = clock txmt = aorg } else { /* interleaved mode */ if (x > 0) { aorg = clock txmt = borg } else { borg = clock txmt = aorg } x = -x } if (x == 0) { /* basic mode */ txmt = clock torg = 0 } else { /* interleaved mode */ if (x > 0) { aorg = clock txmt = aorg torg = borg } else { borg = clock txmt = borg torg = aorg}}trec = 0 fig_16_2 21-Dec-19 3
rxproc. Receive proc and receive basic routine Receive Process Basic Symmetric Mode if (txmt != 0 && txmt == xmt) { DUPE } else if (x == 0) { rec = txmt dst = clock If (mode == BROADCAST) Broadcast else Basic Symmetric } else { Interleaved Symmrytric rec = trec dst = clock } if (h > 0) h- - xmt = txmt T1 = torg T2 = trec T3 = txmt T4 = dst If (T1 == 0 || T2 == 0 || T3 == 0) SYNC else if (T1 != aorg) BOGUS} else {q = [(T2 – T1) + (T3 – T4)] / 2 d = (T4 – T1) – (T3 – T2)} fig_16_3 21-Dec-19 4
rxout . Receive interleaved and receive broadcast routines Interleaved Symmetric Mode Broadcas Modet If (x > 0) T1 = aorg else T1 = borg T2 = rec T3 = txmt T4 = dst if (torg == 0 || T1 == 0 || T2 == 0 || T3 == 0) { SYNC } else if (torg != 0 && torg != T4) {h = 2 BOGUS } else if (h == 0) {q = [(T2 – T1) + (T3 – T4)] / 2 d = (T4 – T1) – (T3 – T2)} if (torg == 0) { /* basic mode */ q = txmt – dst + d / 2 } else { /* interleaved mode */ T1 = torg – borg T2 = torg – aorg aorg = txmt borg = dstif (T2 > 1) BOGUS else q = T1 + d / 2 } fig_16_4 21-Dec-19 5
NTP basic on-wire protocol operations (1step) Sync Valid rec T1* T1* T5* T5* B dst T2 T2 T6 T6 aorg 0 T3* T3* T7* T2 T3 T6 T7 T1 T4 T5 T8 torg 0 T1* T3* T5* trec 0 T2 T4 T6 txmt t1* T3* T5* T7* rec 0 T3* T3* T7* A dst 0 T4 T4 T8 aorg T1* T1* T5* T5* Valid Valid fig_16_5 21-Dec-19 6
Interleaved on-wire protocol operations (2step) Sync Valid Valid Valid rec 0 0 T4 T4 T8 T8 T12 dst T2 T2 T6 T6 T10 T10 T14 B aorg 0 T3 T3 T3 T3 T11 T11 borg 0 0 0 T7 T7 T7 T7 T2 T3 T6 T7 T10 T11 T14 T1 T4 T5 T8 T9 T12 T13 torg 0 0 T2 T4 T6 T8 T10 trec 0 T2 T4 T6 T8 T10 T12 txmt 0 0 T1 T3 T5 T7 T9 rec 0 T2 T2 T6 T6 T10 T10 A dst 0 T4 T4 T8 T8 T12 T12 aorg T1 T1 T1 T1 T9 T9 T9 borg 0 0 T5 T5 T5 T5 T13 Sync Valid Valid Round 1 Round 3 Round 2 fig_16_6 21-Dec-19 7
Interleaved broadcast on-wire protocol (3step) Broadcast Broadcast Stateless Broadcast Broadcast aorg 0 T3 T3 T3 T3 T13 B borg T1 T1 T1 T1 T11 t11 T1 T3 T6 T7 T11 t13 T2 T4 T5 T8 T12 t14 torg 0 T1 T3* T5* T3 T11 trec 0 0 T4 T6 0 0 txmt T1* T3* T5* T7* T11* T13* rec T1* T3* T3* T7* T11* T13* A dst T2 T4 T4 T8 T12 T14 aorg T1* T3* T5* T5* T11* T13* borg T2 T4 T4 T4 T12 T14 Valid Valid fig_16_7 21-Dec-19 8
Automatic protocol detection example (4step) Sync Xleave Sync Xleave Bogus Basic Valid Basic rec 0 0 T4 T4 T8 T8 T13* T13* dst T2 T2 T6 T6 T10 T10 T14 T14 B aorg 0 T3 T3 T3 T3 t11* T11* T15* borg 0 0 0 T7 T7 T7 T7 T7 T2 T3 T6 T7 T10 T11 T14 T15 T1 T4 T5 T8 T9 T12 T13 T16 torg 0 0 0 T4 T3 T8 T11* T13* trec 0 T2 T4 T6 T8 T10 T12 T14 txmt T1* 0 T5* T3 T9* T11* T13* T15* rec 0 0 0 T3 T3 T11* T11* T15* A dst 0 T4 T4 T8 T8 T12 T12 T16 aorg T1* T1* t1* t5* T5* t5* T5* T9* T9* T13* T13* borg 0 0 0 0 0 0 0 0 Basic Sync Basic Bogus Basic Bogus Basic Valid fig_16_8 21-Dec-19 9
backroom GPS Switch Switch Mortq .001d .100j .046e .015 GPSq .015d .276j .024 Macabreq .003d .108j .042e .015 GPSq .021d .280j .040 Macabreq .017d .261j .029e .025b .121 Mortq .041d .204j .017e .035b .126 Macabre Mort Howland fig_16_9
campus Switch PPSq .000d .000j .004 Pogoq-.163d .615j .031e .119 PPSq .000d .000j .004 Racketyq .181d .612j .020e .211 Bridgeprtq-.022d .311j .031e .224 Racketyq .028d .478j .014 Baldwinq .040d .359j .096e .176 Racketyq .017d .442j .021 Rackety Pogo Baldwin Bridgeport fig_16_10
machines tbl_16_1