Övning 2 ETS052 Datorkommuniktion Feldektering, felhantering och flödeskontroll

Relevanta dokument
Övning 3 ETS052 Datorkommuniktion IP, TCP och

Styrteknik: Binära tal, talsystem och koder D3:1

Kihl & Andersson: , 4.5 Stallings: , , (7.3)

Övning 4 EITF25 & EITF Protokoll. October 29, 2016

Länkhantering (feldetektering, felhantering, flödeskontroll) Maria Kihl

Övning 1 EITF25 & EITF Kodning och multiplexering. October 30, 2017

1. Compute the following matrix: (2 p) 2. Compute the determinant of the following matrix: (2 p)

Examples on Analog Transmission

denna del en poäng. 1. (Dugga 1.1) och v = (a) Beräkna u (2u 2u v) om u = . (1p) och som är parallell

Tillförlitlig dataöverföring. Jens A Andersson

Webbregistrering pa kurs och termin

Isometries of the plane

Tillförlitlig dataöverföring Egenskaper hos en länk Accessmetoder. Jens A Andersson

Datasäkerhet och integritet

LUNDS TEKNISKA HÖGSKOLA Institutionen för Elektro- och Informationsteknik

Chapter 2: Random Variables

1. Varje bevissteg ska motiveras formellt (informella bevis ger 0 poang)

Support Manual HoistLocatel Electronic Locks

12.6 Heat equation, Wave equation

Webbreg öppen: 26/ /

Adding active and blended learning to an introductory mechanics course

Tentamen i Matematik 2: M0030M.

(D1.1) 1. (3p) Bestäm ekvationer i ett xyz-koordinatsystem för planet som innehåller punkterna

Isolda Purchase - EDI

Calculate check digits according to the modulus-11 method

Tillförlitlig dataöverföring Egenskaper hos en länk Accessmetoder. Jens A Andersson

FÖRBERED UNDERLAG FÖR BEDÖMNING SÅ HÄR

Laborationer onsdag/fredag. Laborationer onsdag/fredag. Tillförlitlig dataöverföring Multiplexering Lokala nät (inledning) Labbmanual

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

This exam consists of four problems. The maximum sum of points is 20. The marks 3, 4 and 5 require a minimum

Lösenordsportalen Hosted by UNIT4 For instructions in English, see further down in this document

Dokumentnamn Order and safety regulations for Hässleholms Kretsloppscenter. Godkänd/ansvarig Gunilla Holmberg. Kretsloppscenter

Module 6: Integrals and applications

Pre-Test 1: M0030M - Linear Algebra.

Module 1: Functions, Limits, Continuity

Preschool Kindergarten

Beijer Electronics AB 2000, MA00336A,

Problem som kan uppkomma vid registrering av ansökan

Övning 5 ETS052 Datorkommuniktion Routing och Networking

Tentamen MMG610 Diskret Matematik, GU

- den bredaste guiden om Mallorca på svenska! -

Viktig information för transmittrar med option /A1 Gold-Plated Diaphragm

8 < x 1 + x 2 x 3 = 1, x 1 +2x 2 + x 4 = 0, x 1 +2x 3 + x 4 = 2. x 1 2x 12 1A är inverterbar, och bestäm i så fall dess invers.

Vässa kraven och förbättra samarbetet med hjälp av Behaviour Driven Development Anna Fallqvist Eriksson

Solutions to exam in SF1811 Optimization, June 3, 2014

Kurskod: TAMS28 MATEMATISK STATISTIK Provkod: TEN1 05 June 2017, 14:00-18:00. English Version

Hur fattar samhället beslut när forskarna är oeniga?

Komponenter Removed Serviceable

Alias 1.0 Rollbaserad inloggning

PORTSECURITY IN SÖLVESBORG

Rastercell. Digital Rastrering. AM & FM Raster. Rastercell. AM & FM Raster. Sasan Gooran (VT 2007) Rastrering. Rastercell. Konventionellt, AM

Consumer attitudes regarding durability and labelling

SAMMANFATTNING AV SKILLNADER MELLAN VADHÅLLNINGSBESTÄMMELSER ATG (SVERIGE) OCH PHUMELELA (SYDAFRIKA)

Skyddande av frågebanken

Uttagning för D21E och H21E


Kapitel 3 o 4 Att skicka signaler på en länk Tillförlitlig dataöverföring. Att göra. Att sända information mellan datorer

x 2 2(x + 2), f(x) = by utilizing the guidance given by asymptotes and stationary points. γ : 8xy x 2 y 3 = 12 x + 3

INSTALLATION INSTRUCTIONS


Kapitel 3 o 4. Tillförlitlig dataöverföring. (Maria Kihl)

Discovering!!!!! Swedish ÅÄÖ. EPISODE 6 Norrlänningar and numbers Misi.se

Michael Q. Jones & Matt B. Pedersen University of Nevada Las Vegas

FORTA M315. Installation. 218 mm.

Kurskod: TAMS11 Provkod: TENB 07 April 2015, 14:00-18:00. English Version

Stiftelsen Allmänna Barnhuset KARLSTADS UNIVERSITET

2 Uppgifter. Uppgifter. Svaren börjar på sidan 35. Uppgift 1. Steg 1. Problem 1 : 2. Problem 1 : 3

Tentamen del 2 SF1511, , kl , Numeriska metoder och grundläggande programmering

EXTERNAL ASSESSMENT SAMPLE TASKS SWEDISH BREAKTHROUGH LSPSWEB/0Y09

Discovery FSQ, IAA Utgåva/Edition 11. SE Habo. Klass 2 IAA FSQ-I 26W. 4 mm c c mm N L

För att justera TX finns det ett tool med namnet MMDVMCal. t.ex. /home/pi/applications/mmdvmcal/mmdvmcal /dev/ttyacm0

SVENSK STANDARD SS-ISO 8734

Schenker Privpak AB Telefon VAT Nr. SE Schenker ABs ansvarsbestämmelser, identiska med Box 905 Faxnr Säte: Borås

Kurskod: TAIU06 MATEMATISK STATISTIK Provkod: TENA 15 August 2016, 8:00-12:00. English Version

Grafisk teknik IMCDP IMCDP IMCDP. IMCDP(filter) Sasan Gooran (HT 2006) Assumptions:

and u = och x + y z 2w = 3 (a) Finn alla lösningar till ekvationssystemet

Avståndsmätare hur användandet kan regleras. Materialet framställt i samarbete mellan: SGF:s Regelkommitté & Tävlingsenhet

2.1 Installation of driver using Internet Installation of driver from disk... 3

Boiler with heatpump / Värmepumpsberedare

Högskolan i Skövde (SK, JS) Svensk version Tentamen i matematik

In Bloom CAL # 8, sista varv och ihopsättning / last rows and assemble

Följande signaler har kodats med Manchester. Hur ser bitströmmen ut om den inleds med en 0:a?

Questions and Answers on Advanced Counting techniques. The numbers refer to 6:th edition of Rosen s book. Sorry no time for translating everything

Materialplanering och styrning på grundnivå. 7,5 högskolepoäng

Measuring child participation in immunization registries: two national surveys, 2001

Kurskod: TAMS11 Provkod: TENB 28 August 2014, 08:00-12:00. English Version

Questionnaire for visa applicants Appendix A

How to format the different elements of a page in the CMS :

Flervariabel Analys för Civilingenjörsutbildning i datateknik

Writing with context. Att skriva med sammanhang

BOENDEFORMENS BETYDELSE FÖR ASYLSÖKANDES INTEGRATION Lina Sandström

SkillGuide. Bruksanvisning. Svenska

Lösningar till tentan i ETS052 Datorkommunikation

Algoritmer och Komplexitet ht 08. Övning 6. NP-problem

Grafisk teknik IMCDP. Sasan Gooran (HT 2006) Assumptions:

LTH, Institutionen för Elektro- och Informationsteknik (EIT)

Kvalitetsarbete I Landstinget i Kalmar län. 24 oktober 2007 Eva Arvidsson

Det finns en handledning till kortet på hemsidan. AVR STK500.

Grafer, traversering. Koffman & Wolfgang kapitel 10, avsnitt 4

Användarhandbok. MHL to HDMI Adapter IM750

Transkript:

Övning 2 ETS052 Datorkommuniktion - 2015 Feldektering, felhantering och flödeskontroll September 7, 2015 Uppgift 1. Antag att en dataöverföring får en kraftig störning under två millisekunder. Hur många bitar kan ha blivit fel på grund av störningen om bithastigheten är: 1.1 1.2 1.3 10 kbps? 100 kbps? 1 Mbps? Solution 1. If a transmission is subject to period of severe interference, the bits during that time might have been corrupted. For example: a 1 Mbps transmission is subject to a period of 1 milliseconds of interference. A 1 Mbps transmission produces bits at a rate of 10 6 bit per second or 106 bits per millisecond. As 10 3 such, during a period of 1 milliseconds 1000 bits might have been corrupted. 1.1 Following the reasoning in the example above: 10 103 10 3 = 10 bits per millisecond, during 2 milliseconds 10 2 = 20 bits. Answer: 20 bits 1

1.2 Following the reasoning in the example above: 100 103 10 3 2 = 200 bits. Answer: 200 bits 1.3 Following the reasoning in the example above: 106 10 3 2 = 2000 bits. Answer: 2000 bits Uppgift 2. Antag att jämn paritet används vid dataöverföring på en länk. Vad blir värdet på paritetsbiten i följande fall? 2.1 2.2 2.3 2.4 1001001 1100111 1001011 1110111 Solution 2. Adding a parity bit to a sequence is the simplest for of error detection. You compute the even parity bit by doing a bit-wise sum of the sequence. Which will give you a one if there is an odd number of ones in a sequence or zero if there is a even number of ones in the sequence. 2.1 Answer: 1 2.2 Answer: 1 2.3 Answer: 0 2

2.4 Answer: 0 Uppgift 3. Bestäm CRC för följande meddelanden om generatorpolynomet är C(x) = x 3 + x 2 + 1. Kontrollera din lösning också! 3.1 3.2 3.3 3.4 00111010 1010011110 111000111 1100110011 Solution 3. In this set of problems we are asked to compute the CRC bit sequence R(x) for the specified outbound bit sequences M(x) to produce the F (x) sent sequence, on the sender side. See the equation below. F (x) = M(x) x k +R(x) }{{} B(x) Moreover, k is the degree of the CRC generator polynomial. You may have noticed that the bit sequences are represented as a function of x. You can express a bit sequence M(x) as a polynomial by, from right to left, multiplying the n th bit with the n th polynomial term, as exampled below. 011001 0 x 5 + 1 x 4 + 1 x 3 + 0 x 2 + 0 x 1 + 1 x 0 x 4 + x 3 + 1 Multiplying the resulting polynomial M(x) with x k yields the term B(x). This done to shift the sequence enough to give space to the k CRC bits. Dividing the polynomials B(x) C(x) in modulo-2 yields a reminder that when appended to the target bit sequence polynomial B(x) yields the polynomial P (x) that is evenly divisible with the generator polynomial C(x). The final polynomial P (x) is then expressed as a sequence of bits and transmitted. 3

3.1 C(x) = x 3 + x 2 + 1 k = 3 M(x) = x 5 + x 4 + x 3 + x B(x) = x 8 + x 7 + x 6 + x 4 R(x) = x Answer: 010 3.2 C(x) = x 3 + x 2 + 1 k = 3 M(x) = x 9 + x 7 + x 4 + x 3 + x 2 + x B(x) = x 12 + x 10 + x 7 + x 6 + x 5 + x 4 R(x) = x 2 + 1 Answer: 101 3.3 C(x) = x 3 + x 2 + 1 k = 3 M(x) = x 8 + x 7 + x 6 + x 2 + x + 1 B(x) = x 11 + x 10 + x 9 + x 5 + x 4 + x 3 R(x) = x 2 + x + 1 Answer: 111 3.4 C(x) = x 3 + x 2 + 1 k = 3 M(x) = x 9 + x 8 + x 5 + x 4 + x + 1 B(x) = x 12 + x 11 + x 8 + x 7 + x 4 + x 3 R(x) = x 2 + 1 Answer: 101 Uppgift 4. Antag att en 4-bitars CRC med generatorpolynom C(x) = x 4 + x 3 + 1 har använts. Vilka av följande tre bitströmmar blir godkända av mottagaren? 4.1 11010111 4

4.2 4.3 10101101101 10001110111 Solution 4. On the receiver side, if no errors have been injected into the inbound bit sequence P (x), it should be evenly (modulo-2) divisible with the CRC generator polynomial C(x), i.e. no reminder, E(x) = 0. If no remainder is produced, removing the appended CRC bit sequence of length k from inbound sequence yields the original sequence. 4.1 C(x) = x 4 + x 3 + 1 k = 4 P (x) = x 7 + x 6 + x 4 + x 2 + x + 1 E(x) = x 2 + x Answer: NOK 4.2 C(x) = x 4 + x 3 + 1 k = 4 P (x) = x 10 + x 8 + x 6 + x 5 + x 3 + x 2 + 1 E(x) = x 3 + x 2 + 1 Answer: NOK 4.3 C(x) = x 4 + x 3 + 1 k = 4 P (x) = x 10 + x 6 + x 5 + x 4 + x 2 + x + 1 E(x) = 0 Answer: OK Uppgift 5. Bestäm en 8-bitars kontrollsumma (checksum) för följande bitsekvenser: 5.1 5.2 5.3 10010011 10010011 00011001 01010011 11000111 00001101 5

Solution 5. The checksum in produced by performing a bitwise addition of the two halves of the sequence from right to left, and where the remainder is carried to the next digit. The inverse of the resulting bit sequence is then appended to the original sequence and transmitted. In other words, an n-bit checksum is the inverse of the bit-wise sum of size n data bit-sequences. 5.1 Answer: 11011000 5.2 Answer: 10010011 5.3 Answer: 00101011 Uppgift 6. Antag att en mottagare tar emot följande bitsekvenser och att en 8-bitars kontrollsumma används. Är sekvenserna korrekta? Motivera ditt svar med korrekta beräkningar. 6.1 6.2 6.3 10010011 10011011 11011001 00110011 10110111 00010101 01110000 00111000 01010111 Solution 6. On the receiver side, the inbound sequence is bit-wise summed as sections of size n. The inverted result is compared to the checksum sequence, if they match the sequence is accepted, if not errors have most likely been introduced during transmission. 6.1 Sum: 1101000 0 Answer: NOK 6

6.2 Sum: 00010101 6.3 Answer: OK Sum: 01010111 Answer: OK Uppgift 7. Hur ser följande bitsekvenser ut, tagna slumpmässigt ur en länk på vilken HDLC-protokollet används, efter att eventuella bitstuffade nollor tagits bort? 7.1 7.2 010101111101011101111100... 010101111110101110111110... Solution 7. The avoid wrongful detection of the HDLC (High-Level Data Link Control) frame delimiter, represented by the bit-sequence: 01111110. Therefore, on the transmitter side, zeros have been added after each consecutive five ones. As such, the bit-stuffed bits carry no information that is relevant to the sender/receiver applications and are thus removed on the receiver end. 0001111101111101110010110 00011111 011111 01110010110 HDLC deploys NRZ, and uses the frame delimiter to synchronize the signal. 7.1 0101011111 010111011111 00... When bit stuffed zeros are removed: 7.2 Answer:... 0101011111101110111110... 01010111111010111011111 0... Note that this sequence contains an actual frame delimiter, underlined. When bit stuffed zeros are removed: Answer:... 01010111111010111011111... 7

Uppgift 8. Bitstuffa följande bitsekvenser (inga flaggor forekommer): 8.1 8.2 0001111110111110011111001 000111111111111111111111111111110011111001 Solution 8. The frame delimiter in HDLC (High-Level Data Link Control) is 01111110. To avoid any wrongful detection on the receiver side, any occurrence of a sequence of ones of length six or greater is stuffed with a zero after each consecutive five ones. For example, at the transmitter side: 0001111111001111110010110 00011111011001111101110010110 As seen in the previous question 7, the bit-stuffed zeros are removed on the receiver side. 8.1 0001111110111110011111001 0001111101011111000111110001 Which yields: 8.2 Answer: 0001111101011111000111110001 000111111111111111111111111111110011111001 000111110111110111110111110111110111100111110001 Which yields: Answer: 000111110111110111110111110111110111100111110001 Uppgift 9. Antag att dator A skickar ramar till dator B och använder sekvensnummer som är kodade med 3 bitar. En go-back-n-arq används med ett sändfönster som har storleken 4. Visa hur sändfönstret ser ut i följande fall: 9.1 9.2 9.3 Innan A har skickat några ramar. Efter det att A sänt ramarna 0,1 och 2; B har skickat ACK på 0 och 1; och dessa ACK har tagits emot av A. Efter det att A har skickat 3,4,5 och 6; B har skickat ACK på 4; och detta ACK har tagits emot av A. 8

Solution 9. Since the sequence number is represented with 3 bits, it can represent 8 frames. The S marker marks the last transmitted frame, S F, where the window starts i.e. one frame after the last consecutively acknowledge frame. Moreover, thus S L marks the end of the window. 9.1 Before anything has been sent, the windows will envelope the first 4 frames. Answer: 0 1 2 3 4 5 6 7 0 1 S S F S L 9.2 ACKs have been received for frames 0 and 1, hence the S F will be at frame 2, the earliest unacknowledged frame. marker Answer: 0 1 2 3 4 5 6 7 0 1 S S F S L 9.3 The P marker till point to packet 6, as it is the highest sent frame. Nevertheless, only frame 4 has been acknowledged, as such S F will not de mark the beginning of the open window at frame 5. Answer: 0 1 2 3 4 5 6 7 0 1 S F S S L 9

Uppgift 10. Dator A använder stop-and-wait-arq för att skicka ramar till dator B. Antag att avståndet mellan A och B är 4 000 km. Svara på följande frågor: 10.1 10.2 10.3 Hur lång tid tar det innan A kan få ett ACK på ramen? Använd ljushastigheten som utbredningshastighet samt antag att det inte tar någon tid från dess att B får ramen till dess att ett ACK skickas. Hur lång tid tar det för A att skicka iväg en ram på 1000 byte om transmissionshastigheten är 100 000 kbps? Använd svaren i 10.1 och 10.2 och beräkna hur stor andel av tiden som A är ledig, det vill säga inte gör något. Solution 10. 10.1 The speed of light in vacuum is c = 299792458 m/s. Sending a packet in one direction thus takes 4000000m c = 0.01334 seconds = 13.34 milliseconds. Assuming that the process time is 0 seconds, the total time will henceforth be packet round trip of 2 13.34 = 26.68 milliseconds. Answer: 26.68 milliseconds 10.2 As one byte contains 8 bits, 1000 bytes equates to 8000 bits. Transmission time is thus: 3 bits 8 10 = 0.08 milliseconds = 80 microseconds. 100 10 6 bps Note that bytes are mainly used when referring to data storage as one byte is historically the size of an ASCII symbol, and thus the smallest addressable space in a computers memory. Answer: 0.08 milliseconds 10.3 Out of the total transmission (0.08 ms) and propagation (26.68 ms) time the sender is only occupied while transmitting. Hence, for the event the that sender sends multiple consecutive frames it is vacant 26.69 26.68+0.08 = 99, 7% of the time. Answer: 99.7 % 10