Chapter 1 - Packet Forwarding - Day 4

 Software switching is significantly slower than switching done in hardware. Packets are hardware switched whenever possible.

ip_input process consults the routing table and ARP table to obtain next-hop's routers IP address, outgoing interface and MAC address. Then it overwrites the destination MAC address with the next-hop router's and the the source with MAC address with the outgoing L3 interface, decrements the IP TTL, recomputes the IP header checksum and delivers the packet to the next-hop router.

RIB - Routing information Base - This is built from the info obtained from dynamic routing protocols, directly connected and static routes.

CEF is Cisco proprietary and was developed to keep up with evolving networks. It has been the default on most Cisco platforms that doing switching using general CPU since 1990's/

CEF is the default switching used by all Cisco platforms that use ACIS and NPU;s for high packet throughput. 

General purpose CPU's on software and hardware based routers are similar and perform all the same functions. The difference is that on software based routers is in charge of all operations including CEF switching, where as on hardware based routers do CEF switching in specialized ASICS, TCAMs and NPUs.

Forwarding engines provide the packet switching, forwarding and route lookup capability to routers.

TCAM - Ternary content addressable memory allows for matching and eval of a packet on more that one field.

TCAM is an extension of the CAM architecture and is enhanced for upper-layer processing. 

TCAM has more flexibility in searching that CAM does which is binary.

TCAM search provides the results 0-False, 1-true and X for do not care

Entries in TCAM are stored in the VMR format(Value, Mask and Result)

Value field - are fields that should be searched ie IP address and Protocol fields.

Mask field - fields of interest that should be searched

Result field - is the action that should be taken on the value and mask fields.

Multiple actions can be taken besides allow or drop. Tasks like redirecting to QOS policer or pointing to a different entry in the routing table.

TCAM operates in hardware providing faster processing and scalability. 

Route processor (RP) engine with a forwarding engine is known as  centralized forwarding architecture. 

Linecards equipped with forwarding engines  without the the intervention of RP is known as distributed forwarding architecture.

Centralized forwarding Arch - packet is received on ingress LC and then transmitted to the forwarding engine on the RP.

Distributed forwarding Arch - packet is received on ingress LC and then transmitted to local forwarding engine.

on the Distributed arch the forwarding engine performs lookup to determine if outbound interface is local, if it is then it forwards it out that interface. If its located on a different LC, then is sent across the switch fabric (backplane) direct to the egress line card bypassing the RP.

Software CEF - Software FIB

This consists of FIB and Adjacency table

FIB- is built from the routing table and contains the next-hop IP address for each destination network. It also keeps a mirror of the forwarding info in the IP routing table. CEF uses the FIB to make ip destination prefix-based switching decisions.

Adjacency Table or AIB contains directly connected next-hop IP addresses and their MAC addresses as well as the egress interface MAC address. This is populated with data from ARP table and other L2 tables

*Packets processed by the CPU are typically subject to a rate limiter when invalid or incomplete adjacency exists to prevent the starving of CPU cycles from other essential processes.

*TTL is L3 loop prevention mechanism that reduces a packet's TTL field by 1 for every L3 hop. If a router receives a packet with a TTL of 0, this packet is dropped.








Comments

Popular posts from this blog

Building a Wifi mesh with Eeros

Google CyberSecurity Course so far

Study Aids - Updated Nov. 2021