Home > Articles > Cisco Network Technology > General Networking > Understanding and Configuring Multilayer Switching

Understanding and Configuring Multilayer Switching

  • Sample Chapter is provided courtesy of Cisco Press.
  • Date: Jul 6, 2007.

Chapter Description

An understanding of multilayer switching is necessary for network designers, administrators, and operators for deployment and troubleshooting purposes. This chapter provides you with details, architecture, and methods of multilayer switching on Catalyst switches.

CEF-Based MLS Configuration, Verification, and Troubleshooting

In terms of designing multilayer switched networks, different modes of multilayer switching meet the requirements for different performance and scalability aspects. In terms of troubleshooting, understanding the basic operation of multilayer switches is paramount; multilayer switching requires a hierarchical approach to troubleshooting because several switching components determine the packet flow, not a single processing engine. CEF-based MLS configuration, verification, and troubleshooting vary slightly per Catalyst switch family but do have some commonalities.

CEF-Based MLS Configuration

Cisco Catalyst switches that use the CEF-based MLS architecture use CEF by default. Consequently, Catalyst switches perform hardware Layer 3 switching by default as well. For Catalyst switches that support CEF-based MLS, CEF-based MLS and per-destination load balancing with CEF-based MLS are enabled by default. As a result, no configuration is required for CEF-based MLS.

You should not disable CEF on Catalyst switches for any reason except under the supervision of a Cisco TAC engineer for the specific purpose of troubleshooting. Disabling CEF on Cisco Catalyst switches yields low switching performance and may result in undesirable behavior.

CEF-Based MLS Verification and Troubleshooting

To display information about the Catalyst 6500 family of switches running Cisco IOS, use the show interface command, as shown in Example 9-2.

Example 9-2. Displaying Layer 3 Switching Statistics on the Cisco IOS–Based Catalyst 6500 Family of Switches

Router#show interface port-channel 9

Port-channel9 is up, line protocol is up (connected)

  Hardware is EtherChannel, address is 00d0.039b.e80a (bia 00d0.039b.e800)

  Description: POINT-TO-POINT TO CORE-4

! Output omitted for brevity

  Output queue: 0/40 (size/max)

  5 minute input rate 0 bits/sec, 0 packets/sec

  5 minute output rate 0 bits/sec, 0 packets/sec

  L2 Switched: ucast: 205744 pkt, 34282823 bytes - mcast: 216245 pkt, 66357101 bytes

  L3 in Switched: ucast: 367825 pkt, 361204150 bytes - mcast: 0 pkt, 0 bytes mcast

  L3 out Switched: ucast: 248325 pkt, 243855150 bytes

     682964 packets input, 431530341 bytes, 0 no buffer

     Received 311465 broadcasts (50899 IP multicast)

     0 runts, 0 giants, 0 throttles

     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

     0 watchdog, 0 multicast, 0 pause input

     0 input packets with dribble condition detected

     554167 packets output, 309721969 bytes, 0 underruns

     0 output errors, 0 collisions, 8 interface resets

     0 babbles, 0 late collision, 0 deferred

     0 lost carrier, 0 no carrier, 0 PAUSE output

     0 output buffer failures, 0 output buffers swapped out

In Example 9-2, the lines beginning L2 Switched, L3 in Switched, and L3 out Switched indicate the Layer 3 hardware-switching statistics. Catalyst switches do not instantaneously update hardware-switching statistics for CLI show commands. For example, on the Catalyst 4500 family of switches running Cisco IOS, interface statistics may take up to 30 seconds to be updated in show commands. Furthermore, each Catalyst family of switches has its own troubleshooting methodology and commands for viewing hardware switching statistics. Consult Cisco.com for more details.

Viewing the Layer 3 Engine CEF Table

The Layer 3 Engine CEF table determines the hardware-switching CEF table. As such, when troubleshooting any CEF issues, the first step is to view the software CEF table. To view the CEF FIB table as per the Layer 3 switching engine in software, use the following commands:

show ip cef
show ip cef detail

Both commands display the FIB table per the Layer 3 switching engine. These commands do not display the FIB table according to the hardware-switching components such as TCAM, but instead display a "shadow" copy in software of the hardware-switching table. The "receive" entry in the Next Hop column indicates that the destinations for that specific prefix are passed to a normal Cisco IOS routing engine for processing. Examples 9-3 and 9-4 illustrate the use of these commands, respectively, on a Catalyst 3550 switch.

Example 9-3. Sample Use of the show ip cef Command

Router#show ip cef

Prefix              Next Hop             Interface

0.0.0.0/32          receive

10.5.1.1/32         10.20.248.2          Port-channel1

10.5.1.140/30       10.20.248.202        GigabitEthernet3/16

                    10.20.248.2          Port-channel1

224.0.0.0/4         0.0.0.0

224.0.0.0/24        receive

255.255.255.255/32  receive

Example 9-4. Sample Use of the show ip cef detail Command

Switch#show ip cef detail

IP Distributed CEF with switching (Table Version 8548), flags=0x0

  4156 routes, 0 reresolve, 0 unresolved (0 old, 0 new), peak 1000

  4156 leaves, 56 nodes, 680744 bytes, 6513 inserts, 2357 invalidations

  1023 load sharing elements, 343728 bytes, 1023 references

  universal per-destination load sharing algorithm, id 0C2C7438

  3(0) CEF resets, 3099 revisions of existing leaves

  Resolution Timer: Exponential (currently 1s, peak 2s)

  2048 in-place/0 aborted modifications

  refcounts:  11471 leaf, 6319 node



  Table epoch: 0 (4156 entries at this epoch)



Adjacency Table has 8 adjacencies

0.0.0.0/32, version 0, epoch 0, receive

10.5.1.1/32, version 52, epoch 0, cached adjacency 10.20.248.2

0 packets, 0 bytes

  via 10.20.248.2, Port-channel1, 0 dependencies

    next hop 10.20.248.2, Port-channel1

    valid cached adjacency

! Output omitted for brevity

  via 10.20.248.2, Port-channel1, 0 dependencies

    traffic share 1

    next hop 10.20.248.2, Port-channel1

    valid adjacency

  0 packets, 0 bytes switched through the prefix
224.0.0.0/4, version 30, epoch 0

0 packets, 0 bytes, Precedence routine (0)

  via 0.0.0.0, 0 dependencies

    next hop 0.0.0.0

    valid punt adjacency

224.0.0.0/24, version 2, epoch 0, receive

255.255.255.255/32, version 1, epoch 0, receive

Viewing the Layer 3 Engine Adjacency Table

CEF populates the adjacency tables when MAC addresses are learned via the ARP process. As a result, the adjacency table includes the MAC address rewrite information and destination interface for the adjacent node. All IP routing entries in the CEF table correspond to a next-hop address (adjacency).

When a switch hardware-switches an ingress packet with the destination MAC address as itself, it looks up the destination IP address in the CEF table. The first match in the CEF table points to an adjacency entry that contains the MAC rewrite information and destination interface. The switch rewrites the packet accordingly and sends it out the destination interface.

A single CEF entry may point to multiple adjacency entries when multiple paths to a destination exist. In addition, when a router is connected directly to several hosts, the FIB table on the router maintains a prefix for the subnet rather than for the individual host prefixes. The subnet prefix points to a glean adjacency. When packets need to be forwarded to a specific host, the adjacency database is gleaned for the specific prefix.

Certain IP prefixes or addresses require exception processing. Switches require exception processing of packets in cases where hardware switching does not support routing of the frame or in cases where the Layer 3 engine requires processing of the packet. Examples of packets that require exception processing include interfaces configured for NAT and received packets with IP options. Recall from Chapters 1 and 2 that support for hardware switching of frames varies on a per-switch basis.

The following types of adjacencies exist for special processing:

  • Punt adjacency—Used for packets that require special handling by the Layer 3 engine or for features that are not yet supported by hardware switching.
  • Drop or discard adjacency—Used to drop ingress packets.
  • Null adjacency—Used to drop packets destined for a Null0 interface. The use of a Null0 interface is for access filtering of specific source IP packets.

To display adjacency table information, use the show adjacency command. The optional detail keyword displays detailed adjacency information, including Layer 2 information. Adjacency statistics are updated approximately every 60 seconds. Examples 9-5 and 9-6 illustrate sample output from the show adjacency and show adjacency detail commands, respectively.

Example 9-5. Sample Use of the show adjacency Command

Router#show adjacency

Protocol Interface                 Address

IP       GigabitEthernet3/16       10.20.248.202(11120)

IP       FastEthernet9/48          10.192.15.254(7)

IP       FastEthernet9/1           100.1.1.1(2005)

IP       EOBC0/0                   127.0.0.12(3)

IP       FastEthernet9/48          10.192.15.100(5)

IP       Port-channel1             10.20.248.2(11162)

Example 9-6. Sample Use of the show adjacency detail Command

Router#show adjacency detail

Protocol Interface                 Address

IP       GigabitEthernet3/16       10.20.248.202(11120)

                                   0 packets, 0 bytes

                                   00D00178780A

                                   00D00624440A0800

                                   ARP         00:05:40

                                   Epoch: 0

IP       FastEthernet9/48          10.192.15.254(7)

                                   0 packets, 0 bytes

                                   00D0BCF107C8

                                   00D00624440A0800

                                   ARP         00:39:20

                                   Epoch: 0

IP       FastEthernet9/1           100.1.1.1(2005)

                                   0 packets, 0 bytes

                                   0007ECC57000

                                   00D00624440A0800

                                   ARP        03:19:20

                                   Epoch: 0

IP       EOBC0/0                   127.0.0.12(3)

                                   0 packets, 0 bytes

                                   000021000000

                                   0000210000000800

Debugging CEF on the Layer 3 Engine

To debug CEF on the Layer 3 engine, use the debug ip cef EXEC command. These debug commands display information about the CEF from the perspective of the Layer 3 engine. The interprocess communication (IPC) debugs provide information on CEF data to and from centralized and distributed switching engines. The syntax for these debug ip cef commands is as follows:

debug ip cef {drops [access-list] | receive [access-list] | events [access-list] |
  prefix-ipc [access-list] | table [access-list]} debug ip cef {ipc | interface-ipc}

The optional constraints for the debug ip cef command are as follows. Use the options to debug specific CEF operations on the Layer 3 engine:

  • drops—Records dropped packets.
  • receive—Records packets that are not switched using information from the FIB table but are received and sent to the next switching layer.
  • events—Records general CEF events.
  • prefix-ipc—Records updates related to IP prefix information, including the following:
    • - Debugging of IP routing updates in a line card
    • - Reloading of a line card with a new table
    • - Adding a route update from the route processor to a DFC-enabled line card where the CEF table is already full
    • - Control messages related to FIB table prefixes
  • table—Produces a table showing events related to the FIB table. Possible types of events include the following:
    • - Routing updates that populate the FIB table
    • - Flushing of the FIB table
    • - Adding or removing of entries to or from the FIB table
    • - Table reloading process
  • ipc—Records information related to interprocess communications in CEF. Possible types of events include the following:
    • - Transmission status of IPC messages
    • - Status of buffer space for IPC messages
    • - IPC messages received out of sequence
    • - Status of resequenced messages
    • - Throttle requests sent from a line card to the route processor
  • interface-ipc—Records IPC updates related to interfaces. Possible reporting includes an interface coming up or going down, and so on.

Specify an access list with the debug option to control collections of debugging information to specific IP address(es):

Switch#configure terminal
Switch(config)#access-list 99 permit host 192.168.1.100
Switch(config)#end
Switch#debug ip cef drops 99

CEF troubleshooting using the debug ip cef command should be coordinated with a Cisco TAC engineer because the debug output is not easily decoded.

CEF-Based MLS Troubleshooting Methodology

Previous subsections discussed several CEF troubleshooting techniques on the Layer 3 engine. Recall that the Layer 3 engine does not actually contain the hardware FIB and adjacency table. Rather, these tables are located in specialized hardware components in Supervisor Engines and line cards. The following highlights a stepwise approach to troubleshooting a unicast route on a CEF-based Catalyst switch. The troubleshooting steps are not inclusive but do review the hierarchical approach to troubleshooting CEF-based MLS:

Step 1

Verify that the IP routing information on the Layer 3 engine is correct. Use the show ip route or show ip route destination-network command to verify that the destination network routing entry exists and is associated with a valid next-hop address. If the route does not exist or the next-hop address is incorrect, troubleshooting of routing protocol, next hop interfaces, or route configuration is required.

Step 2

Verify that the next-hop address has a valid next-hop MAC address by using the show ip arp IP-address command. If the entry is incomplete, troubleshooting of the ARP process is required.

Step 3

Verify that the IP route entry in the FIB on the Layer 3 engine contains the same next-hop address as in Step 1 by using the show ip cef destination-network command.

Step 4

Verify that the CEF adjacency table contains the same rewrite information as the ARP table from Step 2 by using the show adjacency detail | begin next_hop_IP_address command.

Step 5

When all other troubleshooting steps have been exhausted and the CEF-based MLS switch is still experiencing unicast routing issues, verify the population of the FIB and adjacency table in TCAM under the supervision of a TAC engineer.

This chapter contains an example of CEF-based MLS troubleshooting in the configuration exercise at the end of this chapter. For more information on troubleshooting CEF on Catalyst switches, refer to the following documents on Cisco.com:

  • "How-To Troubleshoot Unicast IP Routing CEF on Catalyst 6000s with a Supervisor 2 in Hybrid Mode," Document ID: 20626
  • "Troubleshooting Cisco Express Forwarding Routing Loops," Document ID: 26083
  • "Troubleshooting Incomplete Adjacencies with CEF," Document ID: 17812
  • "Troubleshooting Prefix Inconsistencies with Cisco Express Forwarding," Document ID: 14540
4. Study Tips | Next Section Previous Section

Cisco Press Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Cisco Press and its family of brands. I can unsubscribe at any time.