As an administrator you might notice sluggish response to Telnet sessions you attempt to establish with a router or longer-than-normal ping response times.
Such symptoms might indicate a router performance issue.
This section investigates three potential router issues, each of which might result in poor router performance. These three issues are
■ Excessive CPU utilization
■ The packet switching mode of a router
■ Excessive memory utilization
- A router’s processor (that is, CPU) utilization escalating to a high level but only remaining at that high level for a brief time could represent normal behavior.
- If a router’s CPU utilization continually remains at a high level, network performance issues might result.
- Aside from latency that users and administrators can experience, a router whose CPU is overtaxed might not send routing protocol messages to neighboring routers in a timely fashion. As a result, routing protocol adjacencies can fail, resulting in some networks becoming unreachable.
Processes That Commonly Cause Excessive CPU Utilization
Four processes that can result in excessive CPU utilization:
1) ARP Input process
Is in charge of sending ARP requests, can consume an inordinate percentage of CPU resources if the router has to send numerous ARP requests.
One configuration that can cause such a high number of ARP requests is having a default route configured that points to a broadcast network.
- For example, perhaps a router had the ip route 0.0.0.0 0.0.0.0 fa 0/1command entered in global configuration mode.
- Such a configuration can cause an ARP to be sent to all IP addresses available off of that broadcast interface that are not reachable via a better route.
- From a security perspective, numerous ARP requests can result from an attacker performing a ping sweep of a subnet.
2) Net Background process
An interface has a certain number of buffers available to store packets. These buffers are sometimes referred to as the queue of an interface.
If an interface needs to store a packet in a buffer but all the interface buffers are in use, the interface can pull from a main pool of buffers that the router maintains. The process that allows an interface to allocate one of these globally available buffers is Net Background. If the throttles, ignored, and overrun parameters are incrementing on an interface, the underlying cause might be the Net Background process consuming too many CPU resources.
3) IP Background process
Handles an interface changing its state. A state change might be an interface going from an Up state to a Down state, or vice versa.
Another example of state change is an interface’s IP address changing.
- Therefore, anything that can cause repeated state changes, such as bad cabling, might result in the IP Background process consuming a high percentage of CPU resources.
4) TCP Timer process
Runs for each TCP router connection.Therefore, many connections can result in a high CPU utilization by the TCP Timer process.
ARP Problem with static route and exit interface as Ethernet
|R1 will have incorrect static route|
R1(conf_t)# ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
R1# ping 126.96.36.199 repeat 2
*Nov 30 22:37:15.831: ARP TABLE: inserting entry 188.8.131.52/0000.0000.0000 on Fa0/0 for Incomplete
*Nov 30 22:37:15.831: ARP DYNAMIC: set up subblock for 184.108.40.206 in tableid 0
*Nov 30 22:37:15.843: ARP TABLE: modifying entry 220.127.116.11/ca02.5cca.0008 on Fa0/0 for Dynamic
*Nov 30 22:37:15.847: IP ARP ADJ: queueing to install adjacency for 18.104.22.168 on FastEthernet0/0
*Nov 30 22:37:15.847: ARP DYNAMIC: set up subblock for 22.214.171.124 in tableid 0
*Nov 30 22:37:15.847: ARP TABLE: modifying entry 126.96.36.199/ca01.5cca.0008 on Fa0/0 for Dynamic
*Nov 30 22:37:15.851: IP ARP ADJ: queueing to install adjacency for 188.8.131.52 on FastEthernet0/0
*Nov 30 22:37:15.851: ARP DYNAMIC: set up subblock for 184.108.40.206 in tableid 0
*Nov 30 22:37:15.855: IP ARP ADJ: process adjacency event INSTALL for 220.127.116.11 on FastEthernet0/0
*Nov 30 22:37:15.855: IP ARP ADJ: install adjacency for 18.104.22.168 on FastEthernet0/0
Success rate is 50 percent (1/2), round-trip min/avg/max = 12/12/12 ms
|MAC of latest Router who will ARP Reply, will be used as DST MAC|
If you point a static route to a broadcast interface, the route is inserted into the routing table only when the broadcast interface is up. This configuration is not recommended because when the next hop of a static route points to an interface, the router considers each of the hosts within the range of the route to be directly connected through that interface. For example, ip route 0.0.0.0 0.0.0.0 Ethernet0.
With this type of configuration, a router performs Address Resolution Protocol (ARP) on the Ethernet for every destination the router finds through the default route because the router considers all of these destinations as directly connected to Ethernet 0.
PROBLEM DESCRIPTION: http://blog.ipspace.net/2009/10/my-stupid-moments-interface-default.html
PROBLEM SOLUTION: http://blog.ipspace.net/2009/10/follow-up-interface-default-route.html
Cisco IOS Commands Used for Troubleshooting High Processor Utilization
show arpExample output
! Displays the ARP cache for a router. If several entries are in the Incomplete state, you might suspect a malicious scan (for example, a ping sweep) of a subnet.
show interface <interface-id>
! Displays a collection of interface statistics. If the throttles, overruns, or ignore counters continually increment, you might suspect that the Net Background process is attempting to allocate buffer space for an interface from the main buffer pool of the router.
show tcp statistics
! information about the number of TCP segments a router sends and receives, including the number of connections initiated, accepted, established, and closed.
! a high number of connections can explain why the TCP Timer process might be consuming excessive CPU resources.
show processes cpu
! displays average CPU utilization over 5-second, 1-minute, and 5-minute intervals, in addition to listing all the router processes and the percentage of CPU resources consumed by each of those processes.
show processes cpu history
! displays a graphical view of CPU utilization over the past 60 seconds, 1 hour, and 3 days. This graphical view can indicate if an observed high CPU utilization is a temporary spike in utilization or if the high CPU utilization is an ongoing condition.
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.3.3.2 61 0009.b7fa.d1e0 ARPA Ethernet0/0TCP
Internet 10.3.3.1 - 00d0.06fe.9ea0 ARPA Ethernet0/0
Internet 192.168.1.50 0 Incomplete ARPA
R1# show tcp statisticsCPU
Load for five secs: 14%/11%; one minute: 14%; five minutes: 14%
Time source is NTP, 12:08:28.362 EET Fri Nov 28 2014
Rcvd: 31481041 Total, 7271 no port
10795 checksum error, 9888 bad offset, 0 too short
28762386 packets (239026130 bytes) in sequence
0 packets (0 bytes) in CEF
38668 dup packets (4217801 bytes)
87066 partially dup packets (10016590 bytes)
4 out-of-order packets (86 bytes)
0 packets (0 bytes) with data after window
0 packets after close
0 window probe packets, 324 window update packets
303 dup ack packets, 0 ack packets with unsend data
1487302 ack packets (54568404 bytes)
0 ack packets (0 bytes) in CEF
Sent: 30908859 Total, 2 urgent packets
604251 control packets (including 28 retransmitted)
1542941 data packets (54546089 bytes)
0 data packets (0 bytes) in CEF
222 data packets (7690 bytes) retransmitted
0 data packets (0 bytes) fastretransmitted
28234961 ack only packets (25407122 delayed)
0 ack only packets in CEF
0 window probe packets, 526468 window update packets
12196 Connections initiated, 752 connections accepted, 12819 connections established
1149803 Connections closed (including 601 dropped, 568497 embryonic dropped)
250 Total rxmt timeout, 0 connections dropped in rxmt timeout
9698 Keepalive timeout, 9698 keepalive probe, 3 Connections dropped in keepalive
R1#sh proc cpu | inc utili|PID|ARP Back|Net Back|TCP Timer|IP Back
CPU utilization for five seconds: 19%/11%; one minute: 15%; five minutes: 14%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
31 12196 19532716 0 0.00% 0.00% 0.00% 0 ARP Background
48 15248172 7631874 1997 0.07% 0.12% 0.13% 0 Net Background
136 46396 25133016 1 0.00% 0.01% 0.00% 0 TCP Timer
148 84 312383 0 0.00% 0.00% 0.00% 0 IP Background
R1#show processes cpu history
20 ********** ********************
0 5 0 5 0 5 0 5 0 5 0
CPU% per second (last 60 seconds)
Understanding Packet Switching Modes
- In addition to the high CPU utilization issues previously discussed, a router’s packet switching mode can impact router performance.
Cisco routers support the following three primary modes of packet switching:
■ Process switching
■ Fast switching
■ Cisco Express Forwarding
Operation of Process Switching
- When a router receive a packet, the router removes the packet’s Layer 2 header, examines the Layer 3 addressing, and decides how to forward the packet.
- The Layer 2 header is then rewritten (insert new SRC and DST MAC addresses and computing a new CRC), and the packet is forwarded out of the appropriate interface.
- With process switching, the router’s CPU becomes directly involved with packet switching decisions.
- As a result, the performance of a router configured for process switching can suffer significantly.
- An interface can be configured for process switching by disabling fast switching on that interface.
R(config-if)# no ip route-cacheOperation of Fast Switching
- Fast switching uses a fast cache maintained in a router’s data plane.
- The fast cache contains information about how traffic from different data flows should be forwarded.
- The first packet in a data flow is process-switched by a router’s CPU.
- After the router determines how to forward the first frame of a data flow, that forwarding information is stored in the fast cache.
- Subsequent packets in that same data flow are forwarded based on information in the fast cache, as opposed to being process-switched.
- Fast switching reduces a router’s CPU utilization more than process switching does.
- Fast switching can be configured in interface configuration mode with the command
R(config-if)# ip route-cacheOperation of Cisco Express Forwarding
- CEF maintains two tables in the data plane.
- CEF can efficiently make forwarding decisions, using these tables, populated from a router’s IP routing table and ARP cache.
- Unlike fast switching, CEF does not require the first packet of a data flow to be process-switched.
- Rather, an entire data flow can be forwarded at the data plane.
- On many router platforms, CEF is enabled by default.
- If it is not, you can globally enable it with the
R(config)# ip cef- Alternatively, you can enable CEF for a specific interface with the interface configuration mode command
R(config-if)# ip route-cache cef
Troubleshooting Packet Switching Modes
show ip interface <interface_id>Examples:
! Displays multiple interface statistics, including information about the packet switching mode of an interface.
show ip cache
! Displays the contents of fast cache from a router if fast switching is enabled.
show processes cpu | include IP Input
! Displays information about the IP input process on a router. The CPU utilization for this process might show a high value if the CPU of a router is actively engaged in process-switching traffic
show ip cef
! Displays the contents of a router FIB
show ip cef adjacency <egress-interface-id> <next-hop-ip-address> detail
! Displays destinations reachable via the combination of the specified egress interface and next-hop IP address.
show adjacency detail
! Provides information contained in the adjacency table of a router, including protocol and timer information.
show cef not-cef-switched
! Displays information about packets the router forwards using a packet switching mechanism other than CEF
Interface and CEF
R1# sh ip int FastEthernet0/1.221 | inc IP fast|Flow|CEFIf fast switching is enabled and CEF is disabled, a router begins to populate its fast cache.
IP fast switching is enabled
IP fast switching on the same interface is enabled
IP Flow switching is disabled
IP CEF switching is enabled
IP CEF switching turbo vector
IP CEF turbo switching turbo vector
IP route-cache flags are Fast, CEF
Output features: Post-Ingress-NetFlow
R4# show ip cacheCEF
IP routing cache 3 entries, 588 bytes
12 adds, 9 invalidates, 0 refcounts
Minimum invalidation interval 2 seconds, maximum interval 5 seconds,
quiet interval 3 seconds, threshold 0 requests
Invalidation rate 0 in last second, 0 in last 3 seconds
Last full cache invalidation occurred 04:13:57 ago
Prefix/Length Age Interface Next Hop
10.8.8.4/32 00:00:07 FastEthernet0/1 10.8.8.4
10.8.8.6/32 00:00:10 FastEthernet0/1 10.8.8.6
- if a next-hop of the network prefix is set to receive, that network is local to the router, whereas attached indicates that the network is directly connected to the router.
R1#sh ip cef | inc Prefix|atta|receiCEF PUNTED PACKETS
Prefix Next Hop Interface
10.18.6.16/29 attached GigabitEthernet0/3.10
10.18.6.16/32 receive GigabitEthernet0/3.10
10.18.6.17/32 receive GigabitEthernet0/3.10
10.18.6.18/32 attached GigabitEthernet0/3.10
10.18.6.19/32 attached GigabitEthernet0/3.10
R1#show cef not-cef-switched
Load for five secs: 12%/10%; one minute: 15%; five minutes: 15%
Time source is NTP, 12:29:37.651 EET Fri Nov 28 2014
% Command accepted but obsolete, see 'show (ip|ipv6) cef switching statistics [feature]'
IPv4 CEF Packets passed on to next switching layer
Slot No_adj No_encap Unsupp'ted Redirect Receive Options Access Frag
RP 0 0 42957290 1 3774814473 1 26952362 0
IPv6 CEF Packets passed on to next switching layer
Slot No_adj No_encap Unsupp'ted Redirect Receive Options Access MTU
RP 0 0 33103182 0 32908045 0 0 0
Excessive Memory Utilization
- router performance can suffer if it lacks sufficient available memory.
- example: install a version of Cisco IOS on a router, and that router does not have the minimum amount of memory required to support that specific Cisco IOS image. Even though the router might load the image and function, its performance might be sluggish.
Common Memory Troubleshooting Targets
Assuming a router doeshave the recommended amount of memory for its installed Cisco IOS image, consider the following as potential memory utilization issues:
1) Memory leak
When a router starts a process, that process can allocate a block of memory. When the process completes, the process should return its allocated memory to the router’s pool of memory. If not all the allocated memory is returned to the router’s main memory pool, a memory leak occurs. Such a condition usually results from a bug in the Cisco IOS version running on the router, requiring an upgrade of the router’s Cisco IOS image.
R1#show memory allocating-process totalsFollowing this summary information, the output shows detailed memory allocation information for each process running on a router.
Head Total(b) Used(b) Free(b) Lowest(b) Largest(b)
Processor 670A75C0 368411916 107920808 260491108 259476048 250971404
I/O E000000 33554432 7149704 26404728 26383040 26349436
Transient 7D000000 16777216 383716 16393500 16065568 16393476
Allocator PC Summary for: Processor
Displayed first 2048 Allocator PCs only
PC Total Count Name
0x61968230 11620316 45771 EIGRP-Core: DRDB
0x6196DD38 6692788 22930 EIGRP-Core: DNDB
0x62637F10 4442792 267 IPv6 adj
0x61CB796C 4197632 64 IP Flow cache
0x619623B0 3248128 23072 EIGRP: mgd_timer
0x61B3E994 3231588 100 CEF: fib
The Head column - refers to the address (in hexadecimal) of the memory allocation chain.
The Total column - the total of used bytes and free bytes, which are individually shown in their own columns.
The Lowest column - shows the lowest amount of free memory (in bytes) that has been available since the router last booted.
The Largest column - indicates the largest block of available memory.
2) Memory allocation failure
- A memory allocation failure (which produces a MALLOCFAIL error message) occurs when a process attempts to allocate a block of memory and fails to do so.
- One common cause for a MALLOCFAIL error is a security issue.
- For example, a virus or a worm that has infested the network can result in a MALLOCFAIL error.
- Alternatively, a MALLOCFAIL error might be the result of a bug in the router’s version of Cisco IOS.
- You can use the Cisco Bug Toolkit (available from http://www.cisco.com/cgi-bin/Support/Bugtool/launch_bugtool.pl) to research any such known issues with the version of Cisco IOS running on a router.
3) Buffer leak
- Similar to a memory leak, in which a process does not return all of its allocated memory to the router upon terminating, a buffer leak occurs when a process does not return a buffer to the router when the process has finished using the buffer.
- Like a memory leak, a buffer leak might require updating the Cisco IOS image of a router.
R4#show interfacesThese values indicate that an input queue of the interface has a capacity of 75 packets, and that queue currently has 76 packets.
Input queue: 76/75/780/0 (size/max/drops/flushes); Total output drops: 0
This is an oversubscription of the queue space. An interface in this condition is called a wedged interface.
In such a condition, the router does not forward traffic coming into the wedged interface.
R1#show buffersExcessive BGP Memory Use
943 in free list (500 max allowed)
4263548792 hits, 0 misses, 617 created
Public buffer pools:
Small buffers, 104 bytes (total 104, permanent 50, peak 208 @ 7w0d):
98 in free list (20 min, 150 max allowed)
2119618475 hits, 55049 misses, 60759 trims, 60813 created
Interface buffer pools:
Syslog ED Pool buffers, 600 bytes (total 283, permanent 282, peak 283 @ 7w0d):
251 in free list (282 min, 282 max allowed)
773595 hits, 0 misses
Header buffers, 0 bytes (total 512, permanent 256, peak 512 @ 7w0d):
256 in free list (256 min, 1024 max allowed)
Public particle pools:
F/S buffers, 128 bytes (total 512, permanent 512):
0 in free list (0 min, 512 max allowed)
512 hits, 0 misses, 0 trims, 0 created
Private particle pools:
HQF buffers, 0 bytes (total 2000, permanent 2000):
2000 in free list (500 min, 2000 max allowed)
0 hits, 0 misses, 0 trims, 0 created
0 failures (0 no memory)
GigabitEthernet0/1 buffers, 512 bytes (total 1000, permanent 1000):
0 in free list (0 min, 1000 max allowed)
1000 hits, 0 fallbacks
- If a router is running BGP, be aware that BGP runs multiple processes and can consume significant amounts of router memory.
- If BGP is consuming a large percentage of your router memory, you might consider filtering out unneeded BGP routes, upgrading the memory on that router, or running BGP on a different platform that has more memory.
R1#show processes memory | include PID|Free|BGP- Depending on the router platform, your router might have multiple line cards with different amounts of memory available on each line card.
Processor Pool Total: 368411916 Used: 107929020 Free: 260482896
I/O Pool Total: 33554432 Used: 7149504 Free: 26404928
Transient Pool Total: 16777216 Used: 383708 Free: 16393508
PID TTY Allocated Freed Holding Getbufs Retbufs Process
92 0 0 0 10124 0 0 BGP Scheduler
183 0 496107632 0 141332 4219752 4219752 BGP I/O
197 0 0 2873892 10096 0 0 BGP Scanner
228 0 0 0 7096 0 0 BGP Event
309 0 229584 0 236816 0 0 BGP Task
323 0 24671184 499481756 19466776 124 124 BGP Router
- show diag - can help you isolate a specific line card that is running low on memory, perhaps because that line card is running BGP.