Switching mechanism

 Switching mechanism


Process switching is the older Cisco IOS mechanism where every packet needs to be inspected by the CPU.But that is a contrast with high-speed bandwidth nowadays


Cisco routers support the following three primary modes of packet switching:

  • 1. Process switching
  • 2. Fast switching
  • 3. Cisco Express Forwarding (CEF)
  • 1. PROCESS-SWITCHING – When the data packets enter an interface, the Route Processor (the CPU) must be involved in every packet forwarding decision.

  • It works with every packet for L2 address alternation and other error checking like CRC etc.Get the next hop L2 address via the ARP table. ,Route table lookup for every packet. ,lower speed and more CPU intensive 

  • 2.FAST-SWITCHING – When a data flow enters an interface, if the destination is not stored in the “Route Cache” for that interface, it is “Punted” to the “Route Processor” (CPU) to check the IP Route table for a destination.

  • It is similar to “process-switching” but maintains a route-cache,For Source and destination base traffic use route-cache ,Less CPU intensive, faster than previous technology ,Fast-switching is based on software hence it has a cache updating problem.
3.-Cisco Express Forwarding (CEF) is a packet-switching technique that is the default for most of Cisco routing platforms.   CEF is advanced Layer 3 IP switching technology used on cisco router and switch. It is a feature that allows a router to quickly and efficiently make a route lookup in new Cisco devices.CEF optimizes routing table lookup by creating a special, easily searched tree structure based on the IP routing table

Advantages:    CEF Cisco provides the ability to switch packets (through advanced, Layer 3 IP switching technology) via a device in a way that minimizes the load on router’s processor.

This way the routing process can be tasked with dealing with other responsibilities that require larger amounts of processor time  for example QOS, Encryption, etc..



CEF is a Cisco proprietary protocol and works by creating two types of tables in Data plane :


  1. Adjacency table

    This table is responsible for maintaining the layer 2 forwarding information for each FIB entry. Adjacency table takes its input from ARP Cache and hence populates itself with layer 2 information to be used for packet forwarding. This offloads the need for the router to send out ARP requests.

  2. The FIB (Forwarding Information Base) –

    FIB is known by the name of  CEF table. FIB table learns the routing information from the IP Routing Table and tracks the next-hop for all routes.it's essencially the routing table. 

  3. So while the Adjacency table manages layer 2 information, the next hop devices. The CEF table manages the layer 3 forwarding information. The adjacency table maintains Layer 2 information for the next hops listed in the FIB.


These network are not directly attached to us,( it would say attached in the right column) .and they are next hop to attach

We see "drop" ..Witch CEF we don't support multicast address : we drop 0's in the first octet and loopback address 127.0.0.0   , 224.0.0./24  and class E IP address:  240.0.0.0/4 , so we are dropping that traffic

Our switch don't have "show adjacency detail " command platform.It would be showing the adjacency table
to enable fast switching we need to go to#int gi 0/1
                                                                  #ip  route-cache


Cisco Express Forwarding (CEF) can be enabled in one of two modes described in the following sections:

  1. Central CEF Mode:   When cCEF mode is enabled, the CEF FIB and adjacency tables reside on the RP, and the RP performs the express forwarding.

  1. You can use CEF mode when line cards are not available for CEF switching or when you need to use features not compatible with dCEF switching.


  2. Distributed CEF Mode  When CEF is enabled, line cards, such as VIP line cards or GSR line cards, maintain an identical copy of the FIB and adjacency tables. The line cards perform the express forwarding between port adapters, relieving the RSP of involvement in the switching operation.

    dCEF uses an Inter-Process Communication (IPC) mechanism to ensure the synchronization of FIB tables and adjacency tables on the RP and line cards.

Routers make decisions about forwarding packets based on the source and the destination addresses. This decision-making process is called “switching.”The Switching referred above is what a router does when it makes the following decisions:
  • Whether or not to forward the packet after checking that the destination mentioned in the packet is reachable or not
  • If the destination is reachable, what is the next-hop?, and what interface the router will use to get to that destination?
ROUTER ARCHITECTURE divides router functions into three operational planes:  

1.-MANAGEMENT PLANE:

 This plane is used to manage a device through its connection to the network. Examples of protocols processed in the management plane include Simple Network Management Protocol (SNMP), Telnet, File Transfer Protocol (FTP), Secure FTP, and Secure Shell (SSH). These management protocols are used for monitoring and command-line interface (CLI) access.

2.-CONTROL PLANE: 

The control plane is the brain of the router. Its main function is to maintain sessions and exchange protocol information with other routers or network devices. 

Functions of the control planeDecides where traffic is going (i.e. routing protocols, etc.), System configuration, management information, Exchange topological information policing (Management Plane Protection)

3.-DATA PLANE:

 Its main function is to forward data through a router (ASIC). For example, end-user traffic traveling from a user’s PC to a web server on a different network would go across the data plane. (It means the data packets will be processed by the hardware itself for the routing decisions before they are forwarded towards their destination based on the routing decisions). 

Functions of the Data Plane: Forwarding data packets hence often called the Forwarding Plane,Utilize the control plane to forward onto the destination, Utilize the control plane to make packet drop decisions

Data plane and control plane together are responsible for the speed at which the packets can flow through a router. We will consider these two planes of operation and examine three different approaches that Cisco routers can take. This applies to all the packets arriving on an ingress interface and being sent out an appropriate egress interface.

The data plane is the workhorse of the switching elements in our networks. It has the responsibility of parsing packet headers in high speed.. It manages QOS, filtering, encapsulations, Queuing, Policing all of the reasons we had and still do in many cases purpose 


The Planes separated and typical packet logic into these information bases.




   RIB Vs FIB

RIB stand for Routing Information Base and it is a bit like a repository where all routing protocols store IP routing information. It includes dynamically and statically learned routes as well as directly connected routes information.

 

FIB stand for Forwarding Information Base and it contains information such as interface identifier and  information how to reach the next hop network prefix. basically, it is used to make IP destination prefix based switching decision. The FIB mirror much the RIB, however the concept enable to separate the forwarding plane function of the forwarding table from the control plane function of the routing table, therefore each function does not impact on the performance of the other.  




  • CEF uses the FIB to make IP destination prefix-based switching decisions.

Switching mechanism Switching mechanism Reviewed by ohhhvictor on July 29, 2022 Rating: 5

No comments:

 photo imagen120.jpg
Theme images by RBFried. Powered by Blogger.