Security contexts turn one physical Cisco ASA into many independent virtual firewalls, each with its own interfaces, policies, and administrators. That is straightforward when every context has its own dedicated interfaces. It gets genuinely interesting when contexts have to share a physical interface, because now the firewall has to look at an incoming packet and decide, before it applies any policy, which context that packet belongs to. That decision is made by the classifier, and understanding its rules is the difference between a multi-tenant firewall that works and one that silently sends traffic to the wrong tenant. This article is part of the Cisco ASA series, and it is grounded in a lab where the virtual appliance refused to enter context mode at all. That refusal is real and we will show it.
Why Shared Interfaces Exist
In a clean design, each context owns its own interfaces and there is no ambiguity: a packet arriving on a given physical port belongs to exactly one context. But physical ports are finite, and in a service-provider or large-enterprise deployment you may have more tenants than you have spare interfaces. Sharing an outside interface across several contexts lets many tenants reach the internet through one uplink, or lets many contexts sit behind one common segment, without dedicating a physical port to each. The price of that efficiency is ambiguity: when a packet lands on the shared interface, the ASA can no longer identify the owning context by interface alone. Something has to disambiguate, and that something is the classifier.
The Classifier: How a Packet Finds Its Context
The ASA classifier runs a strict, ordered set of checks on every packet that enters a shared interface. The order matters, because the first rule that produces a unique context wins:
- Unique interface first. If the ingress interface is assigned to only one context, classification is trivial and instant: that context owns the packet. This is the common case and it does not involve the rest of the logic. The interesting rules only apply when an interface is shared by two or more contexts.
- Then the destination address, via the context's configuration. On a shared interface, the ASA uses the packet's destination to find the matching context. Concretely, it looks at how each context that shares the interface is configured to receive traffic for that destination, using either a unique destination MAC address per context or a unique NAT/global address that maps to a single context.
Two mechanisms make the destination-based step unambiguous, and you generally pick one:
- Unique MAC addresses per context. If you enable
mac-address autoin the system configuration, the ASA assigns a distinct virtual MAC to each context's instance of the shared interface. Now the destination MAC in the Layer 2 header identifies the context directly. This is the clean, recommended approach, because it removes all ambiguity at Layer 2 and does not depend on the NAT configuration. - Unique addresses through NAT. Without unique MACs, the classifier falls back to the destination IP as translated by each context's NAT rules. Each context must present a unique global/mapped address on the shared interface so the destination address maps to exactly one context. This works, but it couples classification to your NAT design, and overlapping or missing translations are a frequent cause of misclassified traffic.
If you do not give the classifier a way to produce a unique answer (no unique MAC, no unique destination address), it cannot decide, and the packet is dropped rather than guessed. That fail-closed behavior is correct from a security standpoint but frustrating to debug, because the symptom is simply traffic disappearing on a shared interface with no obvious policy denying it.
Enabling Unique MACs and Sharing an Interface
On a supported hardware platform, the pieces fit together like this. In the system context you turn on automatic MAC generation and allocate the shared interface to multiple contexts:
! system context
mac-address auto
!
context CUSTOMER-A
allocate-interface GigabitEthernet0/0 outside_a
config-url disk0:/ctx-a.cfg
!
context CUSTOMER-B
allocate-interface GigabitEthernet0/0 outside_b
config-url disk0:/ctx-b.cfgBoth contexts now share the same physical GigabitEthernet0/0, each seeing it under its own mapped name, and each with a distinct auto-generated MAC. When a frame arrives on that port, the destination MAC tells the classifier whether it belongs to CUSTOMER-A or CUSTOMER-B before any access rule or NAT policy runs. Inside each context you then configure the interface as if it were an ordinary firewall interface, with its own IP, security level, ACLs, and NAT.
The Real asav Limitation
Everything above assumes you can create contexts in the first place, and that is exactly what our lab could not do. The firewalls are virtual asav 9.24 instances, and the virtual appliance does not support multiple context mode at all. Cisco's documentation is explicit on the point: the ASAv does not support multiple contexts. We confirmed it on the real device. Checking the mode and trying to switch to multiple, this is precisely what came back:
The mode is fixed at single and there is no path to multiple. Because you cannot create contexts, you cannot share an interface between contexts, and the entire classifier discussion is moot on this platform. This is not a bug or a missing license you can add; multiple context mode is simply not part of the asav feature set. The parser reject is the evidence, and it is the honest answer for anyone planning a multi-tenant virtual firewall around asav contexts: they are not there.
What To Use Instead on Virtual
The good news is that virtualization gives you a cleaner way to achieve tenant separation than shared-interface contexts ever did, precisely because the hypervisor already isolates workloads. Instead of one appliance sliced into contexts, you run one appliance per tenant:
mode multiple. Use one of the options above instead.Running a separate asav per tenant trades the density of contexts for the simplicity and hard isolation of a full VM boundary, which is often exactly what a security team wants anyway: a compromise or misconfiguration in one tenant's firewall cannot touch another's, because they are different virtual machines. On the Firepower side, FTD multi-instance carves a single appliance into isolated logical devices, and that is where Cisco has put its modern multi-tenant engineering. If your driver for contexts was multi-tenancy, either of these gives you the separation without the shared-interface classifier complexity. If you genuinely need classic ASA security contexts with shared interfaces (for example to match an existing hardware design or a CCIE lab), that is physical-ASA territory, and you should study it there. Start with the fundamentals in the ASA multiple context mode guide.
Operational Notes and Gotchas
A few things bite people when they first run shared interfaces on hardware. First, if you forget mac-address auto and your NAT does not provide unique destination addresses, the classifier has nothing to work with and traffic is dropped as unclassifiable, which looks like a policy problem but is not. Second, shared interfaces mean the contexts sharing them are on the same Layer 2 segment, so broadcast and multicast behavior and any Layer 2 loops are shared concerns, not per-tenant ones. Third, management traffic to the contexts still has to be classifiable, so a shared management interface needs the same unique-MAC or unique-address treatment as any other shared interface. Fourth, changing whether an interface is shared, or toggling mac-address auto, affects live traffic classification, so treat it as a maintenance-window change rather than a casual edit. None of these apply on asav, of course, because you never get as far as creating the contexts.
A Worked Classification Example
Walking one packet through the logic makes the rules concrete. Picture two tenants, CUSTOMER-A and CUSTOMER-B, both sharing the outside interface GigabitEthernet0/0, with mac-address auto enabled so each context's instance of that interface has a distinct virtual MAC. A client on the internet sends a packet to a public address that CUSTOMER-B advertises. The upstream router ARPs for that address, and because CUSTOMER-B owns that mapped address, it answers with CUSTOMER-B's virtual MAC. The client's packet therefore arrives on GigabitEthernet0/0 with CUSTOMER-B's MAC as the destination in the Layer 2 header. The classifier reads that destination MAC, matches it to CUSTOMER-B, and hands the packet to CUSTOMER-B's context, which then applies CUSTOMER-B's access rules and NAT. CUSTOMER-A never sees the packet.
Now imagine the same topology without unique MACs, relying on NAT instead. The classifier has to look at the destination IP and find the single context whose NAT configuration claims that address. If both contexts happen to have overlapping or unconfigured mappings for that address, the classifier cannot pick a winner and drops the packet. This is why the MAC-based approach is preferred: the disambiguation happens at Layer 2 from the frame itself, and it does not depend on getting every NAT statement across every tenant perfectly non-overlapping. The NAT-based method works, but it makes your classification only as reliable as your translation hygiene.
Verifying Classification on Hardware
When you are debugging a shared-interface deployment on a real ASA, a handful of commands tell you what the classifier is doing. From the system context, show interface and the context allocation output confirm which contexts share which interfaces and what MAC each was assigned. Inside a context, show nat and show xlate confirm the mapped addresses that the classifier depends on when you are using the NAT method. The packet-tracer tool is especially valuable here: you can inject a synthetic packet with a specific destination and watch which context and which phase handles it, which turns an invisible drop into a visible decision. If packet-tracer shows a packet being dropped before any ACL phase on a shared interface, classification is your culprit, and you go back to check unique MACs or unique mapped addresses. Building this verification habit early saves hours, because misclassification never announces itself with a helpful log message; it just looks like traffic that should work and does not.
When Contexts Are Worth It At All
It is worth stepping back and asking whether contexts are even the right tool, shared interfaces or not. Contexts buy you administrative separation (each tenant gets its own config, its own admins, its own policy) on a single piece of hardware, which is attractive when rack space, power, and licensing all favor consolidation. But they come with real constraints: some features are not supported in multiple context mode at all, troubleshooting spans the system context plus each affected context, and a resource-hungry tenant can starve its neighbors unless you cap it (which is the job of resource classes, a closely related multi-context feature). For a lot of designs, especially virtual ones, the cleaner answer is separate firewalls rather than one firewall pretending to be several. That is doubly true on asav, where the choice is made for you: no context mode exists, so per-tenant isolation means per-tenant instances. The shared-interface classifier is a genuinely elegant piece of engineering, but it is engineering you only need when you have committed to packing many tenants onto one physical chassis, which is a hardware decision, not a virtual one.
Key Takeaways
- Security contexts turn one ASA into many virtual firewalls; sharing a physical interface across contexts forces the ASA to classify each packet to an owning context before applying policy.
- The classifier checks the ingress interface first (unique interface wins instantly), then, on a shared interface, uses the destination via a unique per-context MAC address or a unique NAT/global address.
mac-address autogives each context a distinct MAC on the shared interface and is the clean way to remove classification ambiguity; the NAT-based fallback couples classification to your translation design.- If the classifier cannot produce a unique context, the packet is dropped (fail closed), which shows up as traffic silently disappearing on a shared interface.
- On asav 9.24 none of this is reachable:
show modeis single andmode multiplereturns% Invalid input detected at '^' marker.The ASAv does not support multiple contexts. - On virtual, use a separate asav per tenant or FTD multi-instance for isolation; for classic shared-interface contexts you need physical ASA hardware. See the multiple context mode guide and the Cisco ASA pillar.