Improve Routing Performance with Multilayer Switching (MLS)

The topic of Multilayer Switching (MLS) or Layer 3 switching is something that does not get a lot of press but can be used to greatly improve the routing performance of supporting equipment. This article reviews the abilities of MLS and talks about how it is used on some modern routing equipment.

The concept behind MLS requires an understanding of how routing has worked in the past. Before MLS was available, a packet that needed to be routed would be sent to a route processor. The route processor would read the packet information and determine, in software, the route that the packet must take according to the routing type used on the device (static or dynamic).

While this process was relatively fast, it did require that the packet be decoded in software that slowed the potential speed of packet forwarding down. MLS provides a method for greatly improving the speed of this process by switching the packet in hardware and eliminating much of the work of the route processor.

The next question is how this is possible without the use of a route processor. The route processor is still used to determine the route of traffic, but the subsequent traffic that matches the same traffic flow is switched. Of course, if the traffic was simply switched without alteration of the packet, further routing would be confused as the packet would still have the Layer 2 information from the transmitting device; this is illustrated in the image below:

MLS Packet Rewrite

This issue is resolved through the use of Layer 3 switched packet rewrite. When a packet is Layer 3 switched, certain fields in the IP packet header must be modified in order to make the packet look like it was routed by the device route processor; these included the following five fields:

  • Layer 2 (MAC) destination address
  • Layer 2 (MAC) source address
  • Layer 2 (MAC) checksum
  • Layer 3 IP Time to Live (TTL)
  • Layer 3 checksum

MLS Flows and the MLS Cache

Traffic routed through an MLS supporting device is monitored to determine traffic flows.  Once these flows are detected, the identifying information is entered into the MLS cache and traffic matching this flow criteria are then subsequently switched.

MLS supports the following unicast flows:

  • All traffic to a particular destination
  • All traffic from a particular source to a particular destination
  • All traffic from a particular source to a particular destination that shares the same protocols and transport-layer information

The format of the MLS cache is determined by a flow mask; the default flow mask depends on the specific equipment used. The main IP flows masks that are supported are (see a similarity?):

  • destination-ip – All flows to a specific Layer 3 destination address.
  • source-destination-ip – All flows between a specific source and destination address.
  • full-flow – All flows between a specific source and destination address, protocol and protocol port.

MLS Configuration

The most common implementation of MLS on modern networks is to use a switch which is essentially a router with switching hardware. In this case, the device is able to utilize the features of both a routing and switching platform. On most of these devices the use of unicast MLS is enabled by default.


While the use of MLS on many modern switches may be transparent, it is an important feature on a network that requires a high level of performance. For those engineers reading this looking for a good switching solution, ensure that the switches that are selected support MLS functionality as it will greatly increase the performance of the network.

 in Cisco