Layer 3 Switch – CPU’s Role in Forwarding Packets

cpulatencylayer3switchvlan

I am a Systems Administrator at a small firm. We are latency sensitive. When forwarding packets, what protocols use the CPU and which use the ASICs?

We have mostly Arista 7124's (for the most latency sensitive bits) and Cisco 4948's. I imagine that the architecture for an Arista and a Cisco Nexus switch would be similar, so if you are a Cisco guy I'd be happy to hear from you.

I have installed Rancid (http://www.shrubbery.net/rancid/) on a machine here and I am grabbing switch configs every hour. This means that:

  1. There is an ssh login.
  2. Then the switch goes to enable mode.
  3. Then a show run is performed.

All of that uses CPU. My boss has asked me: Am I impacting latency? How do I know?

I don't think I am impacting latency, but I don't know that for sure. I have taken it on faith that I am not; that's why the ASICs are there, to do the heavy lifting and bring some determinism to switching speeds. Of course, some technologies could not be ASIC'ed like NAT but let's assume we are not doing that.

Our machines connected to the switches use a few different VLANs, and they need rather straightforward IP services I'd say: exchanging TCP and multicast UDP data- that's all. (Besides the usual supporting cast such as ARP that are necessary for TCP and UDP to work).

Edit: that I mention the Arista and the Cisco Nexus because they are called "Layer 3 switches", as described here for the Cisco 3548 or here for the Arista 7124SX.

Thanks.

Best Answer

This article has a decent breakdown of what a Catalyst 3750 will use its CPU for. Notice the CPU doesn't normally process any "user" frames, it mainly deals with management tasks, like STP and routing tables.

At least one exception is mentioned (emphasis mine):

As part of normal Layer 3 switch operation, when the IP route is not programmed into the switch hardware, the hardware punts IP packets to the CPU for IP routing. Punting occasional IP packets to the CPU is normal and expected, but if too many IP packets are punted, the CPU becomes too busy.

Later on:

If the switch TCAM is full, the hardware routes packets only for destination IP addresses that are in the TCAM. All other IP packets that had a TCAM miss are punted to the CPU.

Note that during normal operation, few or no frames or packets are sent to a 3750 CPU.