Study guide

1.3 Hardware Switching Architecture & Packet Forwarding

CCNP Enterprise ENCOR 350-401

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Enterprise Architecture & Hierarchical Design

1.1 Enterprise Network Design Models & Hierarchical Campus Architecture 1.2 On-Premises, Cloud & Hybrid Infrastructure Deployment Models 1.3 Hardware Switching Architecture & Packet Forwarding

2 Chapter 2: Enterprise Quality of Service (QoS)

2.1 QoS Components: Classification, Marking & Trust Boundaries 2.2 QoS Policy: Queuing, Shaping, Policing & Interpreting MQC Output

3 Chapter 3: Software-Defined WAN (Catalyst SD-WAN)

3.1 Cisco Catalyst SD-WAN Architecture & Orchestration 3.2 SD-WAN Policies, Traffic Engineering & Application-Aware Routing

4 Chapter 4: Software-Defined Access (Catalyst SD-Access)

4.1 Catalyst SD-Access Fabric Architecture & Plane Separation 4.2 Cisco TrustSec, Security Group Tags (SGT), SXP & MACsec

5 Chapter 5: Device & Data Path Virtualization

5.1 Server & Network Device Virtualization 5.2 VRF-Lite & Virtual Routing Multi-Tenancy 5.3 GRE & IPsec Tunnel Virtualization Mechanics

6 Chapter 6: Network Virtualization & Overlay Technologies

6.1 LISP Architecture & EID-to-RLOC Mapping Mechanics 6.2 VXLAN & EVPN Overlay Architecture

7 Chapter 7: Layer 2 Infrastructure & Switching

7.1 VLANs, 802.1Q Trunking & VTPv3 7.2 Spanning Tree Protocol Mechanics 7.3 Advanced STP Protection Mechanisms 7.4 EtherChannel Link Aggregation

8 Chapter 8: Layer 3 Routing Foundations & EIGRP

8.1 IP Routing Foundations & Administrative Distance 8.2 Enhanced Interior Gateway Routing Protocol (EIGRP)

9 Chapter 9: OSPFv2 & OSPFv3 Operations

9.1 OSPFv2 Architecture & Neighbor State Machine 9.2 OSPF LSA Types & Multi-Area Design 9.3 OSPFv3 for IPv4 and IPv6 Address Families

10 Chapter 10: Border Gateway Protocol (BGP)

10.1 BGP Architecture, Neighbor States & Peering 10.2 BGP Path Attributes & Best Path Selection Algorithm

11 Chapter 11: Policy-Based Routing & Route Redistribution

11.1 Policy-Based Routing (PBR) & Route Maps 11.2 Route Redistribution & Loop Prevention

12 Chapter 12: IP Services & High Availability

12.1 First Hop Redundancy Protocols (HSRP, VRRP & GLBP) 12.2 Network Time Protocol (NTPv4) & Precision Time Protocol (PTP) 12.3 Network Address Translation (NAT/PAT) & VRF-Aware NAT

13 Chapter 13: IP Multicast Operations

13.1 IP Multicast Addressing, Group Management (IGMPv1/v2/v3) & IGMP Snooping 13.2 Protocol Independent Multicast (PIM-SM, PIM-SSM & Bidir-PIM) 13.3 Rendezvous Point (RP) Distribution Mechanisms

14 Chapter 14: Network Assurance & Monitoring

14.1 Diagnostic Utilities, Conditional Debugging & Path MTU Discovery 14.2 Syslog Architecture, Logging Facilities & Severity Levels 14.3 SNMPv1/v2c/v3 Security & Flexible NetFlow (FNF) Architecture 14.4 Switched Port Analyzer (SPAN, RSPAN, ERSPAN) & IP SLA Object Tracking

15 Chapter 15: Catalyst Center Assurance & Controller Operations

15.1 Cisco Catalyst Center (DNA Center) Assurance & AI Network Analytics 15.2 Cisco Catalyst Center Device Onboarding & Software Image Management (SWIM)

16 Chapter 16: Enterprise Security & Access Control

16.1 Device Hardening, AAA Architecture & RADIUS/TACACS+ 16.2 Access Control Lists (ACLs) for Infrastructure Security 16.3 Control Plane Policing (CoPP) & Control Plane Protection (CPPr) 16.4 Layer 2 Infrastructure Security Features 16.5 IEEE 802.1X Port-Based Authentication & MAB

17 Chapter 17: Threat Defense & API Security

17.1 Enterprise VPN Technologies (DMVPN Phase 1/2/3 & FlexVPN) 17.2 Next-Generation Threat Defense & Secure Access Service Edge (SASE)

18 Chapter 18: Network Automation, Programmability & Data Modeling

18.1 Python Fundamentals for Network Engineers & Cisco Libraries 18.2 YANG Data Modeling Language (RFC 6020/7950) & Model Types 18.3 REST API Architecture, HTTP Verbs, Security & Cisco Controller APIs 18.4 Model-Driven Telemetry (MDT) & NETCONF/RESTCONF Operations

19 Chapter 19: Orchestration, EEM & AI Operations

19.1 Configuration Management & Infrastructure as Code (Ansible & Terraform) 19.2 Cisco Embedded Event Manager (EEM) & Intent-Based Networking

1.3 Hardware Switching Architecture & Packet Forwarding

Key Takeaways Explain This Topic AI

Content Addressable Memory (CAM) performs exact-match binary lookups (0 and 1) in a single clock cycle for Layer 2 MAC address tables.

Ternary CAM (TCAM) evaluates three states (0, 1, and 'Don't Care' X) simultaneously, enabling single-cycle lookups for Layer 3 Longest Prefix Matches (LPM), Access Control Lists, and QoS policies.

Cisco Express Forwarding (CEF) optimizes Layer 3 packet switching by compiling the Routing Information Base (RIB) into the FIB and pre-building Layer 2 frame rewrite headers in the Adjacency Table.

Adjacency table entries are categorized into Resolved (valid Layer 2 rewrite), Glean (connected subnet awaiting ARP resolution), Punt (redirected to CPU for control plane processing), Drop, and Discard/Null0.

Switch Database Management (SDM) templates reallocate fixed hardware TCAM space among routing, switching, and security features, preventing TCAM exhaustion that forces fallback to high-latency CPU process switching.

Last updated: August 2026

1.3 Hardware Switching Architecture & Packet Forwarding

High-performance enterprise switches forward tens of millions of packets per second at wire speed. To achieve line-rate performance without introducing latency or packet jitter, modern switching platforms decouple the control plane from the data plane and utilize specialized Application-Specific Integrated Circuits (ASICs) and memory architectures.

1. Switching Evolution: Process Switching vs. Fast Switching vs. CEF

Understanding how packet switching mechanisms have evolved is fundamental to mastering Cisco multilayer switching platforms. +-----------------------------------------------------------------------+

  • | EVOLUTION OF PACKET FORWARDING |
  • +-----------------------------------------------------------------------+
  • | |
  • | [1. PROCESS SWITCHING] [2. FAST SWITCHING] [3. CEF] |
  • | - Every packet to CPU - Route-Once, - Topology- |
  • | - Slowest (~Kpps) Switch-Many driven |
  • | - Full RIB/ARP lookup - First packet to CPU - Pre-computed |
  • | - Cache programmed FIB & Adj |
  • | - Cache invalidation - 100% ASIC |
  • | issues Wire Speed |
  • +-----------------------------------------------------------------------+
  • 1. Process Switching (Software Forwarding)

Mechanics: Every inbound packet triggers an interrupt that diverts the packet to the main Route Processor (CPU).

Operation: For each packet, the CPU performs an unoptimized lookup in the Routing Information Base (RIB), performs an ARP lookup, recalculates the IP header checksum, rewrites the Layer 2 frame header, and computes a new Cyclic Redundancy Check (CRC).

Performance: Extremely slow (thousands of packets per second); causes high CPU utilization under moderate traffic loads.

2. Fast Switching (Route-Once, Switch-Many)

Mechanics: The first packet of a new flow is punted to the CPU, which performs a route and ARP lookup.

Operation: The CPU creates an entry in a fast-switching route cache (Layer 3 prefix and Layer 2 rewrite information). All subsequent packets belonging to that identical destination flow are switched via interrupt using the fast cache without consulting the RIB.

Limitations: Prone to cache thrashing in dynamic networks; if routes flap or ARP entries expire, the cache must be flushed, causing periodic CPU spikes.

3. Cisco Express Forwarding (CEF - Topology-Driven Forwarding)

Mechanics: Rather than waiting for packets to arrive to populate a cache, CEF pre-computes and compiles forwarding tables proactively directly from the routing table (RIB) and ARP table.

Operation: The data plane hardware is pre-programmed with every known route and its corresponding Layer 2 rewrite string before the first packet ever arrives.

Performance: True line-rate switching with zero per-flow CPU intervention.

2. Memory Architectures: CAM vs. TCAM

Silicon memory in enterprise switches is optimized for instantaneous parallel search operations. +-----------------------------------------------------------------------+

  • | CAM vs. TCAM ARCHITECTURE |
  • +-----------------------------------------------------------------------+
  • | |
  • | CAM (Content Addressable Memory) TCAM (Ternary CAM) |
  • | - Binary Logic: 0, 1 - Ternary Logic: 0, 1, X (Mask)|
  • | - Exact Match Search - Longest Prefix Match (LPM) |
  • | - Used for L2 MAC Address Table - Used for FIB, ACLs, and QoS |
  • | - Output: Port Number - Output: VMR (Value/Mask/Res) |
  • +-----------------------------------------------------------------------+
  • Content Addressable Memory (CAM)

Binary Matching: Evaluates exact binary states: 0 or 1 .

Lookup Type: Exact-match lookups executed across all entries in a single clock cycle.

Primary Application: Layer 2 MAC Address Table (Forwarding Information Base - FDB). When an incoming frame arrives with destination MAC 00a1.2b3c.4d5e , CAM checks all entries in parallel and returns the corresponding egress switch port in one clock cycle.

Ternary Content Addressable Memory (TCAM)

Ternary Matching: Evaluates three states: 0 , 1 , and X ("Don't Care" / Wildcard / Mask) .

Structure: Operates using a VMR (Value, Mask, Result) architecture:

Value: The patterns to match (e.g., IP address 10.1.0.0 , TCP port 443).

Mask: The bitmask indicating which bits must match exactly versus wildcard bits ( 255.255.0.0 ).

Result: The action executed upon matching (e.g., forward via Next-Hop pointer, permit, deny, apply QoS DSCP marking).

Primary Applications:

Layer 3 Longest Prefix Match (LPM): Matches IP routes against variable-length subnet masks simultaneously in a single clock cycle.

Security ACLs: Evaluates complex multi-field rules (Source IP, Destination IP, Protocol, Layer 4 Port range) at wire speed.

Quality of Service (QoS): Traffic classification and policing.

Policy-Based Routing (PBR): Routing packets based on source criteria rather than destination IP alone.

Comparison: CAM vs. TCAM

  • Feature Binary CAM Ternary CAM (TCAM)
  • Logic States 2 States: 0 , 1 3 States: 0 , 1 , X (Don't Care / Mask)
  • Search Paradigm Exact match only Longest Prefix Match & Pattern Masking
  • Primary Use Cases Layer 2 MAC address forwarding table Routing FIB (LPM), Security ACLs, QoS, PBR
  • Hardware Cost / Power Moderate cost and power consumption High cost, silicon area, and heat generation
  • Lookup Speed 1 Clock Cycle 1 Clock Cycle across all entries

Loading diagram... Cisco Express Forwarding (CEF) Internal Table Compilation

3. Cisco Express Forwarding (CEF) Internal Tables & Adjacency Types

CEF structures forwarding data into two distinct, optimized internal tables:

1. Forwarding Information Base (FIB)

Derived directly from the Layer 3 Routing Information Base (RIB).

Organizes IP prefix entries in an inverted 256-way mtrie (multi-branch tree) structure optimized for rapid hardware TCAM searches.

Contains every routable destination prefix, the corresponding next-hop IP address, and an index pointer referencing the appropriate entry in the Adjacency Table.

Whenever the routing table changes (e.g., OSPF recalculates a shortest path), the control plane immediately updates the FIB.

2. Adjacency Table

Derived directly from the ARP table and neighbor discovery databases.

Maintains pre-formatted Layer 2 frame rewrite strings (Destination MAC, Source MAC, EtherType, 802.1Q tag) for every directly connected next-hop.

When a packet matches a prefix in the FIB, the switch uses the pointer to grab the pre-built Layer 2 header from the Adjacency table, replaces the incoming frame header, decrements the IP TTL, updates the checksum, and transmits the frame out the physical port. +-----------------------------------------------------------------------+

  • | CEF ADJACENCY TYPES & BEHAVIORS |
  • +-----------------------------------------------------------------------+
  • | |
  • | [RESOLVED] -> Valid L2 MAC header present; wire-speed forward. |
  • | [GLEAN] -> Directly connected subnet; MAC missing in ARP; |
  • | punts initial packet to CPU to trigger ARP Request.|
  • | [PUNT] -> Unsupported feature/TTL=1/IP options/fragments; |
  • | diverted to CPU Route Processor for handling. |
  • | [DROP] -> Unroutable/unsupported; dropped in hardware. |
  • | [DISCARD/NULL0]-> Route points to Null0; discarded in hardware. |
  • +-----------------------------------------------------------------------+
  • Specialized CEF Adjacency Types

Adjacency Type Triggering Condition Data Plane Hardware Action CPU Impact

Resolved (Connected / Host) Next-hop IP is resolved with valid MAC in ARP Replaces Layer 2 header and forwards at wire speed Zero CPU involvement

Glean Subnet is directly connected, but specific host MAC is not in ARP Punts the triggering packet to CPU to send ARP Request Brief CPU pulse during ARP resolution

Punt Packet requires control plane processing (TTL=1, IP options, MTU fragmentation, routing hellos) Forwards packet to Route Processor CPU queue High CPU if punt rate is sustained

Drop Encapsulation failure or unroutable packet Packet dropped directly by hardware ASIC Zero CPU involvement

Discard (Null0) Packet destination route points to Null0 interface Packet silently dropped in hardware Zero CPU involvement

Centralized CEF vs. Distributed CEF (dCEF)

Centralized CEF:

Deployed on fixed-configuration switches (e.g., Catalyst 9200/9300).

The central Route Processor / Supervisor maintains the FIB and Adjacency tables and programs the local switching ASICs.

Distributed CEF (dCEF):

Deployed on high-density modular chassis systems (e.g., Catalyst 9400/9600, Nexus 7000/9500).

The main supervisor engine compiles the master FIB and Adjacency tables and downloads identical copies to Distributed Forwarding Cards (DFCs) located on each individual line card.

Line cards perform complete Layer 3 forwarding and rewriting locally across the switch fabric without burdening the central supervisor engine.

4. TCAM Exhaustion & Switch Database Management (SDM) Templates

Physical TCAM capacity on switching ASICs is fixed and finite. If an enterprise network outgrows its allocated TCAM space (due to massive routing tables, dense ACLs, or extensive QoS policies), the switch experiences TCAM Exhaustion . +-----------------------------------------------------------------------+

  • | TCAM EXHAUSTION FAILURE CASCADE |
  • +-----------------------------------------------------------------------+
  • | |
  • | 1. TCAM Capacity Reaches 100% (e.g., Route Table overflow) |
  • | 2. New prefixes cannot be programmed into hardware FIB |
  • | 3. Switch falls back to SOFTWARE PROCESS SWITCHING (CPU) |
  • | 4. Switch CPU utilization spikes to 99%-100% |
  • | 5. Massive latency spikes, buffer overruns, and packet drops occur |
  • | 6. Control plane keepalives (OSPF/BGP hellos) drop -> Route Flapping |
  • +-----------------------------------------------------------------------+
  • Switch Database Management (SDM) Templates

To prevent TCAM exhaustion and tailor switch resource allocation to specific network roles, Cisco IOS / IOS-XE provides SDM Templates . SDM reallocates fixed TCAM memory blocks between Layer 2 switching, Layer 3 routing, and security/QoS tables. ! Verify current SDM template allocation

Switch# show sdm prefer

The current template is "default" template.

The selected template optimizes the resources in

the switch to support balanced Layer 2 and Layer 3 functions.

  • Number of unicast mac addresses: 16K
  • Number of IPv4 IGMP groups + multicast routes: 1K
  • Number of IPv4 unicast routes: 16K
  • number of directly-connected IPv4 hosts: 8K
  • number of indirect IPv4 prefixes: 8K
  • Number of IPv4 policy based routing aces: 0.5K
  • Number of IPv4 access control list aces: 1K
  • Common SDM Templates and Target Roles
  • SDM Template Name Resource Allocation Priority Recommended Network Tier
  • Default Balanced distribution between L2 MAC, L3 routing, and ACLs General-purpose collapsed core / access

Routing / Extended Match Maximizes IPv4/IPv6 unicast routing prefixes; reduces MAC tables Distribution and Core Layer routers

VLAN / Layer 2 Maximizes Layer 2 MAC address entries; disables hardware routing Pure Layer 2 Access switches

Access / Security Maximizes Security ACL and QoS classification ACEs Edge Access switches with dense 802.1X/ACLs

Dual IPv4 and IPv6 Partitions TCAM equally between IPv4 and IPv6 routing and security Dual-stack transition networks

Configuration Note: Changing an SDM template requires entering global configuration mode ( sdm prefer <template-name> ) followed by a manual switch reload ( reload ) for the ASIC memory partition to be reallocated.