Home > Articles > Cisco Network Technology > General Networking > Cisco ASA Security Contexts

Cisco ASA Security Contexts

  • Sample Chapter is provided courtesy of Cisco Press.
  • Date: Dec 16, 2005.

Chapter Description

The virtual firewall methodology enables a physical firewall to be partitioned into multiple standalone firewalls. Each standalone firewall acts and behaves as an independent entity with its own configuration, interfaces, security policies, routing table, and administrators. In Cisco ASA, these virtual firewalls are known as security contexts. This chapter covers security contexts in detail.

For more information on Security, visit our Security Reference Guide or sign up for our Security Newsletter

This chapter covers the following topics:

  • Architectural overview
  • Configuration of security contexts
  • Deployment scenarios
  • Monitoring and troubleshooting

The virtual firewall methodology enables a physical firewall to be partitioned into multiple standalone firewalls. Each standalone firewall acts and behaves as an independent entity with its own configuration, interfaces, security policies, routing table, and administrators. In Cisco ASA, these virtual firewalls are known as security contexts.

The following are some example scenarios in which security contexts are useful in network deployments:

  • You act as a service provider and you want to provide firewall services to customers. However, you do not want to purchase additional physical firewalls for each customer.
  • You manage an educational institution and you want to segregate student networks from faculty networks for improved security using one physical security appliance.
  • You administer a large enterprise with different departmental groups, and each department wants to implement its own security policies.
  • You have overlapping networks in your organization and you want to provide firewall services to all of those networks without changing the addressing scheme.
  • You currently manage many physical firewalls and you want to integrate security policies into one physical firewall.

In Figure 9-1, SecureMe, an enterprise headquartered in Chicago, has a Cisco ASA providing firewall services to two of its customers. To implement a cost-effective solution, SecureMe has configured two security contexts in the security appliance: CustA for Customer A and CustB for Customer B. Each customer can manage and administer its own security context without interfering with the other context. On the other hand, the security appliance administrator manages the system execution space, which is discussed in the next section.

09fig01.gif

Figure 9-1 Security Contexts in the ASA

In this figure, each horizontal dotted box represents a security context that has a Cisco ASA inspecting and protecting the packets going through it, while the vertical box represents the physical Cisco security appliance with multiple security contexts.

Architectural Overview

In multiple security context mode, the Cisco security appliance can be divided into three types:

  • A system execution space
  • An admin context
  • One or more customer contexts

All contexts must be configured correctly for proper function. Similar to a real network, in which one misconfigured device can affect the operations of other network devices, misconfiguration of a security context can impact the overall operation of a security appliance.

System Execution Space

Unlike other contexts, the system execution space does not have any Layer 2 or Layer 3 interfaces or any network settings. Rather, it is mainly used to define the attributes of other security context attributes. Here are the three important attributes configured for each context in the system execution space:

  • Context name.
  • Location of context's startup configuration. The configuration of each context is also known as a configlet.
  • Interface allocation.

Additionally, many optional features, such as interface and boot parameters, can be configured within the system execution space. Table 9-1 lists the important features that can be set up through the system execution space.

Table 9-1. Options Available in System Execution Space

Feature

Description

Interface

Sets up physical interfaces for speed and duplex. Interfaces can be enabled or disabled.

Banner

Specifies a login or session banner when connecting to the security appliance.

Boot

Specifies boot parameters to load proper image.

Activation key

Enables or disables security appliance features.

File management

Adds or deletes the security context configurations that are stored locally on the security appliance.

Firewall mode

Configures single- or multiple-mode firewall in the system execution space.

Failover

Sets the failover parameters to accommodate multiple physical security appliances.

The system execution space configuration resides in the nonvolatile random-access memory (NVRAM) area of the security appliance, while the configurations for security contexts are stored either in local Flash memory or on a network storage server using one of the following protocols:

  • TFTP
  • FTP
  • HTTPS
  • HTTP

The system execution space designates one of the security contexts as the admin context, which is responsible for providing network access when the system needs to contact resources. The admin context is discussed next.

Admin Context

The admin context provides connectivity to network resources, as mentioned earlier. The IP addresses on the allocated interfaces can be used for remote management purposes, such as SSH or Telnet. The security appliance also uses the IP addresses to retrieve configurations for other contexts if they are located on a network share. A system administrator with access to the admin context can switch into the other contexts to manage them. The security appliance uses the admin context to send the syslog messages that relate to the system.

The admin context must be created before defining other contexts. Additionally, it must reside on the local disk. A new admin context can be designated at any time by using the admin-context command, which is discussed in the "Configuration of Security Context" section, later in this chapter.

When a Cisco ASA is converted from single mode to multi-mode, the network-related configuration of the single-mode security appliance is saved as the admin context. The security appliance names this context as, admin.

The admin context configuration is similar to a customer context. Aside from its relationship to the system execution space, it can be used as a regular context. However, using it as a regular context is not recommended, because of its significance.

Customer Context

Each customer context acts as a virtual firewall with its own configuration that contains almost all the options that are available in a standalone firewall. Table 9-2 lists the differences between a security appliance running in single mode and an appliance running in multiple mode.

Table 9-2. Contrasting Single- and Multiple-Mode Firewalls

Feature

Single Mode

Multiple Mode

Interface

All physical interfaces are available for use.

Only allocated interfaces are available in the contexts.

File management

Allows an administrator to copy system images and configurations.

Restricts a context administrator to manage the context configurations.

Firewall management

Allows a system administrator to fully manage the security appliance.

Allows a context administrator to manage the context.

Addressing scheme

Does not allow overlapping networks.

Allows overlapping networks between the contexts.

Routing protocols

Supports RIP and OSPF as the dynamic routing protocols.

Does not allow any dynamic routing protocols.

Licensing

There are no security contexts in single mode, hence no license is needed to turn on the security contexts.

Needs a license to activate more than two security contexts. The default license includes two customer security contexts and an admin context.

Resource allocation

The security appliance uses all the available resources.

The security appliance shares the system resources between the contexts.

Failover

Does not allow Active/Active failover.

Allows Active/Active failover for redundancy and load-balancing.

Quality of service

Supports QoS.

Does not support QoS.

Multicast

Supports multicast using PIM-SM.

Does not support multicast.

VPN

Supports remote access and site-to-site VPN tunnels.

Does not support VPNs.

The number of customer contexts depends on the installed activation key. To find out how many customer contexts are allowed on a security appliance, look at the security context information in show version, as shown in Example 9-1. In this example, the ASA can have up to five customer contexts.

Example 9-1. Verifying the Number of Security Contexts

Chicago# show version | include Security Contexts
Security Contexts            : 5

Packet Flow in Multiple Mode

When the packets traverse through the security appliance in multiple mode, they are classified and forwarded to the right context. The packets are then processed based on the configured security policies on a context. The packet classification and the forwarding mechanism are discussed in the following subsections.

Packet Classification

In multiple mode, the security appliance must classify the packets to find out which context should operate on them. The packet classification is done at the ingress interface point that tags the packets using the source IP address, source port, destination IP address, destination port, and the interface or VLAN. The packet is processed based on the security policies configured in that context. Cisco ASA uses the following fields or packet identifiers to classify them properly:

  • Source interface— If all the contexts in the Cisco ASA use unique interfaces, the packet classification becomes easier because the security appliance classifies these packets based on the source interface. As illustrated in Figure 9-2, when the packet is sourced from 192.168.10.10, the classifier assigns the packet to context CustA because the packet originated from G0/0, which is a part of the CustA security context.
    09fig02.gif

    Figure 9-2 Packet Classification Using Source Interface

  • Destination IP address— The security appliance allows you to share one or more interfaces between the security contexts. In this deployment model, the shared interface uses the same network space with unique IP addresses on the end hosts. If the security appliance is configured to use a shared ingress interface, then it uses the destination IP address to further clarify which of the security contexts using the shared interface should receive the packets. In this case, the security contexts within the Cisco ASA cannot use overlapping IP addresses, and therefore all destination IP addresses must be unique.

Packet Forwarding Between Contexts

In multiple mode, the two contexts communicate with each other as if two standalone appliances were communicating with one another. The security contexts can talk to each other in two ways:

  • Without a shared interface
  • With a shared interface

Depending on what mode you use, the packet flow is different, as discussed in the following subsections.

Forwarding Without a Shared Interface

As Figure 9-3 illustrates, SecureMe's ASA has four interfaces: two of them belong to the CustA context and the remaining two are allocated to CustB. The outside interface of both contexts is connected to Router1, which is responsible for routing packets from one context to another.

09fig03.gif

Figure 9-3 Security Contexts Without a Shared Interface

If NAT and packet filtering are set up on the security appliance, then the following sequence of events takes place when Host A sends an ICMP ping packet to Host B:

  1. Host A sends an ICMP ping packet with a source address of 192.168.10.10 and a destination address of 192.168.20.10. The classifier tags the packet coming in on GigabitEthernet0/0 before sending it to the inside interface of CustA.
  2. The packet is inspected by the inbound ACL and, if allowed, forwarded to the NAT engine for translation. The NAT engine translates the source address or leaves it unchanged as dictated by the configured policy. Before the security appliance forwards it to Router1, the packet is inspected by the outbound ACL to ensure that it is allowed to leave.
  3. Router1 checks the destination IP address in the routing table and sends the packet to the G0/2 interface on the security appliance.
  4. The appliance classifies the packet before sending it to the outside interface of the CustB context, where it is inspected by the inbound ACL. If it is allowed in, the packet passes through the NAT engine to determine if it needs to be translated.
  5. The security context forwards the packet to Host B after verifying that the outbound ACL on the inside interface does not deny it.

Forwarding with a Shared Interface

Figure 9-4 illustrates another network topology, where SecureMe uses a shared outside LAN interface. To provide Internet connectivity, it has Router1 connected to the same shared interface. Using the shared interfaces, SecureMe can conserve the address space and the allocated interfaces. Additionally, shared contexts are useful when multiple security contexts need access to one public interface to get Internet connectivity.

09fig04.gif

Figure 9-4 Security Contexts with a Shared Interface

Using the previous example, when Host A sends an ICMP ping packet to Host B, the following steps are taken for successful communication:

  1. Host A sends an ICMP ping packet with a source address of 192.168.10.10 and a destination address of 209.165.200.231, which can be translated by context CustB to 192.168.20.1. The classifier tags the packet coming in on GigabitEthernet0/0 before sending it to the inside interface of CustA.
  2. The packet is inspected by the inbound ACL and, if allowed, forwarded to the NAT engine for translation. The NAT engine translates the source address or leaves it unchanged as dictated by the configured policy. The packet is then inspected by the outbound ACL to ensure that it is allowed to leave.
  3. The packet passes through the context classifier, which looks at the destination IP address and forwards it to the outside interface of the CustB security context because 209.165.200.231 is owned by CustB.
  4. The security context of CustB applies security policies after receiving the packet on the outside interface. The packet enters CustB's security context, where it is inspected by the inbound ACL. If it is allowed in, the NAT engine translates the destination address to 192.168.20.10.
  5. The security context forwards the packet to Host B after verifying that the outbound ACL on the inside interface does not deny it.
2. Configuration of Security Contexts | Next 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.

Overview

Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Cisco Press products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@ciscopress.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security

Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children

This site is not directed to children under the age of 13.

Marketing

Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out

Users can always make an informed choice as to whether they should proceed with certain services offered by Cisco Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.ciscopress.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links

This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020