Collision Domains
-
Upload
hedgehogtech -
Category
Documents
-
view
1.439 -
download
1
description
Transcript of Collision Domains
Collision Domain 1
CCNACollision Domain
Collisions were a feature of early Ethernet networks. The reason? The transmission medium was shared by all devices. . The first networks were created by attaching computers to a single wire: a coax cable.
When a computer needed to transmit, it would put the data on the wire. Each computer would receive the data and would determine if the data addressed to them.
Data
Collision Domain 2
CCNACollision Domain
All computers would hear the response. The computer that was the data destination would respond.
This is my response
This could go on forever until two computers decided to transmit data on the wire at the same time.
This is data for the networkThis is data for the network
Collision Domain 3
CCNACollision Domain
The result of two computers attempting to transmit at the same time is a data collision.
Who would be affected by the collision? Since no other computer could successfully transmit during the collision, every computer connected to the coax cable as affected. The computers affected by a collision are called a “collision domain.”
This is data for the networkThis is data for the network
This is data for the networkThis is data for the network This is data for the networkThis is data for the networkThis is data for the network
Collision Domain 4
CCNACollision Domain
What happens if the network larger gets larger with more computer? The collision domain grows.
This is data for the networkThis is data for the network This is data for the networkThis is data for the networkThis is data for the network
Devices called “repeaters” were created to connect to different segments, or networks, to create one segment. These devices did not solve the collision problem. They extended the collision domain by transmitting the collision to the other side of the repeater.
This is data for the networkThis is data for the networkThis is data for the network
Repeater
Collision Domain 5
CCNACollision Domain
To prevent collision, the computers needed a method of telling when a transmission was taking place. So the first part is to listen for carrier, or data being transmitted. This function is called “Carrier Sensing”. If carrier is present (another computer is transmitting), other computers will wait until the transmission is complete before transmitting.
This is data for the network
Wait
Wait
Wait
Wait
Wait
Wait
When the transmission ends, another computer can transmit.
This is data for the network
Wait
Wait
Wait
Wait
Wait
Wait
Collision Domain 6
CCNACollision Domain
Sometimes two computers want to transmit at the same time. No other computer is transmitting, so both computers think it is safe to transmit. Both transmit at the same time.
This is data for the network
Wait
Wait
Wait Wait
Wait
This is data for the network
When this happens, a collision will still occur.
This is data for the network
Wait
Wait
Wait Wait
Wait
This is data for the network
WaitWait
Collision Domain 7
This is data for the network
Wait
Wait
Wait Wait
Wait
This is data for the network
Carrier Sensing reduced the number of collisions, but it does not eliminate collisions completely.
CCNACollision Domain
Another feature of Ethernet is a method of managing collisions. Since collisions are still going to happen, a process was needed to reduce the impact of collisions. The process is called Collision Detection. The part of the process that makes Collision Detection work is that every computer listens to it’s own transmission to see if a collision occurs.
DA
TA
DATA
DA
TA
DA
TA
Wait
Collision Domain 8
CCNACollision Domain
As shown earlier, there are times when two computers think the line is unused, and both try to transmit at the same time. So what happens when two computers try to transmit at the same time? Naturally, a collision occurs.
DATA DATA DA
TA
DA
TA
DA
TA
DA
TA
Both computers are listening to their own transmission, and both hear the collision.
DATA DATA DA
TA
DA
TA
DA
TA
DA
TA
Collision Domain 9
CCNACollision Domain
Both computers stop transmitting and transmit a jamming signal.
JAM
JAM
Wait
Both computers then start a timer that counts down to “0”. These timers are random, which means they should have different amounts of time on the clock.
Collision Domain 10
CCNACollision Domain
The first computer that counts down to “0” transmits first. The second computer hears the transmission, and waits until the transmission is complete.
Wait
DATADA
TA
DA
TAD
ATA
When the first computer finishes its transmission, the second computer then transmits its data.
Wait
DATADA
TAD
ATA
DA
TA
Collision Domain 11
CCNACollision Domain
Later, coax was replaced by twisted pair wire and hubs. The computers were connected to the hub with twisted pair wiring. Now, instead of each computer being connected to the coax cable, the computers are connected to the backplane, or bus, of the hub:
A computer transmits data to the hub on the transmit pair of its cable. The data is put on the bus of the hub (See next slide)
TransmitPair
Receive Pair
TransmitPair
Receive Pair
DATA
HUB
TransmitPair
Receive Pair
TransmitPair
Receive Pair
DATA
Wait
DATA
Collision Domain 12
CCNACollision Domain
When the data is put on the bus of the hub, it is copied on the Receive Pair of all computers, including the computer that transmitted the data.
TransmitPair
Receive Pair
TransmitPair
Receive Pair
DATA
DATA
DATA
This allows all computers on the hub to hear data being transmitted (Carrier Sense). If data is being transmitted by one computer, all other computers will wait to transmit.
TransmitPair
Receive Pair
TransmitPair
Receive Pair
DATA
DATA
DATA
Wait
DATA
DATA
Collision Domain 13
CCNACollision Domain
As with a coax network, two computers might transmit at the same time on a hub network, creating a collision. Computers connected to a hub follow the same rules for collision detection: send a jam signal, start a timer, and retransmit after a random time.
Since all computers on the hub have access to transmit data whenever they think they can, the entire hub becomes a collision domain.
HUB
TransmitPair
Receive Pair
TransmitPair
Receive Pair
DATA
DATA
DATADA
TA
DATA
DATA
Collision Domain 14
CCNACollision Domain
Hubs have two advantages over coax. The first advantage is expense. Twisted pair cabling cost much less than coax, and is easier to install. The second is that hubs can be connected together without buying a special device or a repeater. The hub is a multi-port repeater. It regenerates the signal on every port on the hub. If another hub is connected, the signal is regenerated to the other hubs.
Hubs are connected with either a crossover Ethernet cable or an uplink port, a special port that is used to connect to other hubs.
Connecting hubs together made it possible to connect more computers to the network, but it made the collision domain larger. Every collision is transmitted to every hub, and affects every port in the network.
HUB HUB HUB
HUB HUB HUB
Collision Domain 15
CCNACollision Domain
The transmission rules for Ethernet involve both Carrier Sense and Collision Detection. The rules are called CSMA-CD:CS – Carrier Sense. The computer listens for carrier or data from other computers before it transmits.MA – Multiple Access. Access is provided for multiple computers (Really? Can you have a network of one computer?)CD – Collision Detect. The computer listens for collisions while it transmits.
Collisions: What’s the big deal? We don’t file insurance claims. The PCs don’t get hurt. So who cares?
The problem with collisions is that they use bandwidth that is needed for data. Suppose we have 10 million bits per second for the whole network. Now we have a collision that takes .25 ( ¼ ) of a second. ¼ of our bandwidth is gone for that second, so we only have 7.5 million bits per second. And that’s the good news. As networks get larger, they have more collisions, much like the interstate highway that you use. The more cars, the more wrecks.
Large networks can lose about 70% of their bandwidth because of collisions. That’s a lot of bandwidth. Our network started out with 10 million bits per second, and now has only 3 million bits per second. And everyone is trying to use those 3 million bits.
Reducing the size of the collision domain increases the available bandwidth. Fewer collisions, less waiting, probably not like your interstate highway. Response time improves, the network is happy.
Collision Domain 16
CCNACollision Domain
Other important things about Ethernet
1. Ethernet is a contention protocol. This means that every computer on the network must contend for, or try to take control of, the network. The idea is that if my computer transmits on the network (contends), it will control the network until the transmission is complete. It’s like a big friendly (or unfriendly) family at Thanksgiving dinner. Everyone tries to talk at the same time. The first one who starts talking owns the conversation, and everyone else (hopefully) waits. The first guy keeps on talking until he is finished (which might be the entire Thanksgiving dinner).
1. Ethernet was created to be a half duplex protocol. Half duplex means that the computer can either transmit or receive, but it cannot do both at the same time. Consider a hub.
If a device is both transmitting and receiving at the same time, that means that another computer has to be transmitting at the same time. Consider if PC2 was receiving data from PC1 and wanted to transmit data to PC3 at the same time. If PC2 transmits data at the same time that it is receiving data from PC1, a collision will occur. So Ethernet was originally intended to be a half duplex protocol. It could either transmit, or receive, but not both at the same time.
This will become more important in later sections. For now, it is important to remember that originally, Ethernet was half duplex because of the share media.
TransmitPair
Receive Pair
TransmitPair
Receive Pair
WaitDa
ta
DATA
PC1 PC3
TransmitPair
Receive Pair
WaitPC2
Data
Data
DataData
Collision Domain 17
CCNACollision Domain
Switches were developed to solve the problem of collisions. Switches look like hubs. Computers are connected to switches by using twisted pair cabling, and the network is a star configuration.
Switch
The function of a switch, however, is very different from a hub. Remember that a hub has a common bus, and all data is written to the bus as soon as it arrives at the port. All data is transmitted to all ports when it arrives. If two computers transmit at the same time, their data is written to the bus at the same time, which results in a collision.
Switches do not write data to the bus as soon as it arrives. Switches have important features that hubs do not have.
1.Switches can store all of the data on the port before it writes it to the bus, eliminating collisions between ports.2. Switches learn the addresses connected to each port. Instead of transmitting the data to all ports, it transmits the data only to the port that has the destination address on it.3.Usually only one computer is connected to a switch port. Since there is no shared cable or hub, there can be no collision with data from another computer.4. Since there is only one computer on a switch port, the computer does not have to “listen” for a collision. Both the switch and the computer can transmit and receive at the same time. This is “full duplex”. Being able to transmit and receive at the same time can double the available bandwidth.
Collision Domain 18
CCNACollision Domain
How does a switch avoid collisions
The short answer is that switches eliminate collision. And that answer is almost 100% true. How does a switch eliminate collisions? Basically, switches store the data received from end devices. This is illustrated in the following diagram:
Each switch interface has memory that it uses to store data. Each computer sends it data to its interface on the switch. The data is stored in the interface memory and the switch then forwards the data to the destination port when it can be transmitted without a collision. If only one computer is connected to a switch port, there can be no collision on the cable.
PC1 PC2 PC3 PC4 PC5 PC6 PC7
Data1 Data2 Data3 Data4 Data5 Data6 Data7
Data Bus
Collision Domain 19
CCNACollision Domain
How does a switch avoid collisions
Suppose that PC1 is sending data to PC6. At that time, PC2 sends data to PC7. How does the switch handle the data?
PC1 PC2 PC3 PC4 PC5 PC6 PC7
Data2Data1 Data6 Data7
Data Bus
Collision Domain 20
CCNACollision Domain
How does a switch avoid collisions
Assume that PC1 sent its data first, but PC2 started at almost the same time. The switch stores the data at the port until it holds the entire frame. When the transmission is complete, the switch moves Data1 from PC1 to the bus to deliver it to PC6, while it continues to get data from PC2, Data from PC2 is stored in the memory for its interface. The reason that the data from PC2 is stored in memory is to prevent a collision on the switch bus.
PC1 PC2 PC3 PC4 PC5 PC6 PC7
Data2
Data1
Data1
Data1
Data1
Data1
Data1 Data2
Data Bus
Collision Domain 21
CCNACollision Domain
How does a switch avoid collisionsWhen Data1 has been delivered and there is no chance for a collision in the switch, the switch will then moves Data2 to PC7, moving the data to the bus and then to the interface for PC7.
This method of forwarding is called “store-and-forward.” The entire frame of data received from the PC is stored in the interface memory before it is forwarded.
Because switches remove collision, each port can now run full duplex, transmitting on their transmit pair while receiving on their receive pair. Configuring a port with full duplex disables CSMA-CD.
PC1 PC2 PC3 PC4 PC5 PC6 PC7
Data2
Data2 Data2
Data2
Data2
Data Bus
Collision Domain 22
CCNACollision Domain
Switch
Switches use three methods to forward data:
1. Store-and-forward. In store-and-forward mode, all data is received from the computer and stored in memory in the port before it is written to the bus (transmitted to the receiving port). Store-and-forward is the most reliable method, but it is the slowest. This is the default, preferred method for Cisco switches.
2. Fragment Free. Fragment Free stores the first 64 bits before putting the data on the backplane. 64 bits allows the switch to determine if there are other transmissions starting before it puts data on the bus. If the bus is busy, the switch will continue to store data until the bus is free.
3. Cut Through. The switch transmits the data as soon as it receives the destination address. It needs the destination address to know which port to send the data to. Other than that, it acts like a hub. Collisions can still occur. If there are too many collisions, the switch usually stops using Cut Through and uses Store-and-forward.
Copyright by Hedgehog Technical Institute® 2009