The document compares layer 3 switches and routers. It discusses their differences in performance, cost, port density, flexibility and supported protocols. Layer 3 switches are faster than routers for routing within a LAN but routers can connect LANs, MANs and WANs. They both support static and dynamic routing protocols, though layer 3 switches have limitations. While routers have more capabilities, layer 3 switches are more cost effective for high-speed inter-VLAN routing within a LAN. Both devices are needed to build a fully functional network.