dslreports logo

Introduction

In general, you want to use a router when most of the time the device does routing. Likewise, you want to use a switch when when most of the time the device does switching. This statement becomes more apparent when dealing with larger network like an ISP or large corporation.

Example in ISP is that they use routers (at least 7600 series) to have full view of BGP (the edge router). As for their "internal network", they use layer-3 switches (usually Catalyst 6500 series). In smaller environment, companies use something like 800, 1800, or 2800 series router as the Internet router and/or WAN router to their private WAN point-to-point, Frame Relay, or MPLS network while they use Catalyst 3560 series Layer-2/3 switches for local routing between different departments or between servers and hosts, and for some Spanning-Tree with Layer-2 access switches (if any).

The idea of creating Layer-3 switch is basically to efficiently do inter-VLAN routing or to do internal routing between multiple broadcast domains (multiple LAN where each LAN has its own subnet) while keeping Layer-2 features such as spanning tree and trunking. However to deal with "border" or "edge" of the network where there are less spanning tree or trunking (less Layer-2) or where there is a need for Layer-2 network termination (edge network), a router is used since a router is basically designed to handle traffic across the border or the edge network.

For more info, you can check out the following FAQ:
»Cisco Forum FAQ »What is the difference between a Layer-3 switch and a router?

Following is illustration of using Layer-3 switch to do inter-VLAN routing where the LAN 1 is user network, LAN 2 is server network, and LAN 3 is guest network.

Sample Configuration of Layer-3 Switch design implementation

Router


Switch


Keep in mind that Layer-3 switches' prices in general are not cheap from SOHO users or small businesses' perspective since Layer-3 switches are designed for organizations that need physical hardware separation between router and switch when routing is in need. Therefore should there be cheap Layer-3 switches available, SOHO users or small businesses are more than welcome to use them.

When small businesses need to do inter-VLAN routing (i.e. data interchange between multiple departments) or internal routing between LAN subnets (multiple broadcast domains), there are some "cheap" and might still be reliable solutions beside using layer-3 switches.

One solution is to use a "Router On A Stick" design. Such design consists of a router and a layer-2 switch that are capable of doing trunking. Following is illustration.

Sample Configuration of "Router On A Stick" design implementation

Router


Switch


Another solution that is probably cheaper is to setup multiple unmanaged (dumb) switches with also multiple routers. While "Router On A Stick" design means single router terminates multiple LAN subnets, this second solution means each router terminates its own LAN subnet. Following is illustration.

Sample Configuration of multiple router design implementation

1. Static Routing

When there are only few LAN (broadcast domain), then static routing network design should be sufficient.

Internet Router


Router 1


Router 2


Router 3


When there are more LAN (broadcast domain) in place or when there are multiple connections to reach the same destination (such as having multiple ISP to connect to the Internet), then network design based on dynamic routing might be more scalable than static route approach. Following is illustration.

Sample Configuration of multiple router and Layer-3 switch design implementation

2. Dynamic Routing

In this sample configuration, RIP as dynamic routing protocol is used to provide dynamic inter-connectivity between two buildings. You may notice that RIP as the dynamic routing protocol in place decides that machines within Building #1 use ISP 1 to go out to the Internet as default, and will only use ISP #2 through point-to-point link between the two switches when ISP #1 becomes unavailable. Similarly, machines within Building #2 use ISP 2 to go out to the Internet as default, and will only use ISP #1 when ISP #2 becomes unavailable.

Router 1


Switch 1


Router 2


Switch 2


Whichever solution to choose, you should always use managed switch instead of unmanaged switch since in general, managed switch is more reliable and has more functionality to tune.

Connectivity to Business Partner's Network

Now let's review the following network topology which is typical datacenter layout or Ethernet-based network topology.

You have a network consisting of three switches (B1, B2, B3) and there is a business partner's network consisting of also three switches (A1, A2, A3). Each network may or may not run Spanning Tree to avoid Layer-2 network loop. The objective is to interconnect your network and the business partner's network somehow with less equipment in place, less complicated, reliable, and most importantly you still maintain your network control and administration.

One may suggest that you simply run cables between switches A3 and B3 running layer-2 connectivity. By having Layer-2 connectivity, there is a danger of Layer-2 network loop which can bring down network immediately.

From different perspective, you may have to surrender your Layer-2 network control over to your business partner since Layer-2 connectivity requires full control by single network administration and more likely, your business partner is the single network administration rather than yourself. When you have internal Layer-2 network within switches B1, B2, or B3; then you lose control of those internal network administrations as well which is typically unwanted. In other words, permitting your business partner to be the single network administration requires such switches B1, B2, and B3 to be dedicated switches for external connectivity to business partner and no internal Layer-2 network is allowed.

Should there be a need to maintain internal Layer-2 network within switches B1, B2, and B3 while having external connection to your business network, Layer-3 connectivity should be your best bet. Even though there is a thing called Layer-3 network loop, such loop does not bring down network severely as Layer-2 network loop. Further, you still maintain your network integrity while having external connection to your business network with Layer-3 connectivity between your network and business partner's.

At this point, let's consider Layer-3 connectivity between your network and business partner's. For the sake of illustration, assume the following.

Your network: 10.10.10.0/24
Your business partner's network: 100.32.10.0/24
Point-to-point WAN between your network and business partner's: 1.1.1.0/30

The internal IP subnet you use within your network is 10.10.10.0/24. For this connectivity, your business network uses 100.32.10.0/24 for your network to reach.

Since there will be Layer-3 connectivity, there must be a device within your network that is able to do routing. One solution is to put a router between Switch A3 and Switch B3 like following

Note that the router is on your network edge since the router terminates your Layer-2 network to connect to your business partner's network.

The configurations are the following.

Switch B1


Switch B2


Switch B3


Router


When your Switch B3 is a Layer-2/3 switch, then you don't need to put a router between your network and your business partner's since you can utilize the Switch B3 routing functionality to reach the business partner's 100.32.10.0/24 network. No additional router means less equipment to deal with, save physical space, less power consumption, and simplify network topology. The network topology and configuration are as follow.

Switch B1


Switch B2


Switch B3


Additional Sample Design and Configuration
»Cisco Forum FAQ »Various Network Design using Routers, Layer-3 Switches, and more

Discussions

»[Config] Cisco 2960 InterVlan Routing
»[CCNA] Cisco 3 tier design selection
»Suggestion for cisco 3560 Needed
»HELP...Conguration not working...Cisco 1961
»[Config] What would the switch and router configuration be ???


Feedback received on this FAQ entry:
  • Fantastic stuff, very useful.

    2015-09-20 00:21:04

  • It helped me immensely, I am currently a student at UMUC so I cited this post. Thanks

    2015-01-23 08:28:56

  • Nice work, very well written article was not expecting it to be this good thank you

    2013-09-12 13:13:37

  • Great document thank you, this has help me out so much

    2013-08-07 14:57:19

  • very Knowledgeable document .great..

    2013-06-13 06:10:08

  • Great document, really helpful and very well explained and straight to the point. Top marks to author!

    2013-01-21 05:54:24

  • thank you very much (dynamic routing)

    2011-11-09 04:03:56

  • Excellent and very usefull training. Thanks to the author.

    2011-10-30 03:01:31

  • This is an excellent article, very helpful and descriptive.

    2011-07-27 16:54:40

  • MATERIAL IN THIS DOCUMANT WAS SATISFACTORY. I GOT MY ANS. THANKS TO THE SUPPORT TEAM OF SUCH DOCUMENT.

    2010-05-20 08:49:04



Expand got feedback?

by aryoba See Profile
last modified: 2015-11-17 16:08:36