CIS131 Chapter 05

From Cis131

Jump to: navigation, search
Home | Chapters | Homework | Grades | Final Project | Podcast | Forums | Syllabus | Forum Policy | Assignment Policy
Jump to Chapter: 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18

Contents

Summary - Rules of the Road: How to Use the Local (Network) Roadway

In this chapter we will look at when a network device can use an Ethernet LAN, list the important fields inside the Ethernet headers and trailers, and explain the format of Ethernet LAN addresses. We will also look at how network devices use Ethernet addresses as they send and receive data, and the two major branches of Ethernet standards.

Preparing for a Trip: How to Make Your Car (Data) "Street Legal"

Last chapter we looked at making the roads, how to run the cable and what is involved. Now that the roads are in place we will look at how to prepare the data to go on the cable, or making the cars street legal. The most popular LAN standard is Ethernet, which is a set of standards and protocols for LAN communication.

LAN Legal Data: An Ethernet Frame

Before data can be placed on the medium from Chapter 4, it first has to be encapsulated inside an Ethernet frame. Encapsulating is the process of wrapping data in a header and trailer. The resulting group of bits that make up the header, data, and trailer form the Ethernet Frame. The Ethernet frame is the vehicle in which the data travels. The header and trailer are used by the networking devices, for example the first 8 bytes (64 bits) is called the preamble. This contains alternating 1's and 0's so that the NIC's receiving the data know a new frame is being sent. A frame is the term used to refer to the headers and trailers added at Layer 2 of the OSI model. Other layers have there own names for their headers and trailers.

Image:Cis131-fig5-1.jpg

Driving Where I Want and When I Want is Pretty Cool

When your data travels on the medium it is possible that it will run into other data. When this happens it is known as a collision. This happens a lot when Ethernet hubs are used to connect multiple devices. As a measure to reduce the number of collisions Ethernet has a few rules about when network devices can send data, and what to do if their is a collision.

Why Wrecks (Collisions) Happen on Ethernet

Collisions happen on Ethernet even if all the rules are followed. The following are two things you need to understand.

  • When more then one signal is put on a wire they are combined, the computers can't interpret the data as 1's and 0's.
  • A hub repeats the electrical signal down all ports, minus the receiving port, even if other signals are being repeated.

How to Avoid Most Wrecks

Carrier sense multiple access w/ collision detection (CSMA/CD) is the algorithm used to avoid collisions. This algorithm states that the computer will listen to the line before it sends, if the line is free it will start to transmit.


What to Do When a Wreck Happens

If all the rules are followed collisions can still happen. This is because of the way a hub works, It repeats the electrical signal down all ports even if other signals are being repeated. So if a collision does occur there are rules that tell what to do. Before a network device can respond to a collision it must be able to detect one. When a node transmits it also sends data to its own receiving pair using the loopback circuit. This way it is receiving it's data as well as anything else on the line. If more then one signal is detected then a collision is detected. Now that a collision is detected CSMA/CD defines what should happen next.

  • The senders of the collided frames send a jamming signal to make sure everyone knows about the collision.
  • The senders of the collided frames independently pick a random timer value.
  • Each sender waits until his own random timer has expired and the tries to send his frames again.

Stopping at the Destination: What Happens When Someone Comes to See You

We now know how data is placed on the wire, we will look at how the data is pulled off the wire.

Are They Coming to Our House or the Neighbors House?

Each Ethernet frame contains two Ethernet addresses in the header. The destination address field contains the Ethernet address of the destination network device, and the source address field contains the Ethernet address of the sending network device. An Ethernet address is a 48 bit address also referred to as a MAC address. Each NIC has a unique address supplied by the vendor. Ethernet addresses are usually displayed in hexadecimal (hex) format, or Base 16. The receiving network device looks in the frame header of each frame it receives, if its own Ethernet address is in the header it pulls the data off the wire.

Who is it, Honey?

The receiving network device looks in the frame header to see who sent the data using the source address field.

I Don't Understand a Thing You're Saying

The trailer of the frame contains a frame check sequence (FCS) field that is the result of a mathematical function performed on all the bits before the trailer. This 4 byte number is recalculated on the receiving network device, if the two numbers don't match then the frame is discarded. This processes is refereed to as error detection. We learned in Chapter 3 that TCP (which is a transport layer protocol) is responsible for error recovery by using sequence numbers. The data link layer (the layer we are in now) is where errors are detected, and the transport layer is where they are recovered from.

Two Standards for Ethernet

Ethernet was developed by Xerox, Intel, and Digital, and was referred to as DIX Ethernet, or Ethernet Version 2. In February of 1980 the IEEE created the 802 committee to define standards in networking. The 802.3 committee was created to define Ethernet-specific standards. The 802.2 committee was created to define LAN features. The 802.3 committee was also called Media Access Control (MAC) and the 802.2 standard is also called the Logical Link Control (LLC). Each committee has it's own spot in the header as seen in Figure 5-2.

Image:Cis131-fig5-2.jpg