What is the Difference Between Switching and Routing?

Routing and switching can be two terms that are difficult to differentiate, so here is a simple explanation that may help to clarify things. First of all switching and routing are not the same thing. Switching involves moving packets between devices on the same network. Conversely, routing involves moving packets between different networks.

Switches operate at layer 2 of the OSI Model. A switch, also referred to as a multi-port bridge, is able to determine where a packet should be sent by examining the MAC address within the data link header of the packet (the MAC address is the hardware address of a network adapter). A switch maintains a database of MAC addresses and what port they are connected to.

Routers, on the other hand, operate at layer 3 of the OSI Model. A router is able to determine where to send a packet using the Network ID within the Network layer header. It then uses the routing table to determine the route to the destination host.

Article Written by

  • Pingback: links for 2007-05-05 | Mansoor Nathani's Blog()

  • Abraham

    In addition to what Diana has written, there is a small correction that switches will forward packet in the same network which is false.
    As a switch doesnt know the network it just forwards the packet/frame based on the MAC and hence it is possible for multiple networks to exists on the same L2 switch eventhough this is not suggested.

    Switching is ASIC based i.e is hardware based which makes it much faster than the software implementation of the conventional Routing table.

  • ARIA


  • Anisur Rahaman

    Very good explanation…

  • http://neilmukherjee.wordpress.com/ Neil Mukherjee

    Thanks for sharing, Diana.

  • Anupam Thakur

    Switches will forward frame (protocol data unit at layer 2) in the same broadcast domain that is the reason why switch can’t communicate with switch or devices in other VLAN, it need router or layer 3 switches.
    While router will route the packet (protocol data unit at layer 3) to different network if the other network is known to the router.
    Difference between switching and routing:-

    1) Switching will be faster as switch uses ASIC technology.
    Routing will be slower as it is software based.
    2) Switching is done at layer 2.
    Routing is done at layer 3.
    3) If the destination is not known to switch it will broadcast the frame.
    If the destination is not known to router it will drop the packet.
    4) Switching is done in same broadcast domain.
    Routing is done in different networks.
    5) Switching is done by using MAC address.
    Routing is done by using IP address.

    —->>>>>Protocol data unit at layer 2 is frame
    —->>>>> Protocol data unit at layer 3 is packet

  • Avin

    Very good explanation