8 Replies Latest reply: Feb 16, 2013 8:56 AM by jason RSS

    SWITCH COLLISION

    Pradhyumn

      Are collisions possible in Switch?

        • 1. Re: SWITCH COLLISION
          kay

          a switch separate collision domians. each port represent a different collision domain so collision are not possible and if you are using full depuplex communication csma/cd is not used.collision much found in hub environment because with the hub there is only one collision domain.

          • 2. Re: SWITCH COLLISION
            Komal Venkatesh

            No.

            • 3. Re: SWITCH COLLISION
              Elias Santos - CCNA R&S

              Pradhyumn, as kay pointed out each switch port represents a different collision domain. A collision is not possible to happen on a switch because of full duplex logic. Collisions are more likely to happen on hubs, which adopt half duplex logic. However, it is possible for a collision to occur on a switch if more than one device is connected on the same port of the swtich, like if you connect two PCs to a hub and the hub to a switch port, but notice that the collision would be possible only because of the hub.

               

              Examples:

              Switch <-> PC: PC directly connected to a switch, no collisions at all.

              Switch <-> Router: A router directly connected to a switch, no collisions at all.

              PC <-> Hub <-> PC: two PCs connected to a hub, possible scenario for collisions, CSMA/CD needed.

              PC <-> Hub <-> Switch:

                              ^

              PC <-----|

              In this case there are two PCs connected to a hub, and the hub is connected to a switch, possible scenario for collisions at the hub, CSMA/CD needed.

               

              A hub is a device that has a single electrical bus inside it, doesn't provide buffering of the received electrical signals and represents a solely collision domain. When one device (host) sends bits over the wire, the hub just regenerates the electrical signal it receives on the port connected to that device (host) and broadcast it to all the other ports except the one the signal came in. If another device connected on another port of the same hub sends more bits over the wire a collision will occur because there will be two electrical signals flowing on opposite directions of the same electrical bus. Hubs work on a half duplex logic, each device either sends or receives bits over the wire at a time (not possible to send and receive bits simultaneously). Each device uses CSMA/CD logic to be sure no one is transmitting on the bus before it can actually transmit its bits.

               

              Switches use full duplex logic, meaning that each device connected to the switch is able to send and receive bits simultaneously over the wire without the possibility of any collisions. Switches interpret bits received on each port to analyze the frame structure and proceed with the forwarding proccess. Before forwarding any frame out any of its ports, the switch stores the bits (electrical signals) in a buffer. This buffer prevents collisions inside the switch and the full duplex logic makes CSMA/CD meaningless in this context.

               

              Hope that helps.

               

              Regards,

              Elias

              • 4. Re: SWITCH COLLISION
                Rohan Jadhav

                collision cannot occur on switch because each port in switch is in seperate collison domain

                switch has one broadcast domain but multiple collison domain

                hub network has single collison domain and single broadcast domain

                in hub network we use csma/cd logic to prevent collision

                • 5. Re: SWITCH COLLISION
                  Nipun Singh Raghav - CCNA R&S

                  A simple answer to a simple question, NO.

                  Why ?

                  Because, every port is independent and works independently. A host on port fa0/1 will not interfere with any of the other hosts through fa0/2 - fa0/24 (taking a 24 port switch).

                   

                  Collisions were a case when we used to have hubs/repeaters in early days. That's when something called CSMA/CD used to be there to prevent collisions but wasn't 100% fullproof.

                   

                  So, switches are better and as i like to say, they don't promote collisions.

                   

                  Thank You.

                  • 6. Re: SWITCH COLLISION
                    Elias Santos - CCNA R&S

                    Hi Pradyum.

                     

                    There are plenty of good and concise answers from the other guys explaining why switches can't have collisions.

                     

                    I'd just like to illustrate a specific scenario in which there may still be a collision if there is a hub connected to a switch. The picture were captured from a simulation I've run in Packet Tracer.

                     

                    It will also serve to clarify what I wrote before, which I recognize that wasn't well written.

                     

                    "However, it is possible for a collision to occur on a switch switched topology if more than one device is connected on the same port of the swtich, like if you connect two PCs to a hub and the hub to a switch port, but notice that the collision would be possible only because of the hub."

                     

                    It may give to understand that the collision could happen inside the switch just like the hub, which is not true. However, the switch port connected to the hub is susceptible to the effects of a collision because it is connected to a hub.

                     

                    And I think the pictures will also help illustrate what the other guys said about a collision not affecting the other switch ports.

                     

                    Phase 1: Each PC will ping its neighbor in a counterclockwise orientation (PC1 pings PC2, PC2 pings PC3 and so on). The arrows point the direction of the ping.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBV25yVGZCY0g3dDA/edit?usp=sharing

                     

                    Phase 1 - Collision domains: Nothing happens here yet, it's just a picture to clarify the collision domains in the topology. We will see that even when a collision occurs within the red-shaped area, the

                    other two collision domains (blue-shaped areas) are not affected at all, because the switch isolates every one of its ports. This illustrates what the other guys said, like Rohan and Nipun.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBRjlpWmFqZE9ZQ3c/edit?usp=sharing

                     

                    Phase 2 - Here the transmission starts. The pink and violet frames collide in the hub (here comes the part where Nipun said "CSMA/CD used to be there to prevent collisions but wasn't 100% fullproof")

                    https://docs.google.com/file/d/0BwG-8W9mX5NBR2g0YThWWVhVclU/edit?usp=sharing

                     

                    Phase 3 - As part of the CSMA/CD process, when devices detect the collision, they send a signal to the medium called jam signal, to notify the collision. Everybory on the collision domain must receive the jam signal. However, notice that the green frame arrived at the destination (PC 1) with no sign whatsover of being affected by the collision in the red-shaped collision domain. LIke Rohan said "collision cannot occur on switch because each port in switch is in seperate collison domain".

                    https://docs.google.com/file/d/0BwG-8W9mX5NBRnNUQzM4Sy14T0k/edit?usp=sharing

                     

                    Phase 4: The switch port on the red-shaped collision domain is operating in half duplex. Unfortunately, the yellow frame got sent but in an improper time because the medium wasn't available for transmission. Another jam signal will have to be sent to all devices in the red-shaped collision domain.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBYTBfNlJqcFh0WVU/edit?usp=sharing

                     

                    Phase 5: PC 3 already got its ping reply from PC 1. The switch is awaiting a random time (backoff algorithm) to send the yellow frame again. Here I think Packet Tracer is not accurate, because the two PCs should wait to resend their frames again just like the switch does, becaus that is the CSMA/CD logic. It may be a limitation of Packet Tracer.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBODUyOXpFUG9xbmc/edit?usp=sharing

                     

                    Phase 6: The switch is ready to resend the yellow frame due to the previous collision.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBSGZjaWNmN2duQTA/edit?usp=sharing

                     

                    Phase 7: The switch sends the frame through the hub.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBU0ptMmk2eG9OUkE/edit?usp=sharing

                     

                    Phase 8: The yellow frame was broadcast to all devices (normal hub behavior). PC 2 accepts and process the frame. PC 3 discards the frame as soon as it realizes that it's not addressed to it.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBOEVOME5vWVdSUDg/edit?usp=sharing

                     

                    Phase 9: PC 2 replys back to PC 1 and send the yellow frame through the hub.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBdGFidHEzbjJ1RnM/edit?usp=sharing

                     

                    Phase 10: The switch gets and processes the yellow frame. It will forward it out torwards PC 1.

                    https://docs.google.com/file/d/0BwG-8W9mX5NBN0ZCR2xQVVlGZDA/edit?usp=sharing

                     

                    Phase 11: PC 1 accepts and processes the frame (ping reply).

                    https://docs.google.com/file/d/0BwG-8W9mX5NBUHRpZjdFdXlodms/edit?usp=sharing

                     

                    Did you see what I meant for the exception regarding collision on "switched topologies"? The switch port connected to the hub is in half-duplex mode. The other ports are operating in full-duplex mode.

                     

                    The other guys were more direct and accurate in their answers. Collisions cannot happen in the switch.

                     

                    I hope that helps somehow.

                     

                    Sorry if the text got too long to read.

                     

                    Regards,

                    Elias

                    • 7. Re: SWITCH COLLISION
                      Chandan Singh Takuli

                      Hi Pradyuman,

                       

                      a collision domain is a domain where there a collision can occur or there is a possibility of it.

                       

                      as per switch, yeo and no both. collission can only occue in half duples media not on full duplex media. so if your switch port is working on half-duples then yes and if on full duplex then no chance

                      • 8. Re: SWITCH COLLISION
                        jason

                        Hi...

                        collisions can occur on a switchport that has more than 1 device connected.

                        eg .a hub with several pc's connected to the same switchport.

                         

                        collisions do not occur inside a switch as the information is buffered in the switches memory and then processed sequentially. (this is handled by the switches cpu)

                        so if i want to send information internally from switch port 1 to switch port 5 ..

                        and another port (switchport 7) also wants to send information out switchport 5 then ...they can both send to switchport 5 at the same time and all information is buffered and prevented from colliding by the switches CPU and internal  memory.

                         

                        this is me guessing now at how all this can be possible.

                        so the switches memory must be allocated to

                        1. each port (for buffering frames in and out of each por)t.

                        2. to the main switch iself (used by the main cpu for  internal processing of frames.)

                         

                        the internals of  the switch needs internal memory..so although the switch may have many ports with many different incoming frames that are destined to various ports and sometimes out the same port...the switch processes this information sequentially  in its INTERNAL MEMORY.....that is why collisions do not  occur internally to the switch..

                         

                        .so imagine port 1 and port 3 both have frames to send to port 5....the frames will be processed sequentially into switch memory ..so in reality the cpu may be processing the frame sent by port 1 and then afterwards processes the frame sent by port 3.

                         

                        if the switch has several cpu,s then the switch may actually process the information from port 1 and the information from port 3 at exactly the same time....

                         

                        so in this case there must be some way that the cpus coordinate so as not to send the data at EXACTLY THE SAME TIME to port 5.

                         

                        so in short ...switches dont have internal collisions due to the the way in which the logic of the internal cpu works with the memory of the switch... this has more to do with LOGIC GATES, BUSES and serious complex solid state architecture...rather than a protocol like CSMA/CD