Friday, July 30, 2010

Router

A router is similar in a switch in that it forwards packets based on address. But, instead of the MAC address that a switch uses, a router can use the IP address. This allows the network to go across different protocols.

The most common home use for routers is to share a broadband internet connection. The router has a public IP address and that address is shared with the network. When data comes through the router it is forwarded to the correct computer.


This comparison to email gets a little off base. This would be similar to the router being able to receive a packet as email and sending it to the user as a fax.

Switch

A switch steps up on a bridge in that it has multiple ports. When a packet comes through a switch it is read to determine which computer to send the data to.


Switches on the other hand are more advanced. Instead of broadcasting the frames everywhere, a switch actually checks for the destination MAC address and forward it to the relevant port to reach that computer only. This way, switches reduce traffic and divide the collision domain into segments, this is very sufficient for busy LANs and it also protects frames from being sniffed by other computers sharing the same segment.

They build a table of which MAC address belongs to which segment. If a destination MAC address is not in the table it forwards to all segments except the source segment. If the destination is same as the source, frame is discarded.

Switches have built-in hardware chips solely designed to perform switching capabilities, therefore they are fast and come with many ports. Sometimes they are referred to as intelligent bridges or multiport bridges.
Different speed levels are supported. They can be 10 Mb/s, 100 Mb/s, 1 Gb/s or more.

Most common switching methods are:
1. Cut-through: Directly forward what the switch gets.
2. Store and forward: receive the full frame before retransmitting it.
OSI: Switches are on the data link layer (just above physical layer) that’s why they deal with frames instead of bits and filter them based on MAC addresses. Switches are known to be used for their filtering capabilities.

Bridge

A bridge goes one step up on a hub in that it looks at the destination of the packet before sending. If the destination address is not on the other side of the bridge it will not transmit the data.


  • A bridge only has one incoming and one outgoing port.
  • To build on the email analogy above, the bridge is allowed to decide if the message should continue on. It reads the address bob@smith.com and decides if there is a bob@smith.com on the other side. If there isn’t, the message will not be transmitted.
  • Bridges are typically used to separate parts of a network that do not need to communicate regularly, but still need to be connected.

Bridges are used to extend networks by maintaining signals and traffic.

OSI: Bridges are on the data link layer so in principle they are capable to do what switches do like data filtering and separating the collision domain, but they are less advanced. They are known to be used to extend distance capabilities of networks.

In a comparison with switches, they are slower because they use software to perform switching. They do not control broadcast domains and usually come with less number of ports.