What is Routing and Switching

What is Routing and Switching? Difference between Routing and Switching

Routing and Switching of packets are the basic functions of any network. Though routing and switching performs the same task (transferring data to the destination) but they from each other.


The movement of frames in the same network or Local Area Network or a sub network is called as switching. Switching is layer two or data link layer function. Switch acts as a communication device in the data link layer.

Switches find the source and destination of a frame (packet along with data link header and trailer) with the help of a MAC address. MAC address is a unique number of about 48 bits assigned to every network interface.

MAC address is also known as physical address or hardware address assigned by the manufacturers of interface cards. Switch uses this address to find the source and destination of a frame.

Frame has the information about source MAC id and destination MAC id. Switch maintains the MAC id’s of all the devices that are connected and the physical ports on the switch to which the devices are connected to it in a table called MAC address table or MAC table.

 When a switch receives an Ethernet frame, it looks for the destination MAC address. Once the MAC address is found, it checks the MAC table for the port to which the MAC is associated and forwards it to the particular port.


Selection of the best path that is available in the network for the transmission of data packets is known as routing. Routers are the network devices that perform the task of routing.

Routers operate at the network layer or layer 3 of OSI reference model. Router looks for the destination IP address to find the destination of a packet. Router maintains the routing table. The routing table has information about various routes that are available to reach the destination.

Routing table is formed based on the routing protocols that are used. Some of the routing protocols are Router Information Protocol RIP, Enhanced Interior Gateway Protocol EIGRP, and Open Shortest Path First OSPF etc. Routers consider various metrics while selecting the best path. Some of the metrics are Bandwidth, Administrative Distance, and Congestion etc.

Difference between routing and switching:

Routing and switching helps packets or frames to reach the destination. But they differ from each other in following aspects

a.            Routing is layer 3 activity where as switching is layer 2.

b.            Routing uses IP address and switching uses MAC id’s to transfer packets.

c.             Switching delivers frames in same network, where as routing can transfer packets between different networks.

Read more

   CCNA Tutorial

   CCNA Practice Test  

Shortcodes Ultimate

Follow Us