IP+Routing

=Overview=

Packets are involved in 3 main steps
 * 1) Routing - Find the outgoing interface
 * First step is the find the longest match to the destination
 * Recurse to the outgoing interface
 * 1) Switching - Move packet to another port
 * Called the switching path
 * Can use process, fast, CEF, etc..
 * Process switching is least optimal. Lookup time is variable. Basically checks every route in order
 * Generally dont want to run process or fast
 * This is also where load balancing occurs. Ideally per flow. (ECMP)
 * FIB is basically the CEF table
 * 1) Encapsulation - Rebuild the layer 2 header

If there are multiple longest matches, choice depends on if the route is within the same protocol or different. If its a different protocol, the AD is used. Otherwise the metric and other protocol specific rules are used.

=Policy Routing=


 * Normal IP routing is destination based
 * PBR allows for routing based on
 * source
 * Destination
 * Protocol type
 * Port
 * Sample traffic matched in route-map
 * Permit means to policy route
 * Deny means use normal forwarding
 * Most platforms cant hardware accelerate PBR