# Diference between a Switch and a bridge

## yucao89

Please tell me the diference between a switch and a bridge.

----------

## Lnx_dork

HI,

If by a bridge your refering to the bridge project for linux or any of the other bridging software, then a bridge and a switch are 2 different things.

I set up a linux bridge at work that provides a transparent firewall for my bosses win2k domain controllers.  All of his DC's connect to a 100mbit switch on the inside of the bridge.

I don't know how to technically explain what a switch does, but basically if you have a 100mbit switch then each connection to the switch gets a 100mbit connection all to its own.  On the otherhand if you have a 100mbit hub, then all connections are shared so if you have a lot of stuff on the hub then your connection will be slower.  If you have a cable modem then you are effectivley hooked up to a really big hub.

A bridge is a transparent firewall, meaning that it has know identity  (unless you give it one for admin reasons) so all traffic to and from the bridge will pass through it assuming it's allowed and neither side will know that it is going through a "middle man"   

I've probably screwed up both of these explinations and some one will come in a tell me I'm all wrong and I'll live the rest of my life in shame, but that explains it to the best of my non-technical knowledge

Hope that answered your question some what

----------

## de4d

switch:

should be obvious i think

bridge:

allows linking 2 physical netwoks to one logical.

that means u can extend a network over technical specifications of the used systems by adding more distance or some hosts.

additional u can add a firewall to filter data and/or prevent attaks/leaks to another segment.

imho this technique is designed to increase the size of networks using non-routable network protocols which is rather outdated...

=> bridge == 'low level router'

(could be wrong of course).

----------

## gfunkmonk

A switch is a multi-port bridge, so they both do exactly the same thing. They are both used to segment networks, but bridges are rarley really used anymore.

----------

## splooge

Yep.  Exactly what the guy said above.  A switch is a multiport bridge.  One reason they were used was to increase the number of collision domains for better network performance when hubs/10base2 were prominent.  But since the cost of switches is now about the same cost of a hub, bridges are /basically/ useless.

On a shared network (hub) you will never acheive better than 66% efficiency.

Bridging 2 network with your linux box is basically turning your linux box into a switch.

----------

## yucao89

does the switch and bridges

checks the frame of an ethernet and send to all the segments or it just sends it to one segment according to the MAC address table.

----------

## splooge

A switch will send a frame out to ALL ports until it learns which port the destination mac address is on, from then on it only sends that frame to the appropriate port.

----------

## yucao89

So firstly it will send a message to all ports and then it will know the appropiate. Do this also happens in the bridges. 

 and what about the routers

----------

## yucao89

CAN　SOME ONE HELP ME???

----------

## easykill

what the hell do you need to know this for? are you having us write your school project for you?

a bridge is essentially a 2 port switch, so it really can't broadcast on all ports first.

I'm not sure if managed switches will broadcast on all ports, since they might already know which MAC is at which port...

----------

## Crg

 *yucao89 wrote:*   

> CAN　SOME ONE HELP ME???

 

Sure http://www.google.com

----------

## splooge

 *easykill wrote:*   

> a bridge is essentially a 2 port switch, so it really can't broadcast on all ports first.
> 
> I'm not sure if managed switches will broadcast on all ports, since they might already know which MAC is at which port...

 

What's the difference between a managed switch and an unmanaged switch?

A switch will broadcast an ethernet frame until it learns which port contains the destination mac address.  The switch learns the destination mac address when the destination computer sees the frame and responds for the first time.

I guess you could say that switches, bridges and hubs connect the physical network (layer 2 ethernet) while routers connect the logical (layer 3 IP) networks.

----------

## easykill

in our managed switches where i work, we map MAC addresses to physical ports on the hub.  Therefore it doesn't have to scan for the MAC unless it isn't where it's supposed to be

----------

