Webinar 01 - Routing Basics CEF
Webinar 01 - Routing Basics CEF
Switching
Packet Forwarding
When the packet comes in, the router does the following:
0. Checks and removes L2 header, gets destination IP
1. Routing process
2. Switching process
3. L2 encapsulation
Routing Process
Binary
11000000.10101000.00000000.00100001
Prefix 1: 10.0.0.0/8
00001010.00000000.00000000.00000000
Prefix 2: 192.168.0.0/24
11000000.10101000.00000000.00000000
Prefix 3: 192.168.0.32/27
11000000.10101000.00000000.00100000
Recursive Lookup
Stored in RAM
Value
Route Source
Value
Connected
RIP
120
Static
EGP
140
EIGRP summary
ODR
160
eBGP
20
EIGRP external
170
EIGRP internal
90
iBGP
200
IGRP
100
NHRP
250
OSPF
110
DHCP learned
254
IS-IS
115
Routing protocols
Static
Dynamic:
Path-vector (BGP)
L2 Encapsulation
Knowing outgoing interface and Next Hop address is not always
enough for packet rewrite
DST IP
IP Packet
DST MAC
SRC MAC
SRC IP
Encapsulated IP Packet
DST IP
Traffic types
Data plane traffic through the device
Control plane traffic to the device:
STP BPDU
SSH/Telnet
SNMP
source: networklessons.com
CPU vs ASIC
CPU
Can do anything
*Note: DPDK project enables x86 multi-core processors to forward 200+ Gbps
source: intel.com
ASIC
Expensive
Memory types
RAM
Random Access Memory (RAM) is the most common type of memory
Cheap
CAM
Content-addressable memory (CAM)
Very fast
Expensive
TCAM
Ternary Content-addressable memory (TCAM)
Very expensive
Used for next-hop lookup (CEF table), ACL (security and QoS)
Switching methods:
Process-switching
Fast-switching
CEF
Process-switching
Process-switching (cont.)
Control plane
Locally generated
No L2 adjacency information
ACL logging
Fast-switching
Deprecated!
FIB/CEF table:
The lookup is done during the interrupt (process scheduling is not required)
Verification: show ip cef [ip-address [mask]] [detail] [internal]
CEF process takes information from all L3-to-L2 mappings and builds L2
header
Stored in RAM
Verification:
show adjacency [detail]
Thats why generally speaking L3 switches forward traffic faster than routers
TCAM stores not only FIB, but ACL and QoS rules
Routing protocols can install several routes for the same prefix
Questions?