Home > Switching Mechanism Questions

Switching Mechanism Questions

February 4th, 2021 Go to comments

Packet Switching

Packet Switching is the method of moving a packet from a router’s input interface to an output interface. There are three main packet switching methods: Process Switching, Fast Switching and Cisco Express Forwarding (CEF).

Process switching is the oldest and slowest switching methods because it must examines the routing table, determines which interface the packet should be switched to and then switches the packet for every coming packet. The router CPU is responsible of choosing the appropriate process to handle the packet and scheduling the running of the process. With this kind of switching, it was clear that the router could not handle packets fast enough to attain the speeds needed as the traffic flows were increasing at a rapid pace across the networks. So an idea was born to solve this problem: Why not cache the results of the IP next-hop and layer 2 look-ups and use them to switch the next packet towards a given destination? This concept gave birth to fast switching.

Fast Switching relies on the idea of caching the routing decision of first packet (via process switching) then applying to the next ones without calculating. The first packet is copied to packet memory, and if the destination network is found in fast switching cache, the frame is rewritten and sent to outgoing interface. If the destination address is not present in the fast-switching cache, the packet is returned to process switching path, where the processor attempts to build a cache entry which can be used to forward packets to the destination.

CEF switching is a Cisco proprietary and advanced Layer3 IP switching mechanism that was designed to tackle the deficiencies associated with fast-switching. CEF optimizes performance, scalability, and resiliency for large and complex networks with dynamic traffic patterns. CEF’s retrieval and packet forwarding technique is less CPU intensive than process or fast switching. This results in higher throughput when CEF is enabled.

CEF Quick summary

Cisco Express Forwarding (CEF) provides the ability to switch packets through a device in a very quick and efficient way while also keeping the load on the router’s processor low. CEF is made up of two different main components: the Forwarding Information Base (FIB) and the Adjacency Table. These are automatically updated at the same time as the routing table.

The adjacency table is tasked with maintaining the layer 2 next-hop information for the FIB.

RIB vs FIB

Each routing protocol like OSPF, EIGRP has its own Routing information base (RIB) and they select their best candidates to try to install to global RIB so that it can then be selected for forwarding. In order to view the RIB table, use the command “show ip ospf databse” for OSPF, “show ip eigrp topology” for EIGRP or “show ip bgp” for BGP. To view the Forwarding Information Base (FIB), use the “show ip cef” command. RIB is in Control plane while FIB is in Data plane.

The Forwarding Information Base (FIB) contains destination reachability information as well as next hop information. This information is then used by the router to make forwarding decisions. The FIB allows for very efficient and easy lookups. Below is an example of the FIB table:

show_ip_cef.jpg

The FIB maintains next-hop address information based on the information in the IP routing table (RIB). In other words, FIB is a mirror copy of RIB.

RIB is in Control plane (and it is not used for forwarding) while FIB is in Data plane (and it is used for forwarding).

Question 1

Explanation

Cisco Express Forwarding (CEF) provides the ability to switch packets through a device in a very quick and efficient way while also keeping the load on the router’s processor low. CEF is made up of two different main components: the Forwarding Information Base (FIB) and the Adjacency Table. These are automatically updated at the same time as the routing table.

The Forwarding Information Base (FIB) contains destination reachability information as well as next hop information. This information is then used by the router to make forwarding decisions. The FIB allows for very efficient and easy lookups. Below is an example of the FIB table:

show_ip_cef.jpg

The adjacency table is tasked with maintaining the layer 2 next-hop information for the FIB. An example of the adjacency table is shown below:

show_adjacency.jpg

Note: A fast cache is only used when fast switching is enabled while CEF is disabled.

Question 2

Explanation

Cisco IOS software basically supports two modes of CEF load balancing: On per-destination or per-packet basis.

For per destination load balancing a hash is computed out of the source and destination IP address (-> Answer E is correct). This hash points to exactly one of the adjacency entries in the adjacency table (-> Answer D is correct), providing that the same path is used for all packets with this source/destination address pair. If per packet load balancing is used the packets are distributed round robin over the available paths. In either case the information in the FIB and adjacency tables provide all the necessary forwarding information, just like for non-load balancing operation.

The number of paths used is limited by the number of entries the routing protocol puts in the routing table, the default in IOS is 4 entries for most IP routing protocols with the exception of BGP, where it is one entry. The maximum number that can be configured is 6 different paths -> Answer A is not correct.

Reference: https://www.cisco.com/en/US/products/hw/modules/ps2033/prod_technical_reference09186a00800afeb7.html

Question 3

Explanation

The Forwarding Information Base (FIB) table – CEF uses a FIB to make IP destination prefix-based switching decisions. The FIB is conceptually similar to a routing table or information base. It maintains a mirror image of the forwarding information contained in the IP routing table. When routing or topology changes occur in the network, the IP routing table is updated, and these changes are reflected in the FIB. The FIB maintains next-hop address information based on the information in the IP routing table.

Reference: https://www.cisco.com/c/en/us/support/docs/routers/12000-series-routers/47321-ciscoef.html

Question 4

Explanation

CEF uses a Forwarding Information Base (FIB) to make IP destination prefix-based switching decisions. The FIB is conceptually similar to a routing table or information base. It maintains a mirror image of the forwarding information contained in the IP routing table. When routing or topology changes occur in the network, the IP routing table is updated, and those changes are reflected in the FIB. The FIB maintains next-hop address information based on the information in the IP routing table. Because there is a one-to-one correlation between FIB entries and routing table entries, the FIB contains all known routes and eliminates the need for route cache maintenance that is associated with earlier switching paths such as fast switching and optimum switching.

Note: In order to view the Routing information base (RIB) table, use the “show ip route” command. To view the Forwarding Information Base (FIB), use the “show ip cef” command. RIB is in Control plane while FIB is in Data plane.

Question 5

Explanation

Both answer A and answer C in this question are correct. It is hard to say which correct answer is better.

Question 6

Explanation

“Punt” is often used to describe the action of moving a packet from the fast path (CEF) to the route processor for handling.

Cisco Express Forwarding (CEF) provides the ability to switch packets through a device in a very quick and efficient way while also keeping the load on the router’s processor low. CEF is made up of two different main components: the Forwarding Information Base (FIB) and the Adjacency Table.

Process switching is the slowest switching methods (compared to fast switching and Cisco Express Forwarding) because it must find a destination in the routing table. Process switching must also construct a new Layer 2 frame header for every packet. With process switching, when a packet comes in, the scheduler calls a process that examines the routing table, determines which interface the packet should be switched to and then switches the packet. The problem is, this happens for the every packet.

Reference: http://www.cisco.com/web/about/security/intelligence/acl-logging.html

Question 7

Explanation

The Forwarding Information Base (FIB) contains destination reachability information as well as next hop information. This information is then used by the router to make forwarding decisions. The FIB allows for very efficient and easy lookups. Below is an example of the FIB table:

show_ip_cef.jpg

The FIB maintains next-hop address information based on the information in the IP routing table (RIB).

Note: In order to view the Routing information base (RIB) table, use the “show ip route” command. To view the Forwarding Information Base (FIB), use the “show ip cef” command. RIB is in Control plane while FIB is in Data plane.

Comments
  1. Anonymous
    April 30th, 2020

    Where are the questions??????????????

  2. Ysf313
    November 8th, 2020

    There are no questions?

  3. magh
    December 30th, 2020
  4. cert
    March 29th, 2021

    you need to purchase the membership to be able to see questions.. its 19 $ only per month ..

  5. Terran16
    April 13th, 2021

    The “You can test your knowledge with these questions first via this link” link is broken, please fix it.

  6. Fidonet
    April 26th, 2021
  7. Carloncho
    June 16th, 2021

    Regarding Q5 ,For correct answer is A, as fido says

    For creating networks you use routing protocols or static routes that then will be injected into the rib

  1. No trackbacks yet.