What is Multilayer Switching- Router on a Stick

Multilayer switching is a networking technique that works on both Layer 2 switching (data link layer) and Layer 3 routing (network layer) into a single device, known as a multilayer switch. As these switches work on both L2 and L3 layers, so they have capability to forwarding of network traffic based on both MAC addresses (Layer 2) and IP addresses (Layer 3).

Hope you all are aware about Layer 2 switching (data link layer) and Layer 3 routing (network layer) in OSI Layer. If not, then no problem, let discuss once in a summary’s way.

 

 

 

OSI Layer

The OSI (Open Systems Interconnection) model is a theoretical framework that defines a standard for end-to-end network communication. It consists of seven layers, each with a specific role and set of functions.

Here we will focus on first three Layers only.

  • Network—Layer-3 Device Works on this layer (IP, Router, Layer-3 Switch, ARP, Routing)
  • Data Link—Layer-2 Device works on this Layer (MAC, Frame, Switch, HUB. Ethernet, Layer-2 Vlan)
  • Physical Layer—All physical connectivity (Power, LAN, system physically up).

So, Technically Multilayer switch works on all these Three Media layers.

How Inter-Vlan Routing Works

When we need to do Routing between VLAN, Subnet or Network for communication, then we need Layer-3 Device it can be a Router or Multilayer Switch.

Routing between VLANs can be accomplished one of three ways:

  • One to one Port connection:

    Using an external router that has an interface to each VLAN—Least Feasible and not recommended and possible to connect each Van with separate Router Ports.

 

 

  • Router-on-a-Stick:

    Using an external router that has a single link into the switch, over which all VLANs can be routed. The router must understand either 802.1Q or ISL trunking encapsulations, and the switch port must be configured as a trunk. This method is known as router-on-a-stick:

 

  • Multilayer or Layer-3 Switch:

Using a Multilayer or Layer-3 switch with a built-in routing processor. It can work both as Layer-2 and Layer-3 functionality.

 

In Above solution, first solution is not a feasible and possible solution. So, we will discuss rest Two solution and will understand how multilayer switching or Routing works.

Router-on-a-stick

In this solution, we have a single physical link between Router and Layer-2 Switch and need to create Sub-interfaces on the Router physical port based on number of Vlans. Along with that need to configure trunk with 802.1Q encapsulation.

Pros and cons of Router-on-a-Stick

Pros:

  • Cost Effective: If there are small setup then it will be an ideal solution to eliminate the need for multiple router interfaces by utilizing a single physical interface with sub interfaces.
  • Simplified Network Design & Troubleshoot: It make the network implementation and troubleshoot simplified, as you only need to configure a single physical connection between the router and the switch.
  • Scalability: It is easy to scale as we only need to configure sub-interfaces to add or remove Vlans.

Cons:

  • Single Point of Failure: As per its design it’s cause single Point of Failure.
  • Limited Bandwidth: As all Vlan traffic flow over a single physical link, so it can cause bandwidth issue.
  • Design Limitation: Its only small setup not for multiple Vlan or large setup
How to configure Router-on-a-stick

 

Configuration on Switch B would be as follows

 

Configuration on the Router A would be as follows:

 

 

In above scenario you can see that we have created the Same topology as discussed. This scenario is called Router-on-a-Stick.

 

Now after configure all these ports with required config, let’s check the result.

Expected result—Laptop with IP 10.1.1.10 should able to ping Laptop with IP 20.1.1.10 and vice-versa.

Multilayer Switch Ports:

There can be three types of Ports available in Layer-3 switch.

  • Switchports – Layer-2 ports on which MAC addresses are learned.

Switch(config)# interface fa0/1

Switch(config-if)# switchport

 

  • Layer-3 Ports – Essentially routing ports on multi-layer switches.

 

Switch(config)# interface fa0/1

Switch(config-if)# no switchport

Switch(config-if)# ip address 10.1.1.1 255.255.0.0

Switch(config-if)# no shut

 

  • Switched Virtual Interfaces (SVI) – A VLAN virtual interface where an IP address can be assigned to the VLAN itself.

 

Switch(config)# interface vlan 10

Switch(config-if)# ip address 10.1.1.1 255.255.0.0

Switch(config-if)# no shut

Multilayer Switching Methods

As we already discussed multiple times that Multilayer or Layer-3 can perform both as L2 and L3 devices.  Multilayer switch has functionality to do routing and switching both with below switching method:

  1. Process Switching
  2. Fast Switching
  3. Cisco Express Forwarding (CEF)

 

Process Switching aka Route-Cache Switching

The multilayer switch performs a full Layer 3 processing for each packet. When a packet arrives, a packet must first be routed, the switch examines the destination IP address, performs a routing table lookup, and determines the appropriate egress interface and allowing the switching engine to cache the IP traffic flow. Then packet will be switched. It often referred to as route once, switch many. This method allows for flexibility in handling complex routing scenarios but is relatively slow and resource-intensive.

Fast Switching

Packets are forwarded in the CPU interrupt, using cache entries created by process switching. If the destination address is not present in the fast-switching cache, the packet is returned to process switching path, where the processor attempts to build a cache entry which can be used to forward packets to the destination. So basically, Fast Switching is one step ahead of Process Switching. But still things need more improvement.

Cisco Express Forwarding (CEF)

Gap and slowness observed with process and Fast Switching has been address in CEF.  Cisco Express Forwarding (CEF) is an advanced multilayer switching method developed by Cisco Systems. It further improves forwarding performance compared to fast switching.

  • CEF does not cache routes, thus there is no danger of having stale routes in the cache if the routing topology changes
  • Builds the routing table and then routes data
  • CEF builds a Forwarding Information Base (FIB) and an adjacency table based on routing information and MAC addresses
  • The FIB contains most specific routes are placed as forwarding information,
  • CEF maintain the adjacency table holds Layer 2 next-hop information
  • CEF performs Layer 3 lookups and Layer 2 encapsulation in hardware, resulting in high-speed forwarding with minimal latency
  • It is commonly used in Cisco IOS-based multilayer switches

 

Visit to our site : https://www.kbrosistechnologies.com/

Watch more Video  https://www.youtube.com/channel/UCpcd6IshE1caAbf9EdJd3gw 

https://www.youtube.com/channel/UCTbOmLTSlHggEBkt5wFGNRA

FAQ

Q. What is Multilayer Switching

A. Multilayer switching is a networking technique that works on both Layer 2 switching (data link layer) and Layer 3 routing (network layer) into a single device, known as a multilayer switch.

Q. What is Router-on-a-stick

A. we have a single physical link between Router and Layer-2 Switch and need to create Sub-interfaces on the Router physical port based on number of Vlans. Along with that need to configure trunk with 802.1Q encapsulation.

Q. What is Multilayer Switching methods

A. The multilayer switching method are:

  • Process Switching
  • Fast Switching
  • Cisco Express Forwarding (CEF)
Please Share