Collision Domain

This topic is to discuss the following lesson:

Thanku so much sir for your precious time and clear my point .
I want to know about how a switch negotiate to work in half duplex , if it work is they use CSMA CD or not ?
As i learn from somewhere switches uses single broadcast domain and separate collision domain for each port .
My question is they use same domain in both full duplex and half duplex .
How to check and configure half and full duplex in switch and router too ?
How to find that the device is half duplex or full duplex , is that happen on port configured ?

i want a brief explaination in this , hope you understand my query .

Regards
Shivam Chahal

Hello Shivam

In the past, we used hubs in order to connect Ethernet hosts to the network. This meant that any frame sent by one host would be received by all other hosts. Hosts would then check the destination MAC address to see if the frame belongs to them. If not, it would be discarded. Hubs present another problem as well which takes place if two or more hosts send a frame to the network at the same time. The result is a collision. The group of hosts that will be reached by a frame sent by one of the hosts is called a collision domain. So a hub. and all the hosts connected to it would constitute a collision domain. CSMA/CD is the mechanism used to coordinate how hosts in a single collision domain communicate with each other.

For small networks, this worked well, but as networks got larger, hosts would be overwhelmed with frames that do not belong to them, and they would spend too many resources discarding such frames. The occurrences of collisions also increase with the increase in the number of hosts.

A switch unlike a hub, functions such that each of its ports makes one collision domain. This means that a switch port, and the host it connects to are the only two devices within that collision domain. It looks something like this:

image

Now, if the communication between a host and the switchport is configured as half duplex, then there is the possibility of having a collision, because both the host and the switchport may try to send data at the same time. CSMA/CD must operate in this case. However, if you configure the communication to function in full duplex, which allows data to flow in both directions at the same time, then you have eliminated the possibility of having a collision completely.

Half and full duplex on both switches and routers is configured using the duplex command in interface mode. You can configure it as either full, half, or auto. Full and half force the port to function in that mode, but auto will allow the port to negotiate with the host.

It is best practice to keep the configuration in auto for hosts and to configure it as full for connections from switch to switch, or switch to router to avoid any negotiation errors. Half duplex should never be used unless necessary for compatibility with older devices.

You will find much more information in the following lesson:

I hope this has been helpful!

Laz

1 Like

Appreciate sir for clearing doubt as i study in deep and this silly question raised as i think logically and its practical implementation .

Sir , one more request please add topics of security too like FTD , Fire power and different vendor which are in market demand .

Thanks
Chaudhary Shivam Chahal

Hello Shivam

A little bit about Firepower is mentioned in the Virtualization Functions lesson. Even so, the primary focus of NetworkLessons is CCNA, CCNP ENCOR, CCNP ENARSI, and CCIE Enterprise certifications. For this reason, these security products, and products of other vendors are not included in any detail in the site. Only the Cisco ASA is included as a section due to the fact that it is quite popular.

I hope this has been helpful!

Laz

Hey, I’ve got a question regarding a ‘full duplex’ connection.
In the case where we have a switch connected to 4 hosts (one on each port), while using a full duplex connection on each one, do we still have 4 collision domains?
Since no collision could ever occur, there should be 0 collision domains on the network.
‘collision domain’ - a shared medium where simultaneous data transmissions collide with one another.

Hello Moshe

That’s an interesting question you bring up. Keep in mind that a collision domain is not defined by whether or not collisions actually occur. A collision domain is a segment of a network that is bordered by either a port on a router, or a port on a switch. Now if you happen to have a single host connected to a port on a switch, and it is in full duplex mode, collisions won’t occur, but the definition of the collision domain still stands.

This is because, if you connect a hub to that switch port, and connect multiple hosts to that hub as shown below, you are taking that same collision domain, and expanding it. Now it has has more hosts, and collisions can occur.

I hope this has been helpful!

Laz

1 Like

In my diagram, lets say that Pc1 is sending traffic to Pc2 and at the same time PC3 sending traffic to pc4. …will it be there any collision in this scenario ?

Hello Narad

Since you are using a hub in this diagram, all four hosts are on the same collision domain. This means that any time two or more devices try to “speak” at the same time, there will be a collision. Therefore, in the scenario that you describe, yes there will be a collision.

I hope this has been helpful!

Laz

Since CSMA/CD is disabled on interfaces on a switch and what if H3 and H4 on different collision domains send data at the same time, how is the collision avoided?

Hello Gokul

CSMA/CD is automatically disabled on full-duplex interfaces of a switch. This is done because by definition, on such an interface, there will never be a collision. If H3 and H4 on different collision domains send data at the same time, their interfaces on the switch can handle the incoming frames simultaneously. A collision will only occur if data is sent at the same time in the same collision domain. Since H3 and H4 are in different collision domains, no collisions will occur.

Now, what if H3 and H4 send data to H1 at the same time? The switch will deliver that data to H1 in sequence, on a first come first serve basis. If there are many pieces of data that arrive at the same time, then the switch will queue them and deliver them sequentially. Once again, no collisions can take place.

I hope this has been helpful!

Laz

Laz,

I have some devices operates on 10Mb/half duplex. I have connected them to my switch after I change the switchport to 10/half. They are currently working fine, however, I noticed that the “output errors” counter keeps going up every like 10 seconds. I have changed the cables but I am still having the same problem. Also , sometimes I see the “collision” counter goes up. Any idea? Thanks

Hello Eyad

This is normal behavior for a half-duplex link. In a half-duplex link, communication can only take place in one direction at a time. If both devices at both ends of the link begin to communicate simultaneously, a collision will occur. By definition, a half-duplex link is not a collision-free link. Conversely, a full-duplex link on a switch is a collision-free link.

So on a half-duplex link, you will see the CSMA/CD mechanism kick in to deal with detecting collisions and resolving them.

So don’t be alarmed by the collisions you see, since they are expected on such a link. Now if they are excessive and you are experiencing a degradation in service, then the problem may be elsewhere, but if they’re working fine as you mention, then there is nothing to worry about.

I hope this has been helpful!

Laz

Hi Rene,

From what i have read/understood, switch (interfaces break up or) are there own collision domains and the routers break up broadcast domains. Is this correct? I’m a bit confused with regards to your last statement in the lesson:

“What about routers? Routers do not switch Ethernet frames from one interface to another. A router is another way to break a collision domain.”

How can a router break up a collision domain? Thought only switches do this…

Thanks,
Irfan.

Hello Irfan

You are correct that switches break up collision domains, and routers break up broadcast domains. But remember, a collision domain is a subset of a broadcast domain. So if you break up a broadcast domain, you necessarily are breaking up the collision domain as well.

In the same way that no two switch ports can exist on the same collision domain, the same is true about routers as well.

I hope this has been helpful!

Laz

Hello,

I have a question about the picture after the sentence “We do have a problem when H1 and H2 both send a frame at the same time, like the following situation:”

My question is, if H1 and H2 sent a frame at the exact moment, wouldn’t their frames collide on the interfaces that they connect to on the hub? So as H1’s frame enters the hub and is repeated out all other ports, wouldn’t H2’s frame as it enters the hub also collide with H1’s frame? The same with H2’s frame. In other words, wouldn’t there be actually 3 collisions happening?

Thanks.
Attila

Hello Attila

I understand what you are saying, and it makes sense. However, we have to keep in mind what a collision actually looks like on the wire. A collision is not like a collision of two cars on the street, where both cars stop and are damaged. This is the image that the word “collision” gives us. However, what actually happens on the wire is somewhat different.

When a host sends a signal on the wire, it sends a fluctuation of current. When another host sends something simultaneously, the two current fluctuations signals overlap each other, and are added together. This overlapped signal is regenerated by the hub out of all ports, and it reaches all hosts. The hosts cannot interpret the overlapped signals and detect a collision. So there is no actual location of a “crash” as depicted in the diagram, but an overlapping of signal. You are correct however, that the signal sent by H2 would also reach H1 and the signal sent by H1 would also reach H2 resulting in overlapping signals on those wires as well.

So an actual collision on the network is more like two (or more) people trying to talk over each other, resulting in you not understanding either of them.

I hope this has been helpful!

Laz

1 Like

Hello Laz,

Thank you very much for the thorough response. :slight_smile:

Yes, you’re right: I should’ve put the word “collide” into quotes to indicate that I’m speaking figuratively and not literally.

If I understood you correctly, then what happens between the hub and H3 is the same kind of event (the “collision,” or in more technical language: the overlapping of the electric signals) that happens between the hub and H1, and the hub and H2, right? So on the connection of all 3 hosts, the signals overlap the same way on their respective wires.

Have a nice week.
Attila

Hello Attila

Yes you are correct. The hub regenerates out of all of its ports (except the one each signal came in on) the signals it has received. This results in multiple signals overlapping, and thus becoming distorted and unintelligible. The unintelligible signals actually reach all of the connected hosts.

Oh and by the way, the term “collide” is absolutely correct, that’s what is used to describe this overlapping. I just wanted to make a point that it doesn’t describe well what is actually happening on the wire.

I hope this has been helpful!

Laz

1 Like

How does switch enable two sides to avoid collision? When computers a and b send data to computer c at the same time, the signals from a and b arrive at the switch at the same time, does the switch make the two signals go in a staggered way ?