Now days most of the routers are layer-2 switches or layer-3 switches. What is the advantages of having layer2 switching. I know it will switch faster compare to layer3. Is any other advantages or dis advantages on it.
It seems like you're asking a fairly basic question. Layer 2 switches forward ethernet frames based on MAC address. Layer 3 switches forward IP packets based on destination IP address. Many modern layer 3 switches operate at wire speed with no performance penalty for layer 3 forwarding vs layer 2 forwarding. Note that most layer 3 switches do not have as much memory or hardware resources for routes as do "routers." This makes many layer 3 switches useful for customer access ports or light-duty datacenter aggregation roles, but most are not suitable as eBGP speakers or for aggregating traffic from more than a few dozen to a few hundred servers.