1.6 Describe hardware and software switching mechanisms
📘CCNP Encore (350-401-ENCORE-v1.1)
1. Introduction to Switching Mechanisms (Exam View)
In Cisco networks, switching mechanisms decide how packets are forwarded from a source to a destination.
Cisco devices can forward packets using:
- Software-based switching (CPU-based)
- Hardware-based switching (ASIC-based)
For the CCNP ENCOR exam, you must understand:
- What each table or mechanism does
- Where it is used (router or switch)
- Whether it works in software or hardware
- How these components work together
2. Software Switching vs Hardware Switching
Software Switching
- Packet processing is done by the CPU
- Slower performance
- Used mainly for:
- Learning routes
- Control plane decisions
- Troubleshooting or exceptions
Hardware Switching
- Packet processing is done by ASICs (special hardware chips)
- Very fast
- Used for:
- Normal data forwarding
- High-speed routing and switching
📌 Exam Key Point:
Modern Cisco devices always forward packets in hardware, but routing decisions are learned in software first.
3. RIB (Routing Information Base)
What is RIB?
The RIB is the main routing table stored in CPU memory (software).
Purpose of RIB
- Stores all routes learned from:
- Connected interfaces
- Static routes
- Routing protocols (OSPF, EIGRP, BGP, etc.)
- Decides the best route using:
- Administrative Distance
- Routing metrics
Key Characteristics
| Feature | Description |
|---|---|
| Location | Software (RAM) |
| Used by | CPU |
| Contains | All known routes |
| Function | Route selection |
📌 Important:
The RIB does NOT forward packets directly.
4. FIB (Forwarding Information Base)
What is FIB?
The FIB is a simplified and optimized copy of the RIB, created for fast packet forwarding.
Purpose of FIB
- Used by the data plane
- Contains only:
- Best routes
- Next-hop information
- Optimized for quick lookups
Key Characteristics
| Feature | Description |
|---|---|
| Location | Hardware (ASIC) |
| Built from | RIB |
| Used by | CEF |
| Function | Packet forwarding |
📌 Exam Rule:
RIB = decision making
FIB = packet forwarding
5. CEF (Cisco Express Forwarding)
What is CEF?
Cisco Express Forwarding (CEF) is Cisco’s primary packet forwarding mechanism.
What CEF Does
- Uses:
- FIB
- Adjacency Table
- Forwards packets without using the CPU for each packet
Why CEF is Important
- High performance
- Predictable forwarding
- Low CPU usage
- Default on all modern Cisco devices
Key Characteristics
| Feature | Description |
|---|---|
| Type | Hardware-based forwarding |
| Uses | FIB + Adjacency Table |
| Speed | Very fast |
| Status | Enabled by default |
📌 Exam Tip:
CEF is not a routing protocol.
CEF is a forwarding mechanism.
6. Adjacency Table
What is an Adjacency Table?
The Adjacency Table stores Layer 2 rewrite information needed to forward packets.
What Information It Contains
- Next-hop MAC address
- Outgoing interface
- Encapsulation type (Ethernet, etc.)
Purpose
- Converts Layer 3 routing decisions into Layer 2 forwarding actions
Key Characteristics
| Feature | Description |
|---|---|
| Used by | CEF |
| Stores | MAC & interface info |
| Built using | ARP (IPv4) / ND (IPv6) |
| Location | Hardware |
📌 Exam Key Concept:
FIB tells where to send the packet
Adjacency table tells how to send it
7. CAM Table (Content Addressable Memory)
What is CAM?
The CAM table is used by Layer 2 switches.
Purpose of CAM Table
- Maps:
- MAC address → Switch port
- Used to make switching decisions
Key Characteristics
| Feature | Description |
|---|---|
| Used on | Switches |
| Layer | Layer 2 |
| Stores | MAC addresses |
| Memory type | Hardware |
📌 Exam Rule:
CAM is for switching, not routing.
8. TCAM (Ternary Content Addressable Memory)
What is TCAM?
TCAM is a special type of memory that supports:
- 0
- 1
- “Don’t care” (X)
Purpose of TCAM
Used for complex and fast lookups, such as:
- Access Control Lists (ACLs)
- Quality of Service (QoS)
- Policy-Based Routing (PBR)
- Route lookups with masks
Key Characteristics
| Feature | Description |
|---|---|
| Used by | Switches and routers |
| Layer | Layer 3 & 4 |
| Supports | Wildcards |
| Speed | Extremely fast |
📌 Exam Tip:
TCAM is used when multiple conditions must be checked at once.
9. Relationship Between All Components (Very Important)
Step-by-Step Packet Flow (Simplified)
- Routing Protocols populate the RIB
- Best routes from RIB are copied to the FIB
- CEF uses:
- FIB for next-hop decision
- Adjacency table for Layer 2 rewrite
- Packet is forwarded in hardware
- Switches use:
- CAM for MAC lookup
- TCAM for ACLs and policies
10. Summary Table (High-Value Exam Content)
| Component | Used On | Layer | Purpose | Software / Hardware |
|---|---|---|---|---|
| RIB | Router | L3 | Stores all routes | Software |
| FIB | Router | L3 | Fast forwarding table | Hardware |
| CEF | Router | L3 | Packet forwarding engine | Hardware |
| Adjacency Table | Router | L2 | MAC rewrite info | Hardware |
| CAM | Switch | L2 | MAC-to-port mapping | Hardware |
| TCAM | Switch/Router | L3/L4 | ACLs, QoS, policies | Hardware |
11. Exam-Focused Key Takeaways
- RIB selects routes, FIB forwards packets
- CEF is the default forwarding method
- Adjacency table handles Layer 2 details
- CAM = Layer 2 switching
- TCAM = complex matching (ACLs, QoS)
- Packet forwarding is hardware-based
- Control plane decisions are software-based
12. Final Exam Tip
If the question asks:
- “Where are routes learned?” → RIB
- “Where are packets forwarded?” → FIB + CEF
- “Which table stores MAC addresses?” → CAM
- “Which memory supports wildcard matching?” → TCAM
