Some Examples of Switching

Going through some switching topologies and assisting with some troubleshooting has reminded me that while switching can easily be dismissed as the “easy” part of networking, there are definitely some nuances you need to keep straight.  I’ve also learned that concepts alone are not getting it done from an understanding standpoint, so here are a couple of examples that hopefully can drive the point home.

A couple of quick facts to remember:

  • Switches forward frames based on destination MAC address
  • VLANs need to exist on every switch from your computer to your default gateway
  • SVIs (interface VLAN) provide a virtual interface for your default gateway
    • SVIs MUST have corresponding VLANs (interface VLAN 10, must also have a VLAN 10)
    • SVIs should generally only be placed on L3 switches that have “ip routing” turned on
  • A single subnet (VLAN) cannot pass through a router

Topology 1 – Simple Flat Topology, Single VLAN

Screen Shot 2016-09-02 at 9.48.42 PM

In the above topology, everything is in the same subnet/VLAN.  This is the simplest topology you can employ.  Switches come configured by default with everything in the same VLAN.  If you are only using 1 VLAN, you just configure the router port that connects to your switch in the same subnet and you are all set.

Topology 2 – Multiple VLAN, Router on a Stick (sub-interface)

Screen Shot 2016-09-02 at 9.49.07 PM

In this second topology, multiple subnets/VLANs are being used.  The router on the right hand side is using its Gigabit interface to perform inter-VLAN routing for VLANs 10, 20, and 30.  Each individual VLAN uses a sub-interface as its default gateway (example Gigabit 0/0.10 for VLAN 10).  This concept is known as Router-on-a-stick.

Topology 3 – Multiple VLAN, Routing using SVI on Layer 3 Switch

Screen Shot 2016-09-03 at 2.55.23 PM

In the above topology, we have swapped out a couple of L2 switches for L3 switches, and instead of performing inter-VLAN routing on the router, we are moving this function to the L3 switch.  One of the finer points: the VLAN 10 on the left side of the topology and the VLAN 10 on the right side have NOTHING to do with each other.  When you cross a layer 3 link (any point-to-point connection with IP addresses on each end), the VLANs lose their significance.  Said another way, the VLAN 10 on the left is a completely different VLAN from the VLAN 10 on the right.  Because they are different, they must each have a DIFFERENT subnet assigned to them (192.168.10.0/24 and 172.16.10.0/24).

We can go a bit further in later posts, but this should give you a good idea of some of the basic stuff you can expect to see.

Leave a Reply

Your email address will not be published. Required fields are marked *