Universidad de León

Dept IESA, José María Foces Morán, PTEU, IESA.


Arquitectura, Diseño y Gestión de Redes (ADG)

Computer Networks (CN)

Questions and Answers about Ex4 of CN (Academic year 2014)

  1. Technical sheet of Ex4

    • Exam Type: (Multianswer quiz, single-answer quiz, short questions and exercises)
      In all Quiz questions at least one option must be ticked
      Multianswer Quiz questions will be marked "[ M ]":
      In this type of questions if you mark only the correct options you get full credit of 1 point, if you mark only some of the correct options, you get a proportional grade; if you mark incorrect options the grade is reduced proportionally to the number of non-to-be-marked options present in the question.
      In single-answer questions only one of the several options available must be ticked in order to obtain the full credit (1 point), if the answer is correct you get 1 point, otherwise you get 0 points.
      Short questions and exercises count 1 point each, except where explicitly specified; credit will be written between brackets like the following: "[2]".
    • Contents covered:
      - Lectures and Labs (Lab 5 part 1 and part 2) up to and including that of 22/May/2014
      - Textbook chapter sections 3.1, 3.1.1, 3.1.4, 3.2, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6 (Lab 5) and 3.2.8 (Lab 5)
    • Language: English or Spanish. Those students willing to complete their exam in english must send me an e-mail to foces.informatica.unileon at gmail.com by 26/May/2014 with their request, then, in the exam I will hand them the exam in English and in Spanish.
    • Location, date and time: Classroom bulding, classroom no. 12. Thursday 29/May/2014 at 14:45. Please, be on time.
    • Duration of the examination: about 35 min
    • In-class materials: Scientific calculator
      Use of laptops, tablets, mobile phones, etc. is not allowed
      You must show your National Identity Card (DNI) or University ID if required to do so
      You must write your DNI (Only the DNI) on all the exam sheets, in no case will you be allowed to write down your name or signature on them

  2. Which textbook exercises are recommended for properly preparing for this exam?

    • Minimum set of recommended textbook exercises (Ch. 3): 13, 14, 15, 16, 18, 23, 34, 36(Solution published 24/May/14), 42 (Lab 5), 44 (Lab 5), 56(a and b). Review the IP partitioning exercise that we solved on the Lab's board, if you want to solve some other IP partitioning exercises you may find them in my Complementary Notes on CIDR/VLSM which you can find elsewhere in this web. I encourage you to work other similar exercises so that you gain more practice for the exam.
    • Use the presentations to guide your study of the textbook sections listed above (Contents section), it is essential that you study in a reflective and critical manner, always asking yourselves the why and the how.

  3. (Question submitted by a student 24/May/14)¿Hay algún tamaño mínimo en los fragmentos de un datagrama IP? En el ejercicio 36 el último fragmento de la primera red es de 24 bytes de datos más la cabecera y mi duda es si hay que introducir bytes de relleno o no hay tamaño mínimo y se enviaría el fragmento con esos 24 bytes + Header.

    • ... te envío un esquema de la solución:

      El tamaño mínimo de un paquete IP es 20 bytes, es decir, un paquete que sólo contiene el cabecero IP y, por tanto el payload está vacío. No hay bytes de relleno como en Ethernet ya que el cabecero contiene un campo llamado Total Length que mide la longitud total del paquuete incluido el cabecero de 20 bytes.
      MTU 1 = 1024 Bytes

      (Host A)------Link 1------{ IP ROUTER }------Link 2------(Host B)

      El MTU se ha de entender como el tamaño máximo de paquete IP que puede alojarse en una trama.

      El Host A tiene que enviar un paquete IP de tamaño = (IP Header 20 bytes) + (Payload of 1044 bytes) = 1064 bytes, pero, este paquete supera el MTU, por tanto fragmentémoslo a continuación.

      Se tendrán que enviar 1044 bytes repartidos en varios paquetes IP, calculemos el tamaño máximo de payload de estos paquetes IP:

      El MTU 1 = 1024 bytes, por tanto, el payload máximo será = 1024 - 20 (Header) = 1004 bytes, PERO 1004 mod 8 = 4, por tanto, tendremos que ajustar 1004 al múltiplo de 8 anterior, el cual es = 1000. Esto es debido a que el campo Offset cuenta bloques de 8 bytes, no bloques de 1 byte. Conclusión: Cada paquete en este tramo puede contener hasta 1000 bytes.

      El fragmento 1 llevará 1000 bytes, por tanto quedan 1044 - 1000 = 44 bytes que se enviarán en el segundo fragmento. Los fragmentos quedan así:

      Fragmento 1
      -----------
      Ident = X (Por ejemplo)
      Flag MF = 1
      Offset = 0 / 8 = 0
      Data 1000 bytes = Data[0..999]

      Fragmento 2
      -----------
      Ident = X
      Flag MF = 0
      Offset = Offset frag. anterior + Tamaño payload anterior / 8 = 0 + 1000/8 = 125
      Data 44 bytes = Data[1000..1043]

    • Ahora, cuando el router recibe el paquete IP fragmento 1, como su tamaño total es 1020 y supera el MTU 2, se ha de fragmentar a su vez. Esto te lo dejo a tí. Mañana publico la solución completa del ejerccio.
    • El router tiene que fragmentar el fragmento 1 ya que su tamaño (1000+20) es mayor que MTU 2

      MTU 2 = 576 Bytes

      (Host A)------Link 1------{ IP ROUTER }------Link 2------(Host B)

      El MTU 2 = 576 bytes, por tanto, el payload máximo será = 576 - 20 (Header) = 556 bytes, PERO 556 mod 8 = 4, por tanto, al no ser divisible por 8, tendremos que ajustar 1004 al múltiplo de 8 anterior, el cual es = 556 - 4 = 552. Conclusión: Cada paquete en este tramo puede contener hasta 552 bytes. Los fragmentos resultantes de la fragmentación del Frag 1 los llamaremos Frag 3 y Frag 4

      Frag 3 llevará 552 bytes, por tanto quedan 1000 - 552 = 448 bytes que se enviarán en Frag 4. Los fragmentos resultantes son estos:

      Fragmento 3
      -----------
      Ident = X
      Flag MF = 1
      Offset = 0 / 8 = 0
      Data 552 bytes = Data[0..551]

      Fragmento 4
      -----------
      Ident = X
      Flag MF = 1
      Offset = Offset Frag 3 + (Tamaño payload Frag 3) / 8 = 0 + 552/8 = 69
      Data 448 bytes = Data[552..999]


  4. Given an IP address and a Network Prefix Number, how can one tell whether it belongs to that network?

    • The hand procedure is straightforward: you simply apply the prefix netmask to the Ip address and, if the result is equal to the Network Number, then, that IP address belongs to the considered network. Please, consider the following two examples.

      Does IP address 193.146.101.46 belong to network prefix 193.146.96.0/20?

      Obtain the netmask first: The CIDR prefix is 20 bits long, then the netmask is = 255.255.240.0. Now, we will apply (Bitwise AND) that network mask to the given IP:

      193.146.101.46
      255.255.240.0
      --------------
      193.146. 96.0 which is equal to the Network Number given, therefore we can state that the IP address given belongs to the given network.


      Does IP address 193.146.101.46 belong to network prefix 193.146.104.0/21?

      Obtain the netmask first: The CIDR prefix is 21 bits long, then the netmask is = 255.255.248.0. Now, we will apply (Bitwise AND) that network mask to the given IP:

      193.146.101.46
      255.255.248.0
      --------------
      193.146. 96.0 which IS NOT equal to the Network Number given, therefore we can state that the IP address given does not belong to the given network prefix.



  5. If we're facing a question like this: "Suppose a bridge has two of its ports on the same network. How might the bridge detect and correct this?"

    Would you consider correct an answer like this one? "In order to solve that situation, the bridge should automatically detect the problem (2 ports on the same network) and, according to the spanning tree algorithm, it should logically deactivate the port with the highest assigned number."

    • A BPDU transmitted by a bridge contains, among other fields, the port number onto which it is being transmitted, therefore, it will receive it on the other port, thus it will be able to select the best BPDU according to the lowest numbered port contained in it thereby causing the other port to be logically disabled by the bridge.

      The inventor of STP, Radia Perlman, wrote in her book titled "Interconnections...":

      ... There's an additional field in the configuration message known as port identifier. The transmitting bridge has some internal numbering of its own ports, and when it transmits a configuration message onto port n, it places n in the port identifier field...

      Since we have not explained the BPDUs with sufficient detail for an explanation like the one provided above, it suffices for you to say that the bridge will disable all the bridge's ports on a single lan except the lowest-numbered one according to the definition of STP that we studied in the lectures.