I want to know the differences between L3 switch & router.
i have heared that both are almost same but, what is the core diffrences that i want to know!!!
Concerning routing they are quite the same... But.
L3 switch first of all is a switch. Therefore it has all switching capabilities and implements it in hardware. Some switches (3750, 3560, ...) implement L3. These functions are routing protocols, DHCP etc. Routing protocols are implemented but nothing else. Switch works using CEF as a main and only forwarding capability and routing protocols serves to fill RIB and then - to fill CEF. Routing (L3 forwarding) therefore is also implemented in hardware. You can't turn CEF off and also you can't use any other interface type besides Ethernet.
Router has more L3 functions. It has NAT, OER/PfR, L3 QoS, MPLS, ... You may say that 6500 also does but 6500 is ... not so simple siwitch
ISRs for eample implement all features in software, but they may use large number of different interfaces, and they, of course, does not work good in switching environment. But they can
Well... CEF is all It is everywhere (sorry, it's a joke).
CEF is Cisco Express Forwarding. Traditional ip routing algorithm is rather slow. You need to take IP packet, find destination IP address, look through routing table to find next hop address (may be up to 4 times if recursive routing is used), then use ARP (InARP or something else) to find MAC (DLCI, ...), then - create L2 header, calculate CRC and then send packet further... For modern router like ISR it will be about 10 Mbps throughput, not more.
There are a number of optimization technics, that allow improve throughput. They are Fast Switching, Optimal Switching, NetFlow Switching and Cisco Express Forwarding. Will not say anything about others but CEF is based on routing table. It takes routing table and creates two additional tables: FIB (Forwarding Info Base) and Adjacency Table (which is slightly resembles ARP table). These two tables contain all neccessary information to switch IP packets without looking into routing table and without sending ARPs. These tables are rather static - they change only when routing table changes and these tables are implemented in hardware in L3 switches. Routers also have CEF tables but there they are implemented in software.
CEF is a heart of L3 switch and sometimes it is simply impossible to turn it off.
Well. This is about CEF. Not very strictly of course.