Academy/VCAP — VCF Networking (3V0-25.25)/DFW Multi-Tier Micro-Segmentation
This lab targets VCF 9.0

DFW Multi-Tier Micro-Segmentation

VCF 9.0Intermediatevcap-advanced⏱ 75 min

Objectives

  • Create NSX groups for web, app, db tiers. Deploy DFW rules enforcing intra-tier isolation and inter-tier allow.

Prerequisites

VCF lab environment deployed and operational

Lab Environment

Standard VCF lab environment for Advanced VCF 9.0 Networking (NSX & Advanced Routing)

Tasks

Task 1 DFW Multi-Tier Micro-Segmentation

Create NSX groups for web, app and db tiers, then deploy DFW rules enforcing intra-tier isolation and inter-tier allow, finishing by tightening the default rule from its out-of-the-box Allow to Drop.

Step 1

Create tag-based security groups for each tier — In NSX Manager go to Inventory > Groups > Add Group. Create three groups — sg-web, sg-app, sg-db — each with Membership Criteria of Virtual Machine > Tag > Equals (tier|web, tier|app, tier|db). Tag the VMs first under Inventory > Virtual Machines > Actions > Edit Tags. Tag-based membership is dynamic: a newly deployed VM with the right tag joins its group automatically, which is why this is preferred over static VM lists in environments where VMs are frequently created and destroyed.

Step 2

Build the inter-tier allow rules — Under Security > Distributed Firewall, create a policy 'App-3Tier' in the Application category. Add rules in order: (1) Any -> sg-web, HTTPS 443, Allow. (2) sg-web -> sg-app, the app port (e.g. TCP 8080), Allow. (3) sg-app -> sg-db, the DB port (e.g. TCP 5432), Allow. Set Applied To on every rule to the specific group rather than DFW-wide — this limits rule realization to the relevant vNICs and keeps the datapath rule table small.

Step 3

Enforce intra-tier isolation — Add a rule sg-web -> sg-web with service Any and action Drop (repeat for sg-app and sg-db) to prevent east-west movement between peers in the same tier. This is the micro-segmentation step that stops a compromised web VM from reaching its siblings. Verify with a ping or SSH attempt between two web VMs.

Step 4

Tighten the default rule — Locate the last rule in the Application category. Out of the box the DFW default rule is set to ALLOW — there is no implicit deny — so unmatched traffic is currently permitted. Once you have confirmed your allow-list rules work, change its action to Drop (or Reject) and publish. Enable logging on it so unmatched traffic is visible in the logs. The rule cannot be deleted or disabled, only changed.

Step 5

Validate realization and troubleshoot a drop — Use Traceflow (Plan & Troubleshoot > Traceflow) between a web and a db VM to confirm which rule drops the packet. On the ESXi host, confirm the rules are realized in the datapath with 'vsipioctl getrules -f <filter-name>' after finding the filter via 'vsipioctl getfilters'. Cross-check the rule ID reported by Traceflow against the published rule.

Validation Gate

Check: Verify lab completion

Expected: Lab exercise completed successfully

Common Errors

DFW rules in wrong category causing unexpected behavior
Fix: DFW categories process in order: Emergency → Infrastructure → Environment → Application. A deny rule in Environment blocks traffic before an allow rule in Application can match. Place broad isolation rules in Environment, application-specific rules in Application.
Security groups based on IP addresses instead of tags
Fix: IP-based groups require manual updates when VMs are added/moved. Tag-based groups automatically include VMs with matching tags. Use NSX tags (tier:web, tier:app, tier:db) and tag-based security groups for dynamic membership. Apply tags via VCF Automation templates for consistency.
Testing DFW rules in production without staging in a test environment
Fix: A misconfigured deny-all rule can isolate every VM in the domain. Always: (1) test rules in a non-production domain first, (2) use the 'Applied To' field to limit scope, (3) keep an Emergency category allow-all rule ready to activate if needed.

Final Validation

Lab completed successfully

✓ All steps completed → No errors observed

Cleanup / Restore

• Revert to snapshot if needed

Design Reflection (VCDX)

DFW micro-segmentation is the most commonly tested NSX topic in VCDX. Panelists ask about category ordering, Applied-To optimization, and how you prevent accidental lockout.

⚠ Known Pitfalls (from Community KB)

Placing deny rules in a category that processes before the intended allow rules — blocks legitimate traffic.
Not having an Emergency allow-all rule ready — a DFW misconfiguration can lock out the entire domain.
Was this page useful?
Type to search. ↑ ↓ to move, Enter to open, Esc to close.