Notes from MPLS Fundamentals - Cisco Express Forwarding
ccie-sp September 3rd, 2009
Here are some additional notes I found while cleaning out my drafts. I forgot to publish it when I was reading the book.
MPLS Fundamentals - Chapter 6: Cisco Express Forwarding
Overview of IOS Switching Methods
-Process Switching - An IOS process handles the switching of a packet
-Interrupt Switching - When packets arrive the interface processor interrupts the central CPU asks it to switch the packet according to a route cache or switching table
-ASIC - CEF table is programmed in ASICS so packets can be switched in hardware
Process Switching
-IOS process copies the packet to CPU memory and looks up destination IP in routing table
-Packets are switched out particular interfaces after TTL has been lowered and CRC has been recalculated
-Central CPU always looks at packet
Fast Switching
-An on-demand forwarding table
-1st packet is process switched; central CPU builds a cache
-Interrupt code will switch subsequent packets for the same destination
-Cache is not permanent
-Route cache has an outgoing interface, next hop, and Layer 2 Rewrite field
-Enabled with ‘ip route-cache’ interface command
CEF Switching
-Table is built in advance
-Only switching method that can label an incoming IP packet and forward it
CEF Components
-FIB - Also known as CEF table
-Adjacency Table - Responsible for MAC or Layer 2 Rewrite; ARP used to map Layer 2 addresses to IP
CEF Table
-Responsible for the Layer 3 forwarding decision
-Recursive prefixes are immediately resolved
CEF Operation
-When packet enters router, Layer 2 info is stripped off
-A lookup is performed on the destination IP in the CEF table
-A forwarding decision is made
-Layer 2 Rewrite allows router to put a new Layer 2 header onto the frame before switching the packet out the outgoing interface toward the next hop
Distributed CEF (DCEF)
-Can be used in a distributed manner with higher-end models (i.e. 7500, GSR 12000)
-Distributed CPUs handle forwarding of traffic without burdening the central CPU
-For 7500, the CEF and adjacency table resides on VIP
-For GSR 12000, the CEF and adjacency table resides on the line cards
CEF Switching in Hardware
-ASICs can forward packets at very high rates
CEF Load Balancing
-Per-packet - Round-robin packet per packet on outgoing links
-Per-destination - Destination and source IP addresses are hashed; hash is pointed to load sharing table
Labeling IP Packets by CEF
-CEF labels only the packets that are initially on the ingress PE router
Load Balancing Labeled Packets
-If MPLS payload is IPv4 packet, load balancing is done by hashing the source and destination IP address of the IPv4 header
-If MPLS payload is IPv6 packet, load balancing is done by hashing the source and destination IP address of the IPv6 header
-If MPLS payload is not an IPv4 or IPv6 packet, load balancing is done by looking at the value of the bottom label