The key points are that layer 2 switches forward frames using only layer 2 information (MAC address of destination). Layer 3 switches have the capability of layer 2 switches to forward using destination MAC address but also the the capability to forward using layer 3 information (destination IP address).
layer 2 switch only uses mac address of switch in its mac table to switch the packet
routing not possible with layer 2 switch
layer 3 switch has got both routing & switching function done in specalised hardware
hence supports routing as additonal with switching function
in order that host can communicate on L2 Switch:
- they have to be on the same vlan
- they have to be on the same subnet
- you must use another router (L3) to route between different vlans (or subnets).
L3 Switch :
- no need for a separate router, it is built-in
- you have both L2 and L3 connectivity
since specialised hardware is used in layer3 device
table lookups for routing & switching will be handled by this hardware
so layer3 switch is faster in switching packets than a traditional router
normal router uses software for table lookups (routing)
layer3 switch uses hardware for table lookups which makes it faster
price of L3 also comparably less
Thanks for reply.But what is the main difference between the router & L3 switch?IS it possible to replace router by L3 switch in every scenario ?
its a kind of question if you try answer it im simple terms that will be l3 switch also has capability to forward traffic using layer 3 information i.e. destination address.
and l2 switch forward traffic on the basis of mac address.
but we also had routers at the time people come up with l3 switch to do the l3 forwarding , so why we basically come up with l3 switch, let see if this gives you better picture like l3 switch has arrived and what it basically do
** Rick, kindly correct me if anywhere i am going wrong anywhere:)
lets see if we get something new in this direction :-
- first thing l2 switching is faster as it forwards on the basis of mac address.
while forwarding on the basis of l3 information,l3 device has to look up in the layer 3 header information and check the routing table to make the correct forwarding decision. this makes the l3 device forwarding process slower.
- here the innovation part kicks in to make the l3 process fater
In l3 switch, routing table has been been processed before any traffic hit the switch and lookup table has been built on the basis of information gathered from routing table. and that is nothing but various forwarding enteries has been created on the basis of destination address.
another table contain the mac address information for the next-hop address to reach these destinations.
now with all this information, any packet arrive at l3 switch, destination is matched against this table entries and you have all the information in hand needed to forward the packet. no need to check with routing table and arp table everytime.
this is very small part of what l3 switch do and how it has been concepetulized :)
there are lot many things which are not been touched here, you will get many interesting docs at cisco.com on this, i would definately recommend you to read those get more clarity..
sry to make this post awfully lenghty, but its still not complete. if u are able to catch the jist, you can further read on this topic, u will find it quite interesting.
** Nowdays routers are doing the pretty much same thing to forward the traffic.its very debatable topic nows - whts the difference between router and switch in present scenario ? :)
Thanks for reply. what is the main difference between the router & L3 switch?IS it possible to replace router by L3 switch in every scenario ?
There are supposed to be two main differences ( we have exceptions here also)
Router is meant for WAN, where you want to terminate T1, FR etc and L3 switch is basically used in LAN enviorment like inter vlan routing.
Layer 3 switch make its forwarding decision in hardware (ASIC- Application specific integrated circuits) and router make its decision in software (intelligence from IOS). So L3 switch happen to be faster than router in forwarding packets.
now the exceptions -
L3 switches like 6500 can be loaded with cards which support wan connections also.
and routers like 7200/crs do the decision making in hardware (ASIC)
thts y I told you this topic is quite interesting, I am posting some of discussion already happened on this topic at this forum.
Rate if it does help