Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hub behind a switch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ksool
Guru
Guru


Joined: 27 May 2006
Posts: 337
Location: Cambridge, MA

PostPosted: Sun Sep 03, 2006 6:37 am    Post subject: Hub behind a switch Reply with quote

I've just added a hub behind a 4 port switch so that I could attach a few more machines. The hub is connected to the switch through an uplink port (no idea how this is different to just connecting to one of front ports).

My question is this: When the computers between the hub try to communicate with each other, the hub will send the packet out to the switch (or will the uplink port filter this?) and then the switch will send the packet it to every port since it won't be able to find the destination (or will it send it back to the hub since it recognizes that the destination is back where the packet came from?). Obviously, I don't want to send all those packets around my network unnecessarially.

Somewhere in there, there's a question.
And I'd be much oblidged if anybody could help clear this up.
Back to top
View user's profile Send private message
jballou
Tux's lil' helper
Tux's lil' helper


Joined: 10 Mar 2005
Posts: 128
Location: Baghdad, Iraq

PostPosted: Sun Sep 03, 2006 7:44 am    Post subject: Reply with quote

Simply, a hub divides available bandwidth among all acive ports because each packet is broadcast to every port, even unicast traffic.
A switch is smarter, it keeps MAC addresses in a table and sends it to whatever port that MAC address last replied on.
So if you have computers named hub1 hub2 and hub3 on the bub, and switch1 switch2 and switch3 on the switch, if any of the hub{1,3} hosts send any traffic each of the other hub computers hear it. If it's destined for the switch, it also hears it, but only the switch{1,3} computer is it destined to will hear it. If switch1 wants to talk to hub1, the switch sends it out the hub port, then all the hub computers hear the same packet.

HTH
_________________
-Shuttle SN25P, Opteron 185, 74Gb WD Raptor, 2x 300Gb Barracuda 7200.9, 2x 1Gb Corsair dual channel, BFG GeForce 7800GT
-Asus Z7100 laptop, P-M 2.13, 2Gb DDR, 100Gb 7200RPM HDD, 128Mb GeForce 6600 Go.
Back to top
View user's profile Send private message
ksool
Guru
Guru


Joined: 27 May 2006
Posts: 337
Location: Cambridge, MA

PostPosted: Sun Sep 03, 2006 4:06 pm    Post subject: Reply with quote

Ah thanks, but what I'm thinking is the following, when the hub computer send each other a packet, say, from hub1 to hub2, will that traffic also be sent to the switch? And then from my understanding, the switch won't know the location of hub2, and will send out that packet to all of the switched machines.

Is that correct?
Back to top
View user's profile Send private message
Monkeh
Veteran
Veteran


Joined: 06 Aug 2005
Posts: 1656
Location: England

PostPosted: Sun Sep 03, 2006 4:15 pm    Post subject: Reply with quote

krs1ars wrote:
Ah thanks, but what I'm thinking is the following, when the hub computer send each other a packet, say, from hub1 to hub2, will that traffic also be sent to the switch? And then from my understanding, the switch won't know the location of hub2, and will send out that packet to all of the switched machines.

Is that correct?


The hub will send the packet to the switch, and the switch will discard it. I think.
Back to top
View user's profile Send private message
ksool
Guru
Guru


Joined: 27 May 2006
Posts: 337
Location: Cambridge, MA

PostPosted: Sun Sep 03, 2006 4:17 pm    Post subject: Reply with quote

I had read (wikipedia) that if a switch doesn't know where to send a packet, it sends it out to all ports.
The question is, is it aware of the machines behind the hub. If so, I would assume it would discard it.
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Sun Sep 03, 2006 5:31 pm    Post subject: Reply with quote

krs1ars wrote:
The question is, is it aware of the machines behind the hub. If so, I would assume it would discard it.

Yes in both cases - when, and only when - the switch has ever seen a packet coming from a pc connected to the hub. The switch records any mac address it sees in an internal table together through which port this packet received the switch.
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
jhmartin
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2003
Posts: 95

PostPosted: Tue Sep 05, 2006 6:08 pm    Post subject: Reply with quote

krs1ars wrote:
I had read (wikipedia) that if a switch doesn't know where to send a packet, it sends it out to all ports.
The question is, is it aware of the machines behind the hub. If so, I would assume it would discard it.


All ports except the one it came in on, that is.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum