Deploying
Multilayer Switching
with Cisco Express
Forwarding
Implementing Inter-VLAN Routing
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-1
Multilayer Switching
A multilayer switch combines
the ability of a switch, which
forwards frames based on a
Layer 2 header, and a router,
which forwards packets
based on a Layer 3 and Layer
4 header.
A multilayer switch can
therefore do the following:
 Switch within a VLAN
 Route between VLANs
 Filter traffic with Layer 2 or Layer
3 ACLs
An advantage of multilayer
switches is that they can
route at hardware speed.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-2
IP Unicast Frame and Packet Rewrite
Incoming IP Unicast Packet
Rewritten IP Unicast Packet
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-3
CAM and TCAM Tables
CAM and TCAM tables are used
for very high-speed lookup in
large tables.
CAM works with binary
operation:
 Matches based on 0 or 1 values; no
bits are ignored.
 “Hit” returns a result (output port).
 Used for MAC address lookup.
TCAM works with ternary
operation:
 Matches based on 0, 1, or X (“don’t
care”).
 Longest match returns “hit.”
 Table structure broken into groups of
patterns and associated masks.
 Useful for lookups where not all
values in key must have exact match
(ACL, lookups).
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-4
Distributed Hardware Forwarding
In Layer 3 switches, the control path and data path are
relatively independent:
 The control path code, such as routing
protocols, runs on the route processor.
 Data packets are forwarded by the switching fabric.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-5
Layer 3 Switch Processing
A Layer 3 switch combines
the functions of a switch
and a router, and performs
three major functions:
 Packet switching
 Route processing
 Intelligent network services
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-6
Cisco Switching Methods
Process switching
 Slowest method — every packet examined by CPU; all forwarding decisions made
in software
Fast switching (route caching)
 Faster method — first packet in each flow examined by CPU; forwarding decision
cached in hardware for subsequent packets in flow
Cisco Express Forwarding (topology-based switching)
 Fastest method — hardware forwarding table created regardless of traffic flows; all
packets switched using hardware
 Fast but does have limitations
 Switching mode for multilayer switches
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-7
Route Caching
 First packet in a stream is
routed in software.
 Destination MAC address
must be for default gateway.
 Forwarding decision is
programmed in the hardware
forwarding table for
subsequent packets.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-8
Topology-Based Switching
 Central FIB built by Cisco
Express Forwarding
regardless of traffic flow
 Per-destination load
balancing
 Currently the predominant
method
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-9
Multilayer Switches Based on Cisco
Express Forwarding
 Cisco Express Forwarding caches routing information in the FIB
table, Layer 2 next-hop addresses, and frame header rewrite
information in the adjacency table.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-10
Verifying Cisco Express Forwarding
Switch# show ip cef [type mod/port | vlan_interface] [detail]
 Displays information about entries in the Cisco Express
Forwarding FIB.
Switch# show ip cef
Prefix
Next Hop
0.0.0.0/32
receive
1.0.0.0/24
attached
1.0.0.0/32
receive
1.0.0.1/32
receive
1.0.0.55/32
1.0.0.55
Interface
GigabitEthernet0/2
GigabitEthernet0/2
Switch# show ip cef vlan 10 detail
IP CEF with switching (Table Version 11), flags=0x0
10 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 0
13 leaves, 12 nodes, 14248 bytes, 14 inserts, 1 invalidations
0 load sharing elements, 0 bytes, 0 references
.../...
10.1.10.0/24, version 6, epoch 0, attached, connected
0 packets, 0 bytes
via Vlan10, 0 dependencies
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-11
Verifying Cisco Express Forwarding
(Cont.)
Switch# show adjacency [{type mod/port |
port-channel number} | detail | internal | summary]
 Displays information about entries in the Cisco Express
Forwarding adjacency table.
Switch# show cef drop
 Displays information about packets dropped due to incomplete or
nonexistent Cisco Express Forwarding adjacencies.
Switch# show adjacency
Protocol Interface
IP
GigabitEthernet0/3
IP
GigabitEthernet0/2
Address
2.0.0.55(5)
1.0.0.55(5)
Switch#show adjacency gigabitethernet 1/5 detail
Protocol Interface
Address
IP
GigabitEthernet1/5
172.20.53.206(11)
504 packets, 6110 bytes
ARP
03:49:31
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-12
Summary
 Multilayer switches can forward traffic, based on either Layer 2 or
Layer 3 header information.
 Multilayer switches rewrite frame and packet headers, using
information from tables cached in hardware. Layer 3 (multilayer)
switching is high-performance packet switching in hardware.
 Multilayer switching can use centralized or distributed switching,
and route caching or topology-based switching.
 Multilayer switching functionality can be implemented using Cisco
Express Forwarding.
 Cisco Express Forwarding utilizes two tables in hardware to
forward packets: an FIB and an adjacency table.
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-13
© 2009 Cisco Systems, Inc. All rights reserved.
SWITCH v1.0—4-14