CSCI 3500: Studio 22

Physical & Data-link Layers

The first two layers of the OSI model (or, the first layer of the TCP/IP model) specify standards for how data is transmitted between physical devices. The physical layer specifies physical standards for networking equipment and the networking medium (e.g. copper wire characteristics, voltages, pinouts, wifi frequencies). The data-link layer specifies how these media are used to achieve data transmission.

In this studio, you will:

  1. Perform a parity bit computation to detect transmission errors
  2. Perform an overhead computation on the Ethernet frame specification

Please complete the required exercises below, as well as any optional enrichment exercises that you wish to complete.

As you work through these exercises, please record your answers in a text file. When finished, submit your work by sending your text file and source code to with the phrase Physical and Data-link Layer in the subject line.

Make sure that the name of each person who worked on these exercises is listed in the first answer, and make sure you number each of your responses so it is easy to match your responses with each exercise.

Required Exercises

  1. As the answer to the first exercise, list the names of the people who worked together on this studio.

  2. One of the roles of the data link layer is to specify what, if any, method is used to ensure data integrity during transmission. For example, in wired ethernet, all data is ultimately converted into electrical pulses that travel along a copper wire. This data is suceptible to corruption in the presence of electronic noise or encoding/decoding errors. (That is to say, some bits might be flipped when they weren't supposed to be.)

    One of the simplest methods for detecting data integrity errors is through the use of a parity bit. Consider a sequence of binary data that constitutes a message to be sent. In one parity bit scheme an extra bit is put at the end of a message- if the number of ones in the message is odd, then this last bit is set to one, so the overall number of ones in the message + parity bit is even. This is called an even parity encoding.

    Suppose you use a parity-bit to protect an 8-bit message. How many bits do you send in total?

  3. Compute the even parity encoding for the following 8-bit messages:


  4. Will the parity bit method catch all errors in which a single bit is flipped? If not, when does it fail?

  5. Will the parity bit method catch all errors in which two bits are flipped? If not, when does it fail?

  6. In general, when does the parity bit method detect an error? When does it fail?

  7. Recall from class that a typical Ethernet frame is composed of the following peices:

    preamble        - 7 bytes
    frame start     - 1 byte
    MAC destination - 6 bytes
    MAC source      - 6 bytes
    EtherType       - 2 bytes
    Payload         - up to 1500 bytes
    CRC error check - 4 bytes
    dead air        - 12 bytes

    The goal of Ethernet is to transmit data payloads, so the other parts of that transmission are considered to be overhead. How many bytes of overhead occur per Ethernet frame?

  8. Suppose that the payload of a given frame is 100 bytes long. How long is the overall transmission? What percent of the transmission is overhead?

  9. Suppose the payload is 1500 bytes long. How long is the overall transmission? What percent of the transmission is overhead?

Optional Enrichment Exercises