Previous Contents Next

7   Corrigé du DS du 21 juin 2004

As you know very well, there is a strong incitation to make you fluent in English. The executive board of our school has make it clear that every teacher must participate to this effort. So, even given my difficulties with the barbaric micro$oft native language, I decided to write this exam text in English.
All documents allowed (including computers, technical books, ...).
Exam duration : 2 hours.
The notation should be of 6 points for the first exercice on Internet Protocols, 9 points for the Ethernet stuff, 5 points for the exercice previously given by email and finaly 2 points for the RFC summary that you had to publish in the TWiKi tool.
 
Traduction :
Comme il ne semble pas légal de vous imposer un texte en anglais (faudrait quand męme savoir ce que l'on veut) je vous traduirai les passages les plus importants. Pour cette introduction cela se résume ŕ : tous documents autorisés, épreuve d'une durée de 2h.

7.1   About Protocols for Internet Services

Remember that an Internet application protocol is a communication standard that a client uses to communicate with an Internet server. As an example, consider a web browser : this Internet client must have a way to get the web page the user has specified by typing an URL or clicking on a link. It does so by connecting itself to the web server which name is given in the first part of the URL. The default port for the connection is 80 for a web server unless another one is given in the URL. After the connection is established the client will ask the server for the page (specified in the second part of the URL) using a special syntax which is known as the HTTP protocol.
 
Traduction :
Juste un rappel sans rapport avec les questions.
Let us give you the context of this exercice. We are in the office of some system and network administrator (called "sysadmin" in the sequel of this text). Some user tells the sysadmin that he suspects that the mail server is down. The sysadmin use ssh to connect to the user machine and start verifying that the sending mail process is functionnal from this machine.
 
Traduction :
Un administrateur systčme se connecte sur la machine d'un utilisateur pour vérifier que le serveur de messagerie est bien fonctionnel.
  1. The data that may help you for the verification are that the user machine name is iamthebest, the name of the mail server (the SMTP server) is mail.someplace.com, the user email address is wizeman@someplace.com and the sysadmin email address is punchingball@someplace.com.
     
    Traduction :
    Utilisez la commande nc pour vérifier qu'il est possible d'envoyer un message ŕ partir de la machine iamthebest, en utilisant le serveur SMTP mail.someplace.com, l'adresse d'expéditeur wizeman@someplace.com et l'adresse de destinataire punchingball@someplace.com.
    Below is a session example, some part of the server answers are replaced with the pseudo-text <blah blah>:
    iamthebest$ nc mail.someplace.com 25
    220 ESMTP mail.someplace.com ready <blah blah>
    HELO iamthebest.someplace.com
    250 pleased to meet you
    MAIL FROM:<wizeman@someplace.com>
    250 Sender ok
    RCPT TO:<punchingball@someplace.com>
    250 Recipient ok
    DATA
    Subject: Test subject
    
    Test
    .
    250 Message accepted for delivery
    QUIT
    
  2. The SMTP server is OK, but the user says that he was also unable to read emails. So help the sysadmin to test that email can be retrieved from the IMAP server imap.someplace.com for user wizeman with the password imustnotforgetit.
     
    Traduction :
    Utilisez la commande nc pour vérifier qu'il est possible de lire un message sur le serveur IMAP imap.someplace.com ŕ partir de la machine iamthebest en utilisant l'identifiant wizeman et le mot de passe imustnotforgetit.
    Below is a session example, the answers of the server are replaced with the pseudo-text <blah blah> and the message text with the pseudo-text <message text>.
    iamthebest$ nc imap.someplace.com 143
    * OK <blah blah>
    . login wizeman imustnotforgetit
    . OK User logged in
    . select INBOX
    * <blah blah>
    * 360 EXISTS
    . <blah blah>
    . fetch 100 body[text]
    * <blah blah>
    <message text>
    . logout
    * <blah blah>
    iamthebest$
    

7.2   Ethernet Case Simulation

The aim of this exercice is to simulate the behaviour of a legacy Ethernet network (the classical stuff: 10Mb/s, shared bus). Remember that the time needed to send an Ethernet packet of n bytes on such a network is n× 8/10,000,000 seconds. Moreover, if the distance between two stations is d meters, the time needed for the propagation of a bit from the first to the other is d/200,000,000 (we assume that information is propagated along a copper cable at the speed of 200,000km/s).
 
Traduction :
Pour cet exercice de simulation de réseau Ethernet, il vous est rappelé qu'un paquet Ethernet de n octets est transmis en n× 8/10,000,000 secondes et qu'un bit se transmet ŕ 200,000km/s sur un câble en cuivre.
The simulation will take place in a small network build with an unique 500 meters long Ethernet bus. There is a station at each end of the cable and a third located 100 meters from the first one and 400 meters from the second one. The simulation begin at time t=0 with the emission of an Ethernet packet of 192 bytes from station 3.
 
Traduction :
La simulation se fera dans le cadre du réseau représenté par ce schéma :
La simulation débute par l'emission d'un paquet Ethernet de 192 octets par la station 3.
  1. At which time will station 3 end its transmission ? Do not forget to take into account the fact that an Ethernet packet is sent after a preamble of 64 bit times (Donnez la date de fin de transmission pour la station 3, n'oubliez pas qu'un préambule d'une longueur équivalent ŕ 8 octets est envoyé sur le câble avant tout paquet Ethernet).
    Since S3 has to emits 192× 8 bits and a preamble of 8× 8 time bits , it will take 200× 8/10,000,000=160.0µ s. So S3 ends its transmission at t=160.0µ s.
  2. Will S1 and S2 be aware that the medium is free at the same time (Les deux stations S1 et S2 sauront-elle que le bus est libre en męme temps) ? Give the date(s) at which the stations know that the Ethernet bus is free (Donnez la date ŕ laquelle les stations savent que le bus est libre).
    The two stations S1 and S2 are not at the same distance of S1. So they will receive the last bit sent by S3 at different moments. The dates of reception of this bit (which are also the dates at which the stations will think that the medium is free) will be t=160.0µ s+100/200,000,000s=160.5µ s for S1 and t=160.0µ s+400/200,000,000s=162.0µ s for S3.
  3. Now, let us assume that the network interfaces of the stations S1 and S2 received, respectively at t=54µ s for S1 and t=134.6µ s for S2, a packet to be transmited (On suppose que S1 et S2 ont reçu ŕ t=54µ s et ŕ t=134.6µ s des paquets ŕ transmettre). Both packets have a length of 64 bytes (Ces paquets font 64 octets). When will these packets be sent on the network (Quand ces paquets seront-ils envoyés sur le réseau) ? Take into account that, in the Ethernet protocol, an inter-frame space of 9.6µ s must be respected before assuming that the medium is free (Notez qu'un delai inter-packet de 9.6µ s doit ętre respecté).
    The Ethernet protocol uses a CSMA/CD method. The first part of this acronym means "Carrier Sense", hence the network interface will wait until the medium is free before sending its packet. So S1 network interface send the packet it received from S1 CPU at t=54µ s when the medium appears to be free, that is at t=160.5+9.6=170.1µ s. And in the same way, S2 network interface send its packet at t=171.6µ s. Note that S2 thinks the medium is free because the first bit sent by S1 would have taken 500/200,000,000s=2.5µ s to reach S2 (would have arrived at t=172.6µ s).
  4. What happens to the two packets sent by S1 and S2 as stated above (Qu'arrive-t-il ŕ ces deux paquets) ? Give the exact date at which this event begin - beware, you will have to solve an equation to obtain the beginning time (Donnez la date de début de cet événement).
    Since S1 and S2 have simultaneously beginning to send a packet a collision is sure to occur. To know the exact date at which the collision happens, one must solve an equation. If S1 is said to be at the coordinate x=0 on the cable and S2 at the coordinate x=500 then the position, at time t (given in µ s), of the first bit sent by S1 is x(t)=200×(t-170.1). For the first bit sent by S2, the position is x'(t)=500-200×(t-171.6). The crash occurs when x(t)=x'(t), hence the equation to solve is 200×(t-170.1)=500-200×(t-171.6). After some simplifications, the equation becomes 400× t=68840.0. In conclusion the collision occurs at time t=172.1µ s, that is half a µ s after S2 sent its first bit.
  5. When will the collision episode end for the stations S1 and S2 (Quand l'évemenent de la question précédente sera-t-il terminé pour S1 et S2) ? Give the exact dates (Donnez les dates précises). Remember that 4 padding bytes are send by a station after a Collision Detection (Notez que 4 octets de bourrage sont envoyés par une station aprčs la détection d'une collision).
    First we must compute at which time the collision signal comes back to the stations. That can be done by finding where the collision occurs, for example by computing x(172.1)=400. We found that the location of the collision is 400 meters from S1 and 100 meters from S2. The collision signal will reach S1 after 400/200,000,000s=2µ s (at t=174.1µ s) and S2 after 0.5µ s (at t=172.6µ s). We must add to this the time needed to send the 4 padding bytes: 4× 8/10,000,000s=3.2µ s: the dates at which the stations finished the transmission of the padding bytes are t=177.3µ s for S1 and t=175.8µ s for S2.
  6. Let us assume that station S1 has a quite broken random generator that only gives zeros and that S2 has the same type of random generator which only gives ones (Supposons que le générateur aléatoire de S1 ne tire que des 0 et que celui de S2 ne tire que des 1). Give the date at which the packets of S1 and S2 will effectively be sent (Donnez les dates réelles d'envoi des paquets de S1 et S2).
    After a first collision S1 will have to wait for zero or one time slot (51,2µ s). Since its random generator gives only zeros S1 is going to send its packet as soon as possible, that is at t=177.3µ s but padding bits from S2 are busying the medium until t=178.3µ s. After that S1 must wait for the inter-frame space of 9.6µ s, hence the first bit of the message will be sent at t=187.9µ s. The transmission will last 64× 8+7× 8/10,000,000s=57.6µ s, which means that it ends at t=245.5µ s. The station S2 will wait for 51.2µ s since its random generator only draws ones, but at time t=227.0µ s the medium is busy. The network interface waits for the last bit of S1 which it receives at t=245.5+2.5=248.0µ s, then it waits for the inter-frame and emits its packet at t=248.0+9.6=257.6µ s.

7.3   Free Time Exercice on FTP Protocol

Since this exercice has already be given in french by email I think it is not too unfair to give only its English translation (Questions libres posées par messagerie électronique). The context of these questions is the one of the laboratory classes The questions are :
  1. It is possible to establish a FTP connection from your virtual machine to real one ? In this connection context, is it possible to make some transfers in active mode ? Why ? In the case of a negative answer suggest a modification of the virtual machine configuration to allow such a transfer.
    The virtual and real machines are directly linked by an Ethernet-like network (a virtual one but with the same characteristics as a plain one). In this context an FTP connection between the two machines is obviously allowed and the transfers can be done in active or passive mode.
  2. Is it possible to establish a FTP connection from your virtual machine to the school FTP server ? In this connection context, is it possible to make some transfers in active mode ? Why ? In the case of a negative answer suggest a modification of the virtual machine configuration to allow such a transfer.
    The virtual machine is not on the same Ethernet network as the school FTP server. Only the real machine is on the same Ethernet network as the FTP server. Hence the virtual machine cannot connect directly to this FTP server but must ask the real machine to forward its packets to the school FTP server. Moreover the virtual network between real and virtual machine is not known by the school network, so the virtual machines cannot be reached from the school network by their own IP addresses. To allow its virtual machine an access to the school machines, the real machine forwards the virtual machine packets using a special mechanism called Network Address Translation. To make it short, this mechanism consists in replacing the virtual machine IP address with the IP address of the real one. The NAT mechanism allows the virtual machine to initiate TCP connections but does not allow virtual machines to be contacted by machines not on the virtual network. So the FTP server can be contacted by the virtual machine (the FTP command connection works without problem). But when the client tries to initiate a transfer in active mode, it creates a small server to receive the FTP server data. This small server cannot be contacted by the FTP server (since the virtual machine is on a virtual network not reachable from the FTP server). Note that passive transfers can be used since in passive transfers, the small server is created on the FTP server side. This small server can be contacted by the virtual machine using the NAT mechanism. To allow active transfers from the virtual machine one may modify the virtual machine setting in VMware by switching the network from "host only" mode to "bridged" mode. In this new mode the virtual machine shares the network interface of the real machine and so appears to be on the same Ethernet network as the real machine (and as the school FTP server). One must take care to give to the virtual machine an IP address not used by another school machine.

Previous Contents Next