Router vs Switch

Unanswered Question
Jan 12th, 2008

Hi,During the reading on networking stuff I noticed that 1.Switch builds its CAM table on Source addresses(but forwards the frames on destination addresses), whereas

2. Router builds is routing table on destination addresses and forwards the packets on destination addresses.

Why this difference is in building the particulars tables while the function is forwarding the frames/packets....

Anyone please guide, Thanks.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.

Hi There

A switch actually builds its CAM table on both source and destination MAC addresses, which is Layer 2 information.

When a frame comes in on a switch port the switch adds the MAC address and the port the frame arrived on into the CAM table. The switch then floods the first frame out of all ports except the port the frame arrives on. When the destination device responds, the switch adds the MAC address of the responding device and the port it was received on into the CAM table. From that point on packets between these two devices will only be switched between these two ports.

The router on the other hand builds its routing table on Layer 3 information, Routes to other networks. A router usually has no knowledge of end systems, only networks.

A switch using its CAM table switches frames between end systems on the same VLAN while a Router routes Packets between subnets/networks. A layer 2 switch has no knowledge of networks, only end systems.

Best Regards,

Michael

swmorris Tue, 01/15/2008 - 23:35

And to take it one step further...

A switch, when it receives frames destined for an unknown MAC address will flood the frame out all available ports in the VLAN.

A router, when it receives packets destined for an unknown IP network will (fortunately) drop the packets! (Unless it has a default route, in which case it becomes someone else's problem!)

:)

HTH,

Scott

[email protected]

Actions

This Discussion