
Forwarding Architectures
the mechanisms used in routers and switches to forward network traffic.
- IP packet switching: a process for receiving an IP packet on an input interface and determining whether to forward the packet to an output interface or drop it.
- Cisco created fast switching and Cisco Express Forwarding (CEF) to optimize the switching process for routers to be able to handle larger packet volumes.
Process Switching
also referred to as software switching or slow path, A switching mechanism in which the general-purpose CPU on a router is in charge of packet switching. The types of packets that require software handling include:
- Packets sourced or destined to the router (using control traffic or routing protocols)
- Packets that are too complex for the hardware to handle (packets with IP options)
- Packets that require extra information that is not currently known (e.g., ARP)
Software switching is significantly slower than switching done in hardware. The NetIO process is designed to handle a very small percentage of traffic handled by the system. Packets are hardware switched whenever possible. The RIB, built from information from dynamic routing protocols and directly connected and static routes. The ARP table is built from information obtained from the ARP protocol.
CEF and TCAM
- CEF is a Cisco proprietary switching mechanism.
- It is the default switching mechanism used by all Cisco platforms that use specialized ASICs and network processing units (NPUs) for high packet throughput (hardware-based routers).
- A switch’s ternary TCAM allows for the matching and evaluation of a packet on more than one field.
- The TCAM entries are stored in Value, Mask, and Result (VMR) format. The value indicates the fields that should be searched, such as the IP address and protocol fields. The mask indicates the field that is of interest and that should be queried.
- The result indicates the action that should be taken with a match on the value and mask.
- TCAM operates in hardware, providing faster processing and scalability than process switching.
Centralized Forwarding and Distributed Forwarding
- When a route processor (RP) engine equipped with a forwarding engine so that it can make all the packet switching decisions, this is known as a centralized forwarding architecture.
- For a centralized forwarding architecture, when a packet received on the ingress line card, it is transmitted to the forwarding engine on the RP.
- The forwarding engine examines the packet’s headers and determines that the packet will be sent out a port on the egress line card and forwards the packet to the egress line card to be forwarded.
- If the line cards equipped with forwarding engines so that they can make packet switching decisions without intervention of the RP, this is known as a distributed forwarding architecture.
Centralized and Distributed Forwarding
For a distributed forwarding architecture, when a packet is received on the ingress line card, it is transmitted to the local forwarding engine. The forwarding engine performs a packet lookup, and if it determines that the outbound interface is local, it forwards the packet out a local interface. If the outbound interface is located on a different line card, the packet is sent across the switch fabric, directly to the egress line card, bypassing the RP.
Software CEF
Also known as the software FIB, consists of:
- Forwarding Information Base – The FIB is built directly from the routing table and contains the next-hop IP address for each destination. It keeps a mirror image of the forwarding information contained in the IP routing table. When a routing or topology change occurs in the network, the IP routing table is updated, and these changes are reflected in the FIB. CEF uses the FIB to make IP destination prefix-based switching decisions.
- Adjacency table – The adjacency table, contains the directly connected next-hop IP and their corresponding next-hop MAC, as well as the egress interface’s MAC address. The adjacency table is populated with data from the ARP table or other L2 protocol tables.
Upon receipt of an IP packet, the FIB is checked for a valid entry.
- If an entry is missing, it is a “glean” adjacency in CEF, which means the packet go to the CPU because CEF is unable to handle it.
- Valid FIB entries continue processing by checking the adjacency table for each packet’s destination IP address.
- Missing adjacency entries invoke the ARP process. When ARP is resolved, the complete CEF entry created.
Hardware CEF
- ASICs allow for very high packet rates, but they have limited functionality because they are hardwired to perform specific tasks.
- The routers have NPUs that are designed to overcome the inflexibility of ASICs.
- NPUs are programmable, and their firmware can be changed easily.
- Packet switching in distributed architecture platforms is done via distributed CEF (dCEF).
- dCEF is a mechanism in which the CEF data structures are downloaded to forwarding ASICs and the CPUs of all line cards so that they can participate in packet switching.
- This means that switching happens at the distributed level, which increases the packet throughput of the router.
Stateful Switchover
- A route processor (RP) is responsible for learning the network topology and building the route table (RIB).
- An RP failure can trigger routing protocol adjacencies to reset, resulting in packet loss and network instability.
- During an RP failure, it may be more desirable to hide the failure and allow the router to continue forwarding packets using the previously programmed CEF table entries rather than temporarily drop packets.
Stateful Switchover
- A redundancy feature that allows a Cisco router with two RPs to synchronize router configuration and control plane state information.
- The process of mirroring information between RPs is referred to as checkpointing. SSO-enabled routers always checkpoint line card operation and L2 protocol states.
- During a switchover, the standby RP immediately takes control.
Other useful information: