MLS and Fast Switching

Unanswered Question
May 1st, 2009

Hey, folks:

What's the difference between mls and fast switching?

I always thought of mls as being a general reference to L3/L4 switching. I never actually configured "mls" on a Cisco device.

"Switch-A> (enable) set mls flow destination-source

Configured flow mask is set to destination"

From the way it works, it sounds exactly like fast switching: the first packet is process switched, the rest follow a flow that is written into a flow table on the L2 portion of the switch.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
lamav Fri, 05/01/2009 - 13:13


I didnt say it was for CEF.

It may be used for NetFlow, but it is also used for configuring MLS.

Anyway, back to the real question: What is the difference between fast switching and mls?


Jon Marshall Fri, 05/01/2009 - 14:32


"What is the difference between fast switching and mls?"

Nothing really. MLS on sup2 upwards uses CEF for L3 switching but on Sup1A it didn't have CEF so on a sup1A the first packet had to be sent to the MSFC for process switching and then the rest of the flow was hardware switched on the PFC.


lamav Fri, 05/01/2009 - 14:46

Jonny boy! What it is? :-)

I hear what you're saying, but MLS is a form of cache switching that you can implement on other platforms, besides 6500 series switches. So, I could configure MLS to operate in a router-on-a-stick configuration. The router - any model - will be referred to as the MLS-RP and the switch would be the MLS-SE.

The router will perform the first packet lookup for inter-vlan routing, and then the switch will build a flow and use it for subsequent packets that match the flow parameters.

Ok, now Im rambling, I know...

I guess what I find confusing is that MLS is a type of cahce/fast switching in and of itself. The router, for example, will be configured with commands like "mls rp ip" set globally and on each interface that faces an MLS-SE. A VTP domain will have to be configured. And the protocol to exchange flow information between SE and RP is called MLSP.

The way it all works sounds exactly like what we call today "fast switching."

Honestly, I never heard of MLS as a separate caching technology. I knew of process switching, fast switching and CEF switching. But this MLS bad boy is in the mix, too, and I am wondering if it has been deprecated (Or is that defecated? LOL) by fast switching.


Jon Marshall Fri, 05/01/2009 - 14:59


Agree it's slightly confusing but no need to ramble my friend :-)

Okay this is the way i see it.

Fast switching as you know = first packet processed switching then rest of packets fast switched using fast switching cache. But on a router this is still all done in software.

L3 switches came along and the first process switched packet was still done in software as such ie. MSFC or RP whatever you want to call it. The rest of the packets were fast switched using a cache but unlike a router these packets were fast switched in hardware.

MLS was the term used to refer to fast switching in hardware. As for whether it has been deprecated then yes i think it kind of has. Some of the earlier Cisco switching books refer to MLS but then the later ones refer primarily to CEF on L3 switches.

Basically i think MLS was the next big thing in it's own right until CEF came along and them MLS was modified to use CEF.


Joseph W. Doherty Fri, 05/01/2009 - 16:13

MLS is generally what we now call L3 switching. Fast switching was/is a caching method employed on routers.

Logically they work much alike except MLS was/is found on hardware switches while fast switching was/is found on routers.

The distinction often has more to do with software only, or software and hardware.


On routers, there are other "switching" methods.


"The switching algorithms available on Cisco routers are:

Forwarding Algorithm

Command (Issue From config-interface Mode)

Fast switching

ip route-cache

Same-interface switching

ip route-cache same-interface

Autonomous switching (7000 platforms only)

ip route-cache cbus

Silicon switching (7000 platforms with an SSP installed only)

ip route-cache sse

Distributed switching (VIP-capable platforms only)

ip route-cache distributed

Optimum switching (high-end routers only)

ip route-cache optimum

NetFlow switching

ip route-cache flow

Cisco Express Forwarding (CEF)

ip cef

Distributed CEF

ip cef distributed"

On switches, like the 5000 series:

"MLS provides high-performance Layer 3 switching for Cisco routers and switches. MLS switches IP data packets between subnets using advanced application-specific integrated circuit (ASIC) switching hardware. Standard routing protocols, such as Open Shortest Path First (OSPF), Enhanced Interior Gateway Routing Protocol (Enhanced IGRP), Routing Information Protocol (RIP), and Intermediate System-to-Intermediate System (IS-IS), are used for route determination.

MLS enables hardware-based Layer 3 switching to offload routers from forwarding unicast IP data packets over shared media networking technologies such as Ethernet. The packet forwarding function is moved onto Layer 3 Cisco series switches whenever a partial or complete switched path exists between two hosts. Packets that do not have a partial or complete switched path to reach their destinations still use routers for forwarding packets. "

lamav Fri, 05/01/2009 - 17:28

Guys, I think I got it!

MLS, it seems, was strictly a Cisco 5000 Series switch technology.

"Multilayer Switching-Provides an overview of Multilayer Switching (MLS). MLS provides high-performance Layer 3 switching for the Catalyst 5000 series LAN switches working in conjunction with Cisco routers. Guidelines are provided for configuring and managing IP MLS, IP Multicast MLS, and IPX MLS on Cisco routers."

This is why it has been effectively deprecated. With the 5000s out of play, so, too, is MLS - for the most part. Take note that I have a 3640 router in my new lab and Im running some pretty recent IOS software on it, "c3640-jk9s-mz.123-26.bin", yet I still have the option of configuring mls on it.

Whadda ya think?

Joseph W. Doherty Fri, 05/01/2009 - 18:06

I wouldn't go so far as to limit MLS just to 5000 series, believe it was also documented with the 6000/6500 series, although you don't need to manually activated it. (E.g. see

As to your 3640 supporting MLS commands, it might be part of the backward support of the 5000 series which supported an external router.

See "IOS release 12.0(2) or later on Cisco 3600 series routers " in

lamav Fri, 05/01/2009 - 18:20

"I wouldn't go so far as to limit MLS just to 5000 series, believe it was also documented with the 6000/6500 series, although you don't need to manually activated it."

Yup, I should have been more precise in my language. What I was referring to when I said that MLS was strictly for the 5000 series switches was MLS as a configurable technology. The 6500/6000 series switches perform an internal MLS that is neither visible nor configurable.

"The MSFC only works with Supervisor Engines that have the PFC. The MSFC performs an internal MLS with the PFC, which acts similar to the NetFlow Feature Card (NFFC) on the Catalyst 5000. This internal MLS is not visible and is purely limited to the switch: you have nothing to configure to make it work and it supports hardware shortcuts for IP, IPX, and IP multicast."

In the 6500/6000 series switches MLS is what we call L3 switching with a fast switching cache that resides on the PFC.

My focus was on the MLS for the 5000s, which had to be specifically configured - using commands I had never seen before, no less.

"As to your 3640 supporting MLS commands, it might be part of the backward support of the 5000 series which supported an external router."

Agree 100%.




This Discussion