In terms of process and cache-driven switching, the routing process is relatively straightforward. Within the enterprise network, an Interior Gateway Protocol (IGP) will be used. To connect to an external autonomous system (AS), an Exterior Gateway Protocol (EGP) is used. In most cases, the selected EGP is the Border Gateway Protocol (BGP). To advertise reachability to enterprise prefixes, routes are redistributed between the two entities, so long as the routes in question are outside the scopes defined by RFC 1918. That is, the routes must be considered publicly routable if advertised into the Internet.
For a route to be added into the BGP routing table, the routing table of the IGP must know about that route first. Otherwise, BGP will not see it as a valid route, even though it will be listed in the table.
When BGP receives an update from a neighbor advertising a new prefix, an entry is made in the BGP table if it is selected as the best route, or equal to the best route, to that destination based on metric calculations.
When, for the first time, a packet arrives destined for a network associated with the newly added prefix, the router searches the fast-switching cache to see if an entry already exists. Not finding one, the router performs a routing table lookup to find the egress interface and next-hop address. The packet is then dispatched and a new entry is added to the fast-switching cache reflecting the new destination.
Subsequent packets destined for that same destination will be spared the delay associated with a recursive routing table lookup needed for process switching. The fast-switching cache will contain the entry associating the outbound interface and next-hop address. The fast-switching process occurs in interrupt code, which means the packet is processed immediately. The appropriate Layer 2 encapsulation type is assembled from a pre-generated header that already contains the appropriate Layer 2 source and destination addresses. No Address Resolution Protocol (ARP) request or ARP cache lookup need be performed, as that information was obtained for the first packet and stored in the fast-switching cache as well. For this reason, however, fast switching has a difficult time dealing effectively with load-balanced link situations.
Entries in the fast-switching cache are not maintained for unlimited amounts of time. They do age out after 60 seconds. If an entry is not used and ages out, the next packet destined for the destination network in question will need to be process switched so that the information can be reacquired.
Was this article helpful?