## RES1

All the classes will also be available on a RSS flow that can be synchronised with iTune, android,…

The goal of this first lecture is to give you an overview of terminology and main principles used in modern data networks. At the end of the classes you will understand the notion of packet data network and the impact of this technology. You will also be familiarised with the OSI Reference Model and its strange vocabulary.

This class contains video materials recorded 2 years ago. This year the class is evolving since we will introduce more practicals using Ardiuno devices. So basic program in C will help to better understand what is behind concepts. The lecture is also very close to the MOOC Principe des réseaux de données (see https://www.france-universite-numerique-mooc.fr/courses/ to register (only in French))

## Class Material

Student version

Teacher version (with animation and exercise corrections)

## Recorded Classes

### Introduction

I give the lecture agenda and how this blog works. If you read this blog you are certainly aware of its existence.

### Black Box

A Top dow approach of the network giving details of a well known application (Web) and how in fact we can just say that it is interaction with a black box. We give the name of these interaction (Request, Indication, Response and Confirmation) and see that the black box can be decomposed itself into black boxes.

### ISO Reference Model

Here we are, the famous OSI seven layer model. We look at the strange name it uses such as PDU, SDU and SAP. We see the recursive nature of layering, We look at the seven layers and why we don’t have to focus on that number.

## Standardization organisations

We have a quick view of the different standardization bodies in the telecommunication area and how we can access the documents

Even if we don’t focus too much on the physical layer, we see the property we expect from the physical layer (such as clock synchronization) and some way to code binary information.

## Execises on serial bus on Arduino

### SPI bus with LCD

We are going to study some serial bus, we can find on Arduino UNO platform. We will use USB to download code and monitor its behavior. We will also use SPI bus to connect a LCD screen. To have a LCD screen working with the SPI, the Arduino Library has to be change to this one.

Program HeloWord_SPI.ino allows you to test if the SPI bus works.

Change the program to display a string you will type on the console.

### Simple transmission with I2C

We will in details be the I2C bus. The standard is available here. The standard will help you to answer to some questions from this post.

The first steps are to test the communication between a master writing data and a slave reanding them.

The connection between the two arduino is given in the following scheme. Beware, if you have an Arduino UNO you may have to use A4 and A5.

### Throughput measurement

For thoughput measurement, we change the payload size and we measure the round trip time. Since no global clock exists between the sender and the receiver, the sender will include its own time when it will send the request, the receiver will echo that time.

Sender ping program is here. Receiver pong program is here.

When a byte is added, how many extra bits are sent on the wire ? What is the speed of the serial bus ?

We will wend more time on the Data Link layer, since here we can illustrate the protocol behaviors and detail all the elements. One main goal of layer 2 is to protect against transmission errors that can occurs.

### I2C error rate

We are going to measure the error rate on the I2C bus by sending a wellknown frame to a receiver. The receiver will compare with the reference and will be able to find the bit error rate (BER).

Do you have some error on the link ?

I2C bus is very reliable, so we will introduce artificially some transmission errors by modifying the Wire library. Look if your .../libraries/Wire/Wire.h and ..library/Wire/Wire.cpp contain those lines. If not, modify the library.

This new version of ping is needed to set the BER. Last version of pong with error checking is unchanged.

Is it really the BER ? Why is it an Integer ?

Draw the number of frames received regarding the BER.

### IETF Checksum and parity

The following programs ping and pong include an IETF checksum to detect transmissions errors.

Another method is to use parity check. Here is the ping and pong program.

How many incorrect frames are considered correct ? what if the impact ?

How many correct frames are considered incorrect ? what if the impact ?

Which method is the most efficient? Why ?

### CRC performances

This ping and pong programs implements different CRC.

Uses CRC-4, try to find an erroneous sequence not detected by the CRC. What is the hamming distance between the original and the erroneous one. Is it possible with CRC-8 or 16?

Then we go really into the communication world. We see how we can detect a transmission error using CRC and that a frame with a wrong CRC will be discarded.

### Send and Wait

Now we have all the element to build our first protocol called Send and Wait. We will try to formalize its description to make it look like a real standard. We use Finite State Machine to describe its behavior.

### Send and wait implementation

Take the code from the sender and the receiver.

Modify the code to take a sentence through the monitor and display it on the LCD screen.

Let’s T1 the timer value and Tmin the time it takes to send correctly a frame.

Define analytically the time it takes to send 1 KiB of information.

Measure in the program the Tmin value.

Modify the program to verify the result in function of the BER

$\sum_{i=0}^{\infty} i.x^i=\frac{x}{(1-x)^2}$.

### HDLC

We will not have time during the class to study HDLC, but you can watch the video if you are interested.

For this protocol, we study the framing, how we divided a continuous flow of information into limited size PDUs and the meaning of all HDLC fields.

## Network Layer

We look in more detail and at layer 3, why it is good to cut the information in little pieces called packets. We study French geography and why packets offer a better multiplexing and good performances.

Finally we have a look on the Connection Oriented mode and the Datagram, se the main differences in term of Quality of Service. When also visit the famous hour glass model for IP or how the OSI RM can be reviewed by IETF.

## Exercises

On the blog there is at the moment one and only one exercises, I fact it was last year exam. I will put more materials soon.

This exercise allows you to study the behavior of the TCP Finite State Machine, how we can convert positive acknowledgments into a negative one and problem we may have when we increase transmission speed.
http://c2.touta.in/?p=100

There is some exams but without corrections on the old version of the blog.

This one is on performances of Wireless Sensor Network with the IEEE 802.15.4 standardhttp://xserver.ipv6.enstb.fr/users/toutain/weblog/d7dea/Exercises_Wireless_Sensor_Network.html

To understand the following discussion on the ISDN exercise, here is the text in French.

### 26 Responses to “RES1”

1. pablo says:

Hi,

Q1: in question 2 the right answer would be “there could only be collisions in this topology in the D Channel, since in this channel all the equipments can randomly have permission to write”, is this reasoning correct?

yes, any node can write in the D channel, they check if there is an activity, if the channel is empty then they start sending a flag and look how the TNR received it through the E bit. If TNR does not understand correctly the bit, the node suppose that there is a collision. You can have a look to I.430 recommendation (§ 6.1).
• pablo says:

Cleared, thanks!

Q2: in question 3, I think the interest of the E&D channel mecanism is that it allows all the equipments to be awared when the D channel is being used by another equipment, so collision risk might be avoided, right?

Yes, the device sees what the TNR understand. This cannot avoid the collision but gives a way to detect it

Q3: in question 4 I saw in my notes that the answer is 16bits for B1 channel, 16 bits for B2 channel and 4 bits for D channel, however I also saw that D channel could take 0, 16, 32, etc values, how can this be if it only has 4 bits? or might I have copied wrong what was in the whiteboard?

I don’t understand your notes too :-). Each 250 microsec you send 16 bits in B channels and 4 bits in D channel. I don’t know what are 0, 16, 32,…

Q5: in question 6 third part (Quelle est la valeur maximale que peut atteindre les compteurs de ces trames S ou I?) In my notes I saw the answer was 127 and that the N(s) had 7 bits, the N(r) has 7 bits p/r had 1 bit and there was one bit always 0. But I can not find the connection and reason for this.

The I and S frames are on two bytes which allow larger counters than in LAB-B we saw in class (3 bits). So since you have 7 bits you can have 127 values

Q6: in question 8 “Quels types de message sont employes dans chacune des trames? quelle valeur de TEI a ete affecte au poste telephonique?”I think the answer could be: the equipment is requesting to perform a broadcast and a request for ID, then the TNR gives the ID, in this case id 67, so the types of emplyed messages are “request for ID” and “ID granted”. However, I have a doubt about why the equipment would do a broadcast if this is only reserved to be done by the TNR? and why the repy of the TNR is also a broadcast?Thanks in advance for your attention and help.

• pablo says:

Ok, perfect. So the TNR also replies with a boradcast when assigning the ID “67” to the equipment that made the request (let’s call it A) for all the equipments to be awared that “A” has no the address “67”?  also, what about …Q4: in question 5 I think the answer could be ” because the TNR only needs 1 field to write the address of the terminal in order to send him the info, the terminals can randomly write oin the D channel”Thanks again!Regards

• pablo says:

sorry there were some typing errors in the last reply, the right one is as follows………….Ok, perfect. So the TNR also replies with a broadcast when assigning the ID “67″ to the equipment that made the request (let’s call it A) for all the equipments to be awared that “A” has now the address “67″?  …………….also, what about …Q4: in question 5 I think the answer could be ” because the TNR only needs 1 field to write the address of the terminal in order to send him the info, the terminals can randomly write on the D channel”Thanks again!Regards

yes, in the node to TNR, broadcast address means unspecified. On the other way, the address is really a broadcast since the node a no address. Node makes the mapping between request and response using the random number in the packet.

2. pablo says:

Also the links to download from itunes do not seem to be working properly since they redirect me to a script file instead of the file to be downloaded. Also the slides are no longer available in digital format.Thanks for your help!

I tried this year to put all the information in a single page, I think it is more easy to access the classe. the next step was to produce article with one video on each to allow podcast.

• pablo says:

Good thanks!, so will the material be available on this website? which link should I click?Sorry for the insistence, but with the classes I might have some backups during the studying sessions, as you have seen my notes might have some  errors somtimes.Thanks again!

3. pablo says:

Good evening professor, we have been checking the excercise we did in classes and we’d like to check the answers and clear some doubts with you. Q9: “pourquoi n’est-il pas possible, comme pour ethernet, de fixer un adresse physique pour les equipments en sortie d’usine?” We consider: Because the addresses assignations should only last as long as the communication is established, this is, if one equipment (with one address) is disconected (with or without requesting disconection) the address it had must remain available for other equipment if the request is done, this way we can assure that no addresses are being ocuppied by an equipment that is not carrying out any communication.

4. pablo says:

Q12.1: “Tracer le chronogramme representant les echanges precedents, en ne represent pas les trames RR, mais en indiquant lorsque vous le pouvez les informations complementaires contenues dans les messages de signalisation”……I did not understand the question, sorry!

you have to draw the exchanges between the node and the TNR (without RR frames) and you must indicate the frame content as it is understood by upper layers.

5. pablo says:

Q12.2: “Quel abonne sur le reseau telephonique a ete apepele?”. According to the norm Q.931 for qhen the value of “Type of message” is set to 70 (hexadecimal)  the following information is related to “Called Party number information element identifier” and the length given is 05, with the ia5 characters code the called number is 3699, right?

right, talking clock 🙂

6. pablo says:

Q12.3 “Sur quel canal B s’est deroulee la conversation telephonique?”.According to the norm Q.931 for when the value of “Type of message” is set to 18 (hexadecimal)  the following information is related to “Channel identification information element identifier” and the length given is 01, with the last 2 of the message set to “01 hexadecimal” the channel where the conversation is being carried out is the B1 channel, right?

I don’t have the text but if you analyze the right TLV (given in the exercise) you will find B1

• pablo says:

No problem this could be checked with the infor you gave us in class.Thanks!

7. pablo says:

Q13: “Pourquoi a-t-on une sequence d’echange de trame RR aussi longue?. We noticed that the equipment receives too many  ack messages N(R)=2 (meaning that the TNR has received 1) this might mean that the frame 2 was sent but never received by the TNR so the TNR after sending too many N(R)=2 without ever receiving 2, stops sending N(s) frames to the equipment until the equipments sends 2, is this correct??? but we still do not understand why the equipment waits that much to send frame 2, or is it that the frame 2 was sent but because a wrong CRC it was ignored until the equipment finally sent again and it is propery received  by the TNR???

In fact, all the traffic is on channel B so channel D has nothing to do and just send RR as keep alive.

• pablo says:

Get it! since the comunication between the equipment and the TNR has already been established, it will al happen now trough the B channel that has been assigned to the equipment, right? so the d channel sends the RR just to inform that it is ready and to maintain sync?

8. Hendrik says:

Good afternoon professor. I have one question about the exam. I see from the schedule that the exam for networking fundamentals and fundamentals of fixed and wireless networks will take place at the same time. Does this mean that we will ll have a 3 hours full exam without any break?