Home > Articles > Cisco > CCNA Security

CCNA Security: The Zone-Based Firewall

A very welcome new addition in the CCNA, CCNP, and CCIE Security tracks is the Cisco IOS Zone-Based Firewall. This article aims to guide you through this new technology from Cisco. As you will see, this new feature is actually combining earlier Cisco features like the Modular Quality of Service Command Line Interface (MQC) and Context Based Access Control (CBAC).
Like this article? We recommend

    Female Voice: Don’t tell me which zone’s for stopping and which zone’s for loading! Male Voice: Listen, Betty, don’t start your white zone $%@# again. There is just no stopping in the white zone.

    Airplane (1980)

A very welcome new addition in the CCNA, CCNP, and CCIE Security tracks is the Cisco IOS Zone-Based Firewall. This article aims to guide you through this new technology from Cisco. As you will see, this new feature is actually combining earlier Cisco features like the Modular Quality of Service Command Line Interface (MQC) and Context Based Access Control (CBAC).

I first wrote about the Zone-Based Firewall in the CCNA Security Quick Reference Sheets from Cisco Press. This was back in July of 2008. Not much has changed with the technology since then, but my goal in this article is to go much further than I was able to go in that intentionally-condensed coverage. If this document wets your appetite, then be sure to check out the more expansive Official Guides from Cisco Press. Again, realize this important technology appears in the Associate, Professional, and Expert levels of Cisco Certification.

The Zone-Based Firewall first appeared in the Cisco IOS version 12.4(6)T release. Cisco’s goal with this security invention was to provide an intuitive and straightforward policy design approach for multiple interface routers. The early CBAC technology was very well received, but it did not provide a high level of granularity for the application of complex security policies. That approach to router-based firewalling was also cursed with an interface by interface configuration that could become quite nightmarish when dealing with multiple internal, external, and DMZ interfaces.

The Configuration

With the Zone-Based Firewall, we take interfaces and place them into a new logical router structure called a zone. A zone is used to define interfaces that will share a security treatment. Cisco automatically designates a special zone for us called the Self Zone. This important zone is used for controlling traffic that is sourced from or directed to the router itself.

The zones we create are placed into zone pairs. A great example is having a simple Inside Zone paired with an Outside Zone. You then apply a unidirectional security treatment to the zone pair. Special-purpose security class-maps are used to define the traffic that we want to apply policy to. Sure enough, special-purpose policy-maps are used to define the policy, and finally, service policies are used to assign these zone-based policy-maps to zone pairs. For those readers familiar with the decade-plus old MQC on Cisco routers, this sounds very familiar indeed.

When you are assigning policy to a zone pair in a particular direction, you use the options of DROP, PASS, or INSPECT. DROP is obvious. The traffic matching the class-map is dropped. PASS is also obvious. The traffic is not treated or analyzed in any special manner; it is simply passed from one zone to another and defined in the zone pair. The INSPECT option is the important one. This does stateful inspection (think CBAC) on the traffic as defined in the class-maps.

Here is an example. Perhaps you have Fa0/0 and Fa0/1 that connect to private networks in your company. Your interface S0/0 connects to the public Internet. The steps for the Zone-Based Firewall configuration are as follows:

    Step 1 Define and populate zones.

    Step 2 Define the class-maps that identify traffic flowing between zones.

    Step 3 Configure a policy-map that specifies actions for the traffic.

    Step 4 Configure the zone pair and apply the policy.

Given our scenario, here are the configurations for these steps.

    Step 1 Define and populate zones:

    configure terminal
    zone security ZONE_PRIV
    zone security ZONE_INT
    interface range fa0/0 - 1
    zone-member security ZONE_PRIV
    interface s0/0
    zone-member security ZONE_INT

Notice the important new commands here: zone security for the creation of the zone in Global Configuration mode, and zone-member security in Interface Configuration mode for the assignment of interfaces to zones.

    Step 2 Define the class-maps that identify traffic flowing between zones:

    configure terminal
    class-map type inspect match-any CM_NET_TRAFFIC
    match protocol http
    match protocol https
    match protocol ftp

Notice the special class-map here of type inspect. We have to specify that this class-map is a match-any since we are looking for http, or https, or ftp traffic. Any traffic that does not match any of these definition will fall into a class-map automatically created by Cisco called the class-default class-map. You can specify policy for this “catch-all” class just like you can your user-defined classes.

    Step 3 Configure a policy-map that specifies actions for the traffic:

    configure terminal
    policy-map type inspect PM_PRIVATE_TO_INTERNET
    class type inspect CM_NET_TRAFFIC

Here is the creation of our policy-map. Notice that it is also of the special type inspect. There is nothing much to configure under Policy-map Configuration mode. Perhaps you might want to add a text-based description to the structure. It is typical to immediately reference the class-map that you want to effect with a policy. In our example here, we are making sure to inspect the http, https, and ftp traffic. This means the router will dynamically permit this traffic out from one zone to another, and dynamically allows the appropriate response traffic back in. Should traffic from the outside Internet attempt to initiate connections from the outside, they will be dynamically blocked. We remember all of this behavior from the older CBAC.

    Step 4 Configure the zone pair and apply the policy:

    configure terminal
    zone-pair security ZONEP_PRIV_INT source ZONE_PRIV destination ZONE_INT
    service-policy type inspect PM_PRIVATE_TO_INTERNET

Notice how the unidirectional nature of the zone pair is specified. The zone-pair security command specifies the source and the destination.

The Verification

It is critical to verify and then monitor the success of your Zone-Based Firewall. What is the key command to do this? It is:

show policy-map type inspect zone-pair

Here is an example of this command in action:

SampleRouter#show policy-map type inspect zone-pair
Service-policy inspect : PM_T1_T2
Class-map: CM_TEST (match-any)
Match: protocol telnet
5 packets, 120 bytes
30 second rate 0 bps
Packet inspection statistics [process switch:fast switch]
tcp packets: [0:40]

Be sure to test, and test, and test some more with your configuration in a lab or pilot environment prior to deploying into the production network.

The Caveats

Now that you have mastered the basics of the Zone-Based Firewall and its configuration, it is important that you master the caveats of this new and exciting Cisco router feature:

  • Configure your zones first as we demonstrated. A zone must be configured before you can assign interfaces to the zone.
  • You can assign an interface to only one security zone.
  • Traffic is always implicitly allowed to flow between interfaces within the same zone.
  • To permit traffic to and from a zone member interface, you must configure a policy allowing or inspecting traffic between that zone and any other zone.
  • Traffic cannot flow between a zone member interface and any interface that is not a zone member.
  • Interfaces that have not been assigned to a zone function as classic router ports. These ports are still capable of receiving a classic CBAC configuration.

Pearson IT Certification Promotional Mailings & Special Offers

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


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Pearson IT Certification 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.


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.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.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.


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


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


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.


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe 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.pearsonitcertification.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.


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