Practice Exercise 23 Answers

  1. Encode the following byte values using NRZL, NRZI and Manchester encoding techniques.
     NRZL -- Non-return to Zero, Level
     
     a.) 00000000                b.) 11111111                  c.) 10101010

     NRZI -- Non-return to Zero, Inverted
     
     a.) 00000000                b.) 11111111                  c.) 10101010

     Manchester
     
     a.) 00000000                b.) 11111111                  c.) 10101010


  1. Using bit-stuffing (after 5 consecutive 1's, insert an extra 0), encode the following bit stream.
               11011111 111011111 11111 10101011100000
                       0         0     0
               
               gives ...
               
               110111110111011111011111010101011100000
               
               

  1. All the extra bits that surround the actual data in a packet have to be transmitted over the wire, too, so they consume time that could be spent transmitting real data. We call this the overhead that the protocol imposes. Consider the packet format in Section 3 of Chapter 25:
          a.) How many bits will always get transmitted, even if there are 0
              data bytes?
          
                 8 + 16 + 16 + 8 = 48
          
          b.) If the maximum number of bytes are transmitted, how long will the
              entire packet be (in bytes?)
          
                 16 1's = 65535 bytes
          
                 65535 + 48/8 = 65541
          
          
          c.) What is the overhead of this longest packet in percent?
          
                 6 / 65541 = .009%
          
          d.) If most packets only contain 1024 data bytes, what is the overhead
              (in percent)?
          
                 6 / (1024+6) = 0.58%
          

  1. Suppose that a particular connection-oriented protocol requires that an ACK be sent after each correct packet is sent. ACKs are 15 bytes long. Data packets can contain up to 4Kbytes of user data and contain 20 bytes of header each.
          a.) How many packets would a 1 Megabyte data file be split into?
          
                  1048576 / 4096 = 256 packets          (4K = 4096)
          
          b.) Counting all the header bytes of all the packets, how many extra
              bytes would need to be transmitted just by the sender side to
              get this file over?
          
                  256 x 20 = 5120 bytes
          
          c.) How many bytes of ACKs would the receiver have to send,
              assuming there were no errors?
          
                  15 x 256 = 3840 bytes

  1. For each of the following values of N, tell how many wires there would need to be for various network topologies. For meshes, the connectivity number is given as the minimum number of wires that touch each and every node. There may be more, but there must be at least this many.
                                        N=5                     N=10
     ---------------------------------------------------------------------------
     fully connected                    10                       45
     
     ---------------------------------------------------------------------------
     token ring                          5                       10
     
     ---------------------------------------------------------------------------
     star                                4                        9
     
     ---------------------------------------------------------------------------
     mesh, con=2                         5                       10
     
     ---------------------------------------------------------------------------
     mesh, con=3                         8                       15
     
     ---------------------------------------------------------------------------
     
     (below are some pictures that help explain the mesh values...)


  1. What is the diameter of the following mesh network?

                      7
               
               Consider the following source/destination pairs and the
               shortest route between them:
               
                    A -> B  =  6 hops
                    A -> C  =  6 hops
                    D -> C  =  6 hops
                    D -> B  =  6 hops
                    E -> F  =  7 hops

  1. If the routing tables did not have any default entries, how large would they be if there N nodes in the network?
                   N-1 entries in each routing table

  1. For the mesh network of Fig. 28 of Chapter 25, write out routing tables for nodes C, E and H. Try to distribute the packets somewhat evenly. You may use default entries if you like.
              Node             Destination          Send to...
          ----------------------------------------------------------
               C:                 default              B
          
              (C can only send to B so it just sends every packet there.)
          
               E:                   A                  B
                                    C                  B
                                    D                  F
                                    I                  F
                                    H                  G
          
               H:                   I                  F
                                    D                  F
                                    E                  F
                                    A                  G  (or just say default...)
                                    B                  G
                                    C                  G