Thursday 11 May 2023

Fast switching vs Process switching

  1. Process Switching:

Process switching is the traditional method of packet forwarding used in early routers. When a packet arrives at a router, the router's CPU interrupts the normal processing to examine the packet and determine its destination. This involves a series of steps, including a route lookup in the routing table and ARP resolution to obtain the MAC address of the next-hop device. Once these steps are completed, the router forwards the packet to the appropriate interface.

Process switching involves significant CPU involvement for each packet, making it slow and resource-intensive. It can cause performance bottlenecks, especially during high network traffic, and limits the overall capacity of the router.

  1. Fast Switching:

Fast switching was introduced as an improvement over process switching to address its limitations. Fast switching involves the creation of a cache, known as the fast switching cache or fast cache, which stores the results of previous route lookups. When a packet arrives, the router checks the fast cache to see if it has a precomputed entry for the destination IP address. If a match is found, the router uses the cached information to forward the packet quickly, without involving the CPU in time-consuming route lookups.

Fast switching significantly reduces the CPU overhead associated with packet forwarding. Once the cache is populated, subsequent packets with the same destination address can be forwarded at wire speed, resulting in improved forwarding performance and reduced latency. However, it's important to note that the first packet for a particular destination still undergoes the slower process switching to populate the cache.

Differences and Trade-offs:

  1. Performance: Fast switching offers superior performance compared to process switching. By minimizing CPU involvement, fast switching enables routers to handle higher packet forwarding rates, resulting in improved overall network performance.

  2. Resource Utilization: Process switching consumes more CPU resources because it requires the router's processor to perform complex tasks for every packet. Fast switching, on the other hand, offloads these tasks to the fast cache, reducing CPU utilization and freeing up resources for other critical functions.

  3. Flexibility: Process switching allows for greater flexibility in terms of protocol support and packet handling. It can handle complex scenarios that may require special treatment or customization. Fast switching, although more efficient, is relatively limited in terms of customization options.

  4. Time to Convergence: In the event of network changes or link failures, process switching can adapt more quickly because it performs a route lookup for every packet. Fast switching, with its reliance on the fast cache, may experience a slight delay before adapting to new routing information.

Cisco Express Forwarding (CEF)

Cisco express forwarding (CEF) -  contributes to the vital performance of modern networks.

CEF switching is a high-performance, Layer 3 IP switching technology developed by Cisco Systems. It serves as a forwarding mechanism for routing packets through network devices, such as routers and multilayer switches. CEF enables efficient packet forwarding by employing advanced data structures and algorithms to build and maintain a Forwarding Information Base (FIB) and an Adjacency table.

How CEF Switching Works

Unlike traditional routing methods that rely on route lookup for each packet, CEF creates a precomputed Forwarding Information Base (FIB) table during initialization. The FIB contains the necessary information to forward packets based on their destination IP addresses. This precomputation eliminates the need for per-packet route lookups, resulting in significantly improved forwarding performance.

The FIB contains next-hop information, including Layer 2 (MAC) addresses, obtained through the Adjacency table. The Adjacency table stores Layer 2 information about directly connected neighbours, such as MAC addresses or ATM addresses. CEF populates the Adjacency table dynamically, reducing the need for Address Resolution Protocol (ARP) requests for each packet.

Benefits of CEF Switching

  1. Enhanced Performance: By building and maintaining a precomputed FIB table, CEF eliminates per-packet route lookups, leading to faster packet forwarding. This acceleration improves overall network performance, reduces latency, and enhances the user experience.

  2. Load Balancing: CEF supports multiple load-balancing algorithms, such as per-destination or per-packet load balancing. These mechanisms distribute traffic across available paths, maximizing network utilization and preventing congestion on specific links.

  3. Scalability: CEF's efficient data structures and algorithms allow networks to handle high traffic volumes and scale seamlessly. Its ability to handle millions of routes with minimal impact on performance makes it suitable for large enterprise networks and service provider environments.

  4. Traffic Engineering: CEF provides granular control over traffic flow by allowing administrators to manipulate the forwarding decisions. Policy-based routing, route maps, and access control lists (ACLs) can be used to direct traffic based on specific criteria, optimizing network resources and enabling traffic engineering.

  5. Fault Tolerance: CEF enables fast convergence and minimizes network downtime in the event of link failures or network topology changes. It achieves this by maintaining accurate routing information in the FIB and using mechanisms like Cisco Express Forwarding-Independent Fast Convergence (CEF-IFC) to rapidly update forwarding tables

IPv6 Basic routing

By default ipv6 is not enabled on cisco routing. To enable ipv6 routing we use the simple command ipv6 unicast-routing. To allow Ipv6 and Ipv4 to work on the same interface we enter commands in the below format. This process is called dual stacking




Static routes 

As with IPv4 we can use the next hop principal for IPv6 but we do not need a subnet mask with IPv6. This looks like the below. 



Default routes 

Default routes as with Ipv4 have a set route in IPv6 this can be shortened to ::/0 and then the exit interface





Fast switching vs Process switching

Process Switching: Process switching is the traditional method of packet forwarding used in early routers. When a packet arrives at a router...