High Memory Utilization
If you cannot make a new connection across the PIX firewall, but your existing connections are working well, most likely you are running into low memory issues. Work through the steps that follow to identify and correct the problem:
Step 1. | Check the amount of free memory available with the following command: PIX# show memory This output will show the memory available. If free memory is low, investigate the reason for the low memory. | |
Step 2. | Analyze the syslog message to find out if you received the following message for running short of memory: %PIX-3-211001: Memory allocation Error | |
Step 3. | Identify what is utilizing the memory (RAM) most heavily on the PIX. Before you can make that identification, you must know how memory is utilized on the PIX. Several things use up memory, such as the PIX image (run from RAM), configuration, the IPsec database, Xlates (translations), and connections. Most of the time, if the problem appears suddenly, the problem is with either translations or connections. So, you need to check the translations count with the show xlate command as shown below: PIX# show xlate count The translation count in this example looks normal. Now, quickly find the connection count with the following command: PIX# show conn count So, it appears that with only 350 translations, 16,1723 connections are made, which is an indication that your network may be infected by a virus or worm. | |
Step 4. | Now analyze the traffic load and find out from which interface the vast majority of traffic is coming. You can find this information with the command shown in Example 3-23. Example 3-23. Examining Traffic Load with the show traffic Command
| |
Step 5. | Identify the hosts that are generating all the connections. Example 3-24 shows how to find out the hosts that are generating all these connections: Example 3-24. Identifying Hosts that Are Generating All These Connections
| |
Step 6. | Now that you have found the host that is generating all this traffic, look at the connections, and find the details of the type of connection as shown in Example 3-25. Example 3-25. Connections Generated by the Host
| |
Step 7. | To cure the problem, patch the machine, and take any other actions recommended by the anti-virus software vendor. If the patch is not possible immediately, shut down the machine and unplug it from the network. | |
Step 8. | As a temporary work-around, you can limit the maximum number of connections for the specific host as follows: PIX(config)# nat (inside) 1 10.1.1.100 255.255.255.255 50 0 For the remainder of the network, configure for unlimited connections as follows: PIX(config)# nat (inside) 1 0.0.0.0 0.0.0.0 0 0 Finally, be sure to clear the local host with the following command: PIX(config)# clear local-host 10.1.1.100 | |
Step 9. | If the memory is leaked by a specific process, you may run into problem with memory on the PIX firewall even under normal load of traffic. Under this circumstance, use the output of show process memory over time to see which process is continually getting more memory allocated, but not freeing it back. Then look for specific bug on the code. |
Large ACL
ACL comprises multiple Access Controls Elements (ACEs), which are processed sequentially in top-down fashion. So, it is very important that you configure the entries that are most likely to be matched towards the top of the access-list. The performance impact of an access-list increases linearly with the increase in the number of ACEs. So, try to summarize the address ranges of the ACEs as much as possible. The smaller the list is, the less the CPU is used and the shorter the time required to search sequentially for an entry. If you have a huge number of ACEs even after summarization, configure turbo ACL. Note that the turbo ACL feature is available only on PIX Firewall Version 6.2 and above.