PAN-OS: Panorama Device Group Hierarchies (PCNSE 4.2.1)

PCNSE Objective Focus (Domain 4 - 18%)

4.2 Configure device groups

Introduction: Organizing Policies and Objects

In Panorama, Device Groups are fundamental organizational containers used to manage Policies (Security, NAT, QoS, Decryption, etc.) and related Objects (Addresses, Services, Security Profiles, etc.) that are pushed to groups of managed firewalls.

Just as firewalls often have varying network configurations (handled by Templates), they also frequently require different sets of policies based on their function, location, or trust level. Panorama allows administrators to create a hierarchy of Device Groups to manage these policy sets efficiently through inheritance.

Understanding Device Group hierarchies is crucial for scalable, maintainable, and logically structured policy management in Panorama.

Device Group Hierarchy Concept

Parent-Child Relationships

Configuration Inheritance

      graph TD
          Shared[Shared Scope\nGlobal Objects/Policies] --> DG_Corp(DG: Corporate-Base\nCommon Policies/Objects)
          DG_Corp --> DG_Region(DG: Region-NA\nNA-Specific Policies)
          DG_Region --> DG_Branch(DG: Branch-Type-A\nBranch-Specific Policies)
          DG_Region --> DG_DC(DG: DC-Primary\nDC-Specific Policies)
          DG_Branch --> FW1[FW1 - Branch A]
          DG_Branch --> FW2[FW2 - Branch A]
          DG_DC --> FW3[FW3 - DC Primary]

          style Shared fill:#eaf2f8,stroke:#aed6f1,stroke-width:2px
          style DG_Corp fill:#d5f5e3,stroke:#58d68d,stroke-width:1px
          style DG_Region fill:#d5f5e3,stroke:#58d68d,stroke-width:1px
          style DG_Branch fill:#fdebd0,stroke:#f5b041,stroke-width:1px
          style DG_DC fill:#fdebd0,stroke:#f5b041,stroke-width:1px
          style FW1 fill:#e9ecef,stroke:#adb5bd
          style FW2 fill:#e9ecef,stroke:#adb5bd
          style FW3 fill:#e9ecef,stroke:#adb5bd

          linkStyle 0 stroke-dasharray: 5 5
          linkStyle 1 stroke-width:2px
          linkStyle 2 stroke-width:2px
          linkStyle 3 stroke-width:2px
          linkStyle 4 stroke-width:2px



      
Example Device Group Hierarchy. FW1 inherits from Shared, Corporate-Base, Region-NA, and Branch-Type-A.

Policy Evaluation Order (Pre- and Post-Rules)

Within each Device Group (including Shared), policies are further divided into Pre-rules and Post-rules .

Combined Evaluation Order on Firewall:

When Panorama pushes the merged configuration, the firewall evaluates rules in this strict order:

  1. Panorama Shared Pre-rules
  2. Parent Device Group(s) Pre-rules (Top-down in hierarchy)
  3. Local Firewall Pre-rules (Not managed by Panorama DG/Template - Generally discouraged)
  4. Child Device Group Pre-rules (The DG the firewall belongs to)
  5. Local Firewall Rules (Rules created directly on the firewall GUI - if allowed)
  6. Child Device Group Post-rules
  7. Parent Device Group(s) Post-rules (Bottom-up in hierarchy)
  8. Panorama Shared Post-rules

This order ensures that broader, inherited rules (especially cleanup rules in Post-rules) don't inadvertently override more specific rules defined closer to the device (Child DG or Local FW rules).

Benefits of Using Device Group Hierarchies

Best Practices

Caveats and Gotchas

PCNSE Exam Focus

For the PCNSE exam, concerning Device Group Hierarchies:

Device Group Hierarchy Quiz

1. What types of configurations are primarily managed within Panorama Device Groups?

Device Groups are the primary containers for managing policy rulesets (Security, NAT, etc.) and the objects referenced within those policies. Network and Device settings are managed via Templates/Stacks.

2. What is the main benefit of creating a Device Group hierarchy (parent-child structure)?

Hierarchies allow child Device Groups to inherit configurations from their parents (and Shared), promoting reusability and enabling layered policy management.

3. What is the difference between Pre-rules and Post-rules within a Device Group configuration?

Pre-rules are evaluated before device-specific rules (Child DG pre-rules and local FW rules), making them suitable for global enforcement. Post-rules are evaluated after all other rules, making them suitable for default cleanup actions.

4. A firewall belongs to `DG-Branch-A`, which is a child of `DG-Region-NA`, which is a child of `DG-Corporate`. Which Device Group's policies/objects are applied to the firewall?

A firewall inherits the merged configuration from its entire hierarchy path, starting from Shared (if used), down through all parent Device Groups, to the specific Device Group it belongs to.

5. In the overall firewall policy evaluation order, where do rules created locally on the firewall typically fall?

Local firewall rules are evaluated after all inherited Pre-rules (Shared, Parent DGs, Child DG) but before any Post-rules (Child DG, Parent DGs, Shared). This allows local exceptions or specific rules to take precedence over inherited Post-rules like default denies.

6. An administrator wants to create a baseline Security Policy rule to block specific high-risk applications for ALL firewalls managed by Panorama. Where is the most appropriate place to configure this rule?

For rules that must be enforced globally and take precedence, configuring them as Pre-rules at a high level in the hierarchy (like a top-level DG or even Shared, depending on scope) ensures they are evaluated first across all inheriting firewalls.

7. Which configuration component is typically managed using Templates/Template Stacks rather than Device Groups?

Templates and Template Stacks are used for Network and Device settings, which include interface configurations. Policies and Objects (like Address Objects and URL Filtering Profiles) are managed within Device Groups.

8. What is the maximum depth allowed for a Device Group hierarchy below the 'Shared' scope?

Panorama supports a maximum nesting depth of four Device Group levels beneath the top-level 'Shared' context.

9. If an Address Object with the name 'Server-A' is defined in both a Parent Device Group and a Child Device Group, which definition will be used by a policy rule within the Child Device Group?

Similar to rule precedence, objects defined at a lower (more specific) level in the hierarchy override objects with the same name defined at higher (more general) levels. The Child DG's definition takes precedence for policies within that Child DG.

10. Where are Post-rules typically used in a Device Group hierarchy?

Because Post-rules are evaluated last in the overall sequence (after all Pre-rules and local rules), they are ideal for implementing universal cleanup rules (like deny-any-any) that should only apply if no other specific rule has matched the traffic.

References