Announcement

Collapse
No announcement yet.

need clarifying to understand the way switch differs from hub

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • need clarifying to understand the way switch differs from hub

    when working with a hub a communication coming from one pc to another goes to the whole network connected to that hub, right? that means were not talking about the arp request but the whole thing? even after the session was initiated?
    and when working with a switch, simple L2 switch lets say for example computer A wants to talk with computer B it still needs to broadcast the arp message to the whole network and only then after getting the destination mac address all the information relevent to computer B is being directed to his mac address by the switch?

  • #2
    Re: need clarifying to understand the way switch differs from hub

    Yes and no.

    In a hub environment all traffic goes to every port, but the stations that the traffic is not intended for simply discard the traffic. In a hub every port is in the same broadcast domain and the same collision domain.

    In a switch environment, traffic only goes to the station that it is intended for (after the switch builds it's MAC address table). In a switch, every port is in the same broadcast domain but each port is in it's own collision domain.

    Comment


    • #3
      Re: need clarifying to understand the way switch differs from hub

      i'll rephrase my question a little bit cause i want to know what happens in theory when looking at the two configurations when a certain device wants to talk with another device

      1.[lets assume we got a switch connected at this case] the computer must have the destination mac address (cause the computer cant know it and it need to write it in the packet) so it sends and ARP message and that ARP message is a broadcast which all the devices getting, after getting the destination mac, only then the communication goes to the destinted computer, true? (please clarify

      2. now about hubs as you said here it just connects the whole devices phisically so even after a computer created a session with another [for example im transfering a file from one to another] in the middle of it, the data is still being thrown to the whole network?

      thanks.

      Comment


      • #4
        Re: need clarifying to understand the way switch differs from hub

        For the most part you've got it right. Number 1 applies in both cases, the sending host needs to find the MAC of the receiving host so it sends an ARP broadcast (which is a layer 2 broadcast as opposed to a layer 3 broadcast). Once the sending host learns the MAC address of the receiving host it directs it's packets to that MAC address. Now here's where the differences come in between a hub and switch environment:

        With a hub: The traffic is sent to the receiving hosts's MAC address but as neither the sender nor the hub know which port the receiver is connected to the traffic is "flooded" to all ports on the hub. All the hosts connected to the hub inspect the packet, see that the destination MAC is not theirs and discard the packet, except for the actual receiving station which accepts the packet.

        With a switch: Same as with a hub except that the switch knows which port the receiving host is connected to and directs the traffic there. Packets are not flooded to every port on the switch. (This occurs after the switch "learns" which MAC addresses are connected to which ports and builds it's MAC address table, which is analogous to an address book).

        Comment


        • #5
          Re: need clarifying to understand the way switch differs from hub

          Best analogy I heard for describing the differences was the Smart Postman and the Dumb Postman.

          To deliver the letter, the Dumb Postman knocks on every door in the street and asks if the letter is for them.
          The Smart Postman reads the address and goes straight to the correct house.

          Not a technical explanation but I believe it gets the message through.
          Last edited by biggles77; 9th October 2008, 05:43. Reason: Correct typo
          1 1 was a racehorse.
          2 2 was 1 2.
          1 1 1 1 race 1 day,
          2 2 1 1 2

          Comment


          • #6
            Re: need clarifying to understand the way switch differs from hub

            Nice. I'll remember the analogy.

            Comment

            Working...
            X