Route where you can , switch where you must. If you are from networking background most probably you heard this many times. But is it true or like anything else, does it depend on the situation and other parameters ?
Yes, you are right, it depends.
When you hear a quote , at least in networking , are you asking yourself the reason ? Are you questioning ? Why opposite is not true, can it be ?
I do. You should do. Best way to learn is to ask correct questions and one of the way of asking correct questioning is to look for the opposite idea.
So , instead of ‘ Route where you can , switch where you must ‘ , what if I tell you ‘ Route where you must , switch where you can ‘ is true as well.
In layer 2 or 3, we always concern about failure domains. We recommend you to keep failure domains.
Don't keep so many hosts in Vlan , Don't extend Vlans between the Datacenters unless you have to. In classical layer 2 switching, Broadcast , Unknown Unicast and Multicast (BUM) traffic is flooded in layer 2 domain, because destination MAC address is not known. This mechanism is called fail open.
Since there is no TTL in Ethernet, switching loop can occur (Thus Spanning Tree, RPR , G.8032 is used). Or broadcast storm can meltdown the entire network. Also, layer 2 MAC addresses can not be summarized that's why it increases the resource usage on the Ethernet switches.
But if layer 2 is designed correctly, we limit the impact of these problems. Using correct control plane to prevent loop, broadcast storm control , ARP proxy to limit the ARP and many other tool we use today in our networks.
So, Layer 2 switching with Ethernet switches can create switching loop because it is fail open, broadcast storm can occur. Also, all hosts in the same Layer 2 network have to process the broadcast packets and number of MAC addressing become a problem in large layer 2 network , because MAC addresses can not be summarized.
It looks all bad , and since none of these are happening in Layer 3 routing , ‘ Route where you can , switch where you must ‘. And whenever you see this , you believe. I will explain why this is not always true , or at least always shouldn't be the reason for you to choose routing , instead of switching. But before, let me remind you couple other networking quotes, so you understand the importance of questioning. Hopefully
There are many other quotes today in networking , such as ; ‘ Dual Stack Where you can, tunnel where you must ‘. Of course this is not entirely correct and I explained why it is not always correct in ‘ Is dual-stack best approach for Ipv6 deployment ‘.
Or you might hear, in order to optimize capacity usage, use MPLS Traffic Engineering. This is not always too. I explained it in ‘ Why should you place less emphasis on MPLS Traffic Engineering ‘
Let's continue on ‘ Route where you can, switch where you must ‘ discussion.
As I explained above , it is true from the many aspects.
But when it comes to cost, sending traffic between two points in the network, lower layers is cheaper than higher layers in the OSI.
So Layer 0 (Optical Layer) is cheaper than Layer 1, Layer 1 cheaper than Layer 2 , Layer 2 is cheaper than Layer 3.
Which mean, DWDM is cheaper than OTN , OTN switching is cheaper than Ethernet Switching , Ethernet Switching is cheaper than IP routing.
So, if I say ‘ Switch where you can, route where you must ‘ . Is it always true ?
Of course not, as I explained above, opposite can be true as well.
It depends on ‘ Who is asking the question ‘ (is it by the transmission engineers or network engineers) and the tradeoffs (In this case , cost vs. failure impact). There is no absolute true or wrong in networking and don't discuss with anyone who don't understand you.