Blog

  • Cisco ACI Taboo Contract vs vzAny Contract: Complete Guide with Configuration Examples

    If you’ve been working
    with Cisco ACI contracts and wondering when to use a Taboo Contract versus
    a vzAny Contract, you’re not alone. These two policy constructs are
    among the most misunderstood concepts in ACI — and using the wrong one in a
    production environment can lead to unexpected traffic flows, TCAM exhaustion,
    or even serious security gaps.

    In this guide, I’ll
    break down both contract types from the ground up, explain exactly when to use
    each one, walk through configuration steps in APIC, and share real-world
    lessons from 10 years of deploying and troubleshooting Cisco ACI and Nexus
    environments (CCIE DC #XXXXX).

    Table of Contents

    1. What
      are ACI Contracts?
    2. What
      is a Taboo Contract?
    3. What
      is a vzAny Contract?
    4. Taboo
      vs vzAny: Full Comparison Table
    5. Configuring
      a Taboo Contract in APIC
    6. Configuring
      vzAny in APIC
    7. TCAM
      Impact: What You Need to Know
    8. Real-World
      Use Cases
    9. Which
      One Should You Choose?
    10. Common
      Mistakes to Avoid
    11. FAQ

    1. What are ACI
    Contracts?

    Before diving into
    Taboo and vzAny, it’s worth quickly grounding ourselves in ACI’s policy model.
    In Cisco ACI, contracts are the mechanism that controls
    traffic between Endpoint Groups (EPGs). By default, ACI operates on an
    implicit-deny model — no traffic flows between EPGs unless a contract
    explicitly permits it.

    A standard ACI
    contract consists of:

    • Subjects — a grouping of filters applied to a traffic flow
    • Filters — define the traffic (protocol, port, direction)
    • Provider EPG — the EPG offering the service
    • Consumer EPG — the EPG consuming the service

    Taboo Contracts and
    vzAny Contracts are special variations of this model that serve very different
    purposes — one is designed to deny traffic, and the other
    to simplify large-scale policy across an entire VRF.

    2. What is a Taboo
    Contract?

    A Taboo
    Contract
     is a special ACI contract type used to explicitly
    deny specific traffic
     for an EPG. Think of it as a blacklist — you use
    it when you want to block a particular type of traffic that would otherwise be
    permitted by a broader “permit-all” contract or contract preferred
    group.

    The name
    “Taboo” reflects its intent: traffic matched by a Taboo Contract
    is forbidden. It operates at the EPG level and is typically used
    alongside other contracts that permit broader access.

    Key characteristics
    of Taboo Contracts:

    • Applied directly to an EPG (not a VRF)
    • Works as a deny override —
      takes precedence over permit contracts
    • Requires manually creating filters for the
      traffic you want to block (e.g., TCP port 23 for Telnet, TCP port 80 for
      HTTP)
    • Generates TCAM entries per filter — the
      more granular your filters, the more TCAM it consumes
    • Cisco generally discourages Taboo
      Contracts unless absolutely necessary, because misconfiguration can cause
      unintended outages

    Important: Taboo Contracts were designed for
    specific use cases — primarily to block cleartext or insecure protocols
    (Telnet, FTP, HTTP) when a broader permit contract is already in place. They
    are not a general-purpose security tool and should be used
    sparingly.

    Typical Taboo
    Contract use case:

    Imagine your security
    policy mandates that no EPG should ever communicate over Telnet (TCP 23) or
    unencrypted HTTP (TCP 80), even if a broader “permit-all” contract
    exists. Rather than modifying every single contract across your fabric, you apply
    a Taboo Contract directly to the EPGs in question, creating a deny entry that
    overrides any existing permits for those specific ports.

    3. What is a vzAny
    Contract?

    vzAny is a special managed object in Cisco ACI
    that represents all EPGs within a VRF. When you associate a
    contract with vzAny, that contract automatically applies to every EPG in that
    VRF — both as a provider and as a consumer simultaneously.

    In practical terms,
    vzAny is ACI’s way of saying “apply this policy to everything in this VRF
    at once.” It is the most efficient way to enable intra-VRF communication
    or to apply a common policy across a large number of EPGs without creating individual
    contract relationships for every pair.

    Key characteristics
    of vzAny:

    • Operates at the VRF level —
      affects all EPGs inside that VRF
    • Acts as both provider and consumer
      simultaneously, creating a “wildcard” relationship
    • Dramatically reduces the number of
      contract relationships needed in large environments
    • Optimises TCAM — instead of n² contract entries for
      n EPGs, vzAny creates a single group-level entry
    • Must be used carefully in multi-tenant
      environments to avoid unintended traffic leaks between tenants
    • Recommended for large-scale deployments
      where many EPGs need common policy

    Pro tip: vzAny is especially powerful when
    combined with the “prefer” option for intra-EPG isolation. You can
    allow broad intra-VRF communication via vzAny while still enforcing stricter
    policies between specific EPGs using targeted contracts.

    Typical vzAny use
    case:

    In a large enterprise
    environment with 50+ EPGs across a VRF, you want all EPGs to communicate freely
    with a shared set of services (DNS, NTP, monitoring). Without vzAny, you’d need
    to create individual provider/consumer relationships for every EPG — that’s
    potentially hundreds of contract associations. With vzAny, you create one
    contract, associate it with vzAny as the consumer, and the shared-service EPG
    as the provider. Done.

    4. Taboo vs vzAny:
    Full Comparison Table

    Aspect

    Taboo Contract

    vzAny Contract

    Primary Purpose

    Explicitly deny
    specific traffic types for an EPG

    Apply contracts to
    all EPGs within a VRF simultaneously

    How It Works

    Acts as a deny filter — overrides permit contracts
    for matched traffic

    Acts as a wildcard — represents every EPG in the VRF
    as both provider and consumer

    Scope of
    Application

    Individual EPG level

    Entire VRF level —
    all EPGs inside it

    Primary Use Case

    Block insecure protocols (Telnet, FTP, HTTP) or
    specific ports

    Enable free intra-VRF communication or simplify
    many-to-one service consumption

    Configuration
    Complexity

    Higher — requires
    manual filter creation per protocol/port to deny

    Lower — one contract
    association covers all EPGs automatically

    TCAM Usage

    Can be high — each filter creates additional TCAM
    entries per leaf

    Optimised — single group-level entry significantly
    reduces TCAM consumption

    Traffic Direction
    Impact

    Affects only the
    specific EPG it is applied to

    Affects all EPGs in
    the VRF — bidirectional impact

    Multi-tenant Safety

    Safe — scoped to specific EPG

    Risky if misconfigured — can cause unintended
    cross-tenant traffic leaks

    Best Practice

    Use sparingly — only
    when a specific deny is required and cannot be achieved by restructuring
    contracts

    Recommended for
    large-scale environments with shared services or open intra-VRF communication
    needs

    Cisco Recommendation

    Generally discouraged unless absolutely necessary

    Recommended for efficient policy management at scale

    Interaction with
    Other Contracts

    Overrides permit
    contracts — deny takes precedence

    Works alongside
    EPG-specific contracts — EPG contracts take precedence where defined

    Limitations

    Not suitable for inter-EPG communication control at
    scale; increases TCAM pressure

    Must follow strict guidelines to avoid unintended
    traffic leaks across EPGs or tenants

    5. Configuring a
    Taboo Contract in APIC

    Here’s a step-by-step
    walkthrough of configuring a Taboo Contract to block Telnet (TCP 23) traffic
    from an EPG:

    Step 1 — Create the
    Filter

    1. In APIC, navigate to Tenants →
      [Your Tenant] → Contracts → Filters
    2. Right-click Filters and
      select Create Filter
    3. Name it something descriptive: deny-telnet-filter
    4. Add a Filter Entry:
      • Name: block-tcp-23
      • EtherType: IP
      • IP Protocol: TCP
      • Destination Port From: 23
      • Destination Port To: 23
    5. Click Submit

    Step 2 — Create the
    Taboo Contract

    1. Navigate to Tenants → [Your
      Tenant] → Contracts → Taboo Contracts
    2. Right-click and select Create
      Taboo Contract
    3. Name it: block-insecure-protocols
    4. Under Subjects, add a Subject:
      • Name: deny-telnet
      • Associate the filter: deny-telnet-filter
    5. Click Submit

    Step 3 — Apply the
    Taboo Contract to an EPG

    1. Navigate to Tenants → [Your
      Tenant] → Application Profiles → [Your AP] → [Your EPG]
    2. Under the EPG, find Taboo
      Contracts
    3. Right-click and select Add Taboo
      Contract
    4. Select block-insecure-protocols
    5. Click Submit

    Caution: Always verify the Taboo Contract is
    working as expected in a lab or lower environment before applying it to
    production EPGs. Use the APIC Troubleshoot → Traffic Map tool
    or show zoning-rule on the leaf switches to confirm the deny rules
    are programmed correctly.

    6. Configuring
    vzAny in APIC

    Here’s how to
    configure vzAny to allow all EPGs within a VRF to consume a shared DNS service:

    Step 1 — Create the
    Contract (standard contract, not Taboo)

    1. Navigate to Tenants → [Your
      Tenant] → Contracts
    2. Right-click and select Create
      Contract
    3. Name it: shared-dns-contract
    4. Add a Subject with a filter permitting UDP
      port 53
    5. Click Submit

    Step 2 — Set the
    DNS EPG as Provider

    1. Navigate to your DNS EPG
    2. Under Provided Contracts,
      add shared-dns-contract

    Step 3 — Associate
    vzAny as Consumer

    1. Navigate to Tenants → [Your
      Tenant] → Networking → VRFs → [Your VRF]
    2. Click on the VRF and find the EPG
      Collection for VRF (vzAny)
       section
    3. Under Consumed Contracts,
      add shared-dns-contract
    4. Click Submit

    With this
    configuration, every EPG inside the VRF automatically becomes a consumer of the
    DNS service — no individual contract relationships needed.

    # REST API call to
    associate contract with vzAny { “vzAny”: {
    “attributes”: { “dn”:
    “uni/tn-MyTenant/ctx-MyVRF/any”, “prefGrMemb”:
    “disabled” }, “children”: [{ “vzRsAnyToCons”: {
    “attributes”: { “tnVzBrCPName”:
    “shared-dns-contract” } } }] } }

    7. TCAM Impact:
    What You Need to Know

    TCAM (Ternary Content
    Addressable Memory) is one of the most critical hardware resources in ACI leaf
    switches. Running out of TCAM space causes contract rules to fail to program,
    which means traffic silently drops. Understanding how Taboo and vzAny affect
    TCAM is essential for any production deployment.

    Taboo Contract —
    TCAM behaviour:

    • Each filter entry in a Taboo Contract
      creates a separate TCAM entry per EPG per leaf where that
      EPG has endpoints
    • If you have granular filters (e.g.,
      blocking 10 different ports), you get 10 TCAM entries per EPG per leaf
    • In large fabrics with many EPGs and many
      leaves, Taboo Contracts can consume TCAM rapidly
    • Always check leaf TCAM utilisation
      with: show system internal eltmc info policy brief

    vzAny — TCAM
    behaviour:

    • vzAny uses a group-level TCAM
      entry
       instead of per-EPG entries
    • Instead of creating N entries for N EPGs
      in the VRF, vzAny creates a single entry representing the entire VRF class
    • This makes vzAny dramatically more
      TCAM-efficient in environments with many EPGs
    • The trade-off is less granular control —
      you cannot easily apply vzAny selectively to only some EPGs

    TCAM rule of thumb: If you have more than 20 EPGs in a VRF
    and need a common policy, vzAny will almost always be more TCAM-efficient than
    individual contracts or Taboo Contracts applied per EPG.

    8. Real-World Use
    Cases

    When Taboo Contract
    makes sense:

    • Compliance-driven blocking: Your security team mandates no
      Telnet or FTP anywhere, even if ops teams have existing
      “permit-all” contracts. A Taboo Contract enforces this without
      restructuring all existing policies.
    • Temporary traffic block during
      maintenance:
       You
      need to block a specific port to an EPG temporarily during an upgrade
      without removing the existing contract.
    • Protocol enforcement: Forcing all communication to be
      encrypted — block HTTP (80) and enforce HTTPS (443) only for specific
      EPGs.

    When vzAny makes
    sense:

    • Shared services access: DNS, NTP, syslog, monitoring —
      services that every EPG in the VRF should be able to reach.
    • Development/test environments: Where you want all EPGs to
      communicate freely with each other without managing individual contracts.
    • Large-scale deployments: 30+ EPGs that all need the same
      baseline policy — vzAny avoids an explosion of contract relationships.
    • Migration from traditional networking: When converting a flat network to
      ACI and initially needing open intra-VRF communication while policy is
      refined.

    9. Which One Should
    You Choose?

    Your Situation

    Recommended Choice

    Need to block a
    specific port or protocol for one or a few EPGs

    Taboo Contract

    Need all EPGs in a VRF to access a shared service
    (DNS, NTP, monitoring)

    vzAny (consumer) + standard contract

    Want open
    communication between all EPGs in a VRF (dev/test)

    vzAny with
    permit-all contract

    Concerned about TCAM exhaustion with many EPGs

    vzAny — always more TCAM-efficient at scale

    Need to enforce a
    security deny that overrides existing permits

    Taboo Contract

    Multi-tenant environment needing strict isolation

    Avoid vzAny — use targeted contracts per EPG

    Migrating from flat
    network, need temporary open access

    vzAny with a plan to
    tighten policy over time

    My recommendation
    from the field:
     In 10
    years of ACI deployments, the most common mistake I’ve seen is over-relying on
    Taboo Contracts as a security tool. Taboo Contracts should be your last resort
    — a scalpel, not a hammer. If you find yourself adding many Taboo Contracts
    across multiple EPGs, that’s usually a sign your contract design needs to be
    re-architected. On the other hand, vzAny is underutilised — most environments
    with 20+ EPGs sharing common services would benefit enormously from vzAny, yet
    many engineers avoid it because they don’t fully understand it. Used correctly,
    vzAny is one of the most powerful simplification tools in the entire ACI policy
    model.

    10. Common Mistakes
    to Avoid

    Taboo Contract
    mistakes:

    • Applying Taboo to the wrong EPG direction: Remember Taboo Contracts only affect
      the EPG they’re applied to — not the EPG on the other side of the
      communication.
    • Using Taboo instead of fixing contract
      design:
       If you need
      many Taboo Contracts, your underlying contract architecture probably needs
      to be redesigned.
    • Not testing in a lab first: A misconfigured Taboo Contract can
      block legitimate traffic and cause outages. Always validate with traffic
      tests before production rollout.
    • Ignoring TCAM utilisation: Adding many granular Taboo filters
      across many EPGs can silently exhaust TCAM and cause rule programming
      failures.

    vzAny mistakes:

    • Using vzAny in multi-tenant environments
      without careful scoping:
       If
      your VRF spans multiple tenants, vzAny can unintentionally allow
      cross-tenant traffic. Always scope VRFs carefully before applying vzAny.
    • Applying vzAny with permit-all in
      production:
       Fine for
      dev/test, but dangerous in production. Always use vzAny with a specific
      contract that permits only required traffic.
    • Forgetting that vzAny affects endpoint
      discovery too:
       vzAny
      contracts can affect how COOP (Council of Oracle Protocol) handles
      endpoint learning. Test thoroughly after applying vzAny changes.

    11. Frequently
    Asked Questions

    Can I use Taboo
    Contract and vzAny together?

    Yes. A common pattern
    is to use vzAny to allow broad intra-VRF communication, and then apply a Taboo
    Contract to specific EPGs to block particular protocols within that open
    policy. The Taboo deny takes precedence over the vzAny permit for the matched
    traffic.

    Does vzAny work
    with the Contract Preferred Group?

    Yes, but with
    important caveats. When Contract Preferred Group is enabled on a VRF, EPGs
    within the preferred group communicate freely without contracts. vzAny can
    still be used alongside preferred groups to apply contracts to EPGs outside the
    preferred group. See our post on Contract
    Preferred Groups in ACI
     for more detail.

    What happens to
    TCAM if I apply both Taboo and vzAny?

    The vzAny entry
    remains efficient (group-level). The Taboo Contract adds per-EPG entries only
    for the specific EPGs it is applied to. As long as you keep Taboo Contracts
    minimal and targeted, the TCAM impact remains manageable.

    Can vzAny be used
    as a provider instead of a consumer?

    Yes. vzAny can be
    configured as a provider, consumer, or both. When used as a provider, all EPGs
    in the VRF provide the contract — useful for making all EPGs accessible to a
    specific external consumer (like a monitoring system) without configuring each
    EPG individually.

    How do I verify
    Taboo Contract rules are programmed on the leaf?

    SSH to the leaf switch
    and run:

    leaf# show
    zoning-rule scope [vrf-vnid] # Look for entries with action
    “deny” — these are your Taboo Contract rules # Also check: show
    system internal policy-mgr stats

    Summary

    Key takeaways

    • Taboo Contract = EPG-level explicit deny. Use it
      sparingly to block specific protocols. Increases TCAM consumption per EPG.
    • vzAny = VRF-level wildcard. Use it to apply contracts to all EPGs
      at once. Much more TCAM-efficient at scale.
    • They can be used together — vzAny for
      broad policy, Taboo for specific overrides.
    • In multi-tenant environments, use vzAny
      with caution to avoid cross-tenant traffic leaks.
    • If you find yourself creating many Taboo
      Contracts, it’s time to redesign your contract architecture.

  • Soft-Reconfiguration Inbound vs Route Refresh in BGP: Key Differences Every Network Engineer Must Know,Basic Networking Questions – Interview

    1.      1. Should we
    configure the speed and duplex setting on interface or on port-channel?

    Answer: Speed and duplex should be configured on the physical
    interfaces
    .


    2.     2.  Should the
    switchport command be configured on physical interfaces or on port-channel?

    Answer: The switchport command should be configured on
    both the physical interfaces and the port-channel.

    In BGP operations, applying a new policy (route-map, prefix-list, filter) traditionally required resetting the BGP session, which causes traffic disruption. To overcome this, soft reset mechanisms were introduced.

    Two commonly confused approaches are:

    • Soft-Reconfiguration Inbound
    • Soft Reset Inbound (Route Refresh – “soft-reconfiguration inbound always”)

    Understanding the difference is critical for design efficiency, memory optimization, and operational best practices, especially in large-scale environments like Cisco ACI or data center fabrics.


    What is Soft-Reconfiguration Inbound

    Soft-reconfiguration inbound is a legacy feature that allows a router to store all received BGP updates before applying inbound policy.

    Key Behavior

    • Router stores unfiltered BGP routes from the neighbor in memory
    • When a policy changes, router re-applies the policy locally
    • No need to request routes again from peer

    Configuration

    router bgp 100
     neighbor 10.1.1.1 remote-as 200
     neighbor 10.1.1.1 soft-reconfiguration inbound
    

    Pros

    • Works even if peer does NOT support route refresh
    • Immediate policy re-evaluation without peer interaction

    Cons

    • High memory consumption (stores full BGP table twice)
    • Not scalable for large environments (Internet routes / large DC fabrics)

    What is Soft Reset Inbound (Route Refresh / “Always”)

    Soft reset inbound using Route Refresh Capability is the modern and preferred method.

    When you execute a soft reset, the router requests the neighbor to re-send routing updates, and applies new policy dynamically.

    Key Behavior

    • No local storage of full routes
    • Router requests neighbor: “Send me routes again”
    • Policy applied during re-learning process

    Configuration (Implicit – modern default)

    router bgp 100
     neighbor 10.1.1.1 remote-as 200
    

    Most modern devices support route refresh automatically.

    Command Usage

    clear ip bgp 10.1.1.1 soft in
    

    Optional Keyword (“always”)

    clear ip bgp 10.1.1.1 soft in always
    

    This forces refresh even if capability visibility is unclear.

    Pros

    • No additional memory usage
    • Scalable and efficient
    • Industry best practice

    Cons

    • Requires peer support for route refresh
    • Slight delay while routes are re-requested

    Key Difference: Soft-Reconfiguration Inbound vs Soft Reset Inbound Always

    Feature Soft-Reconfiguration Inbound Soft Reset Inbound (Always / Route Refresh)
    Storage Stores full BGP table locally No local storage
    Memory Usage High Low
    Dependency Independent of peer Requires route refresh support
    Performance Immediate, but heavy Efficient, slight re-fetch delay
    Scalability Poor (not recommended) Excellent
    Modern Usage Deprecated / rare Preferred approach

    Real-World Example

    Scenario

    You apply a new inbound route-map on a BGP neighbor.

    Using Soft-Reconfiguration Inbound

    • Router already has full routing table stored
    • Applies new policy instantly
    • Uses additional RAM

    Using Route Refresh

    • Router sends request to neighbor
    • Neighbor re-advertises routes
    • Policy applied during reprocessing
    • No memory overhead

    When to Use What

    Use Soft-Reconfiguration Inbound Only When:

    • Working with very old devices
    • Neighbor does NOT support route refresh
    • Temporary troubleshooting in constrained scenarios

    Use Route Refresh / Soft Reset Always When:

    • Modern networks (recommended everywhere)
    • Cisco ACI external routing (L3Out BGP)
    • Internet edge / DC fabrics
    • Large-scale BGP environments

    Cisco ACI Perspective

    In ACI environments, BGP is widely used for L3Out connectivity.

    • ACI uses modern NX-OS capabilities
    • Route refresh is supported by default
    • Enabling soft-reconfiguration inbound is not recommended

    Best practice:

    • Avoid unnecessary memory overhead on leaf switches
    • Use route refresh for policy changes

    Important Interview Question

    Q: Why is soft-reconfiguration inbound not recommended in modern networks?

    Answer:
    Because it consumes significant memory by storing unfiltered BGP routes locally, while route refresh provides the same functionality more efficiently without memory overhead.


    Key Takeaways

    • Soft-reconfiguration inbound = old, memory heavy method
    • Route refresh (soft reset inbound always) = modern, efficient approach
    • Always prefer route refresh in production networks
    • Avoid enabling soft-reconfiguration unless absolutely necessary

    Conclusion

    Understanding the difference between soft-reconfiguration inbound and soft reset inbound (route refresh) is essential for designing scalable and efficient BGP networks.

    In today’s data center and cloud-driven environments, route refresh is the default and recommended approach, ensuring better performance without unnecessary resource consumption.

  • Cisco ACI MoQuery – Advanced Commands for Day‑to‑Day Operations

    Cisco ACI provides a powerful graphical interface through APIC, but experienced ACI engineers rarely rely only on the GUI during daily operations. In real production environments, engineers prefer moquery because it offers fast, accurate, and read‑only access to the Cisco ACI Management Information Tree (MIT).

    Moquery is safe to use in production, does not impact traffic, and does not program hardware. It exposes the real‑time state of the fabric and eliminates guesswork during troubleshooting. For day‑to‑day ACI operations, moquery is often the first tool engineers reach for.


    What Is MoQuery in Cisco ACI?

    Moquery is a command‑line utility available directly on the APIC that allows engineers to query managed objects (MOs) stored in the ACI database. Unlike the APIC GUI, moquery does not hide relationships or simplify outputs. It shows raw and authoritative information exactly as it exists in the fabric.

    Moquery is commonly used for:

    • Endpoint troubleshooting
    • Contract and policy validation
    • VRF and bridge domain verification
    • Fault analysis
    • Fabric and node health checks

    Endpoint Troubleshooting Using MoQuery

    Endpoint‑related issues are the most common problems in Cisco ACI environments. When endpoints are not reachable or behave unexpectedly, moquery provides immediate visibility.

    To display all learned endpoints:

    moquery -c fvCEp
    

    This command shows:

    • MAC address
    • IP address
    • EPG association
    • Bridge Domain
    • Leaf and interface where the endpoint is learned

    To find a specific IP address:

    moquery -c fvCEp | grep 10.10.10.25
    

    To find a specific MAC address:

    moquery -c fvCEp | grep 00:50:56
    

    These commands are used daily to identify incorrect endpoint learning, endpoint mobility events, duplicate IPs, and static path misconfigurations.


    Validating Application Profiles and EPGs

    To list all Endpoint Groups (EPGs) in a tenant:

    moquery -c fvAEPg
    

    This command is helpful when:

    • EPGs do not appear in the GUI
    • Verifying naming conventions
    • Confirming EPG existence during migrations

    To identify which application profile an EPG belongs to:

    moquery -c fvAEPg | grep dn
    

    This is especially useful in environments with many application profiles and similarly named EPGs.


    Contract Troubleshooting Using MoQuery

    Contracts are one of the most frequent causes of traffic drops in Cisco ACI. Moquery allows engineers to validate contract relationships without relying on GUI assumptions.

    To list all contracts:

    moquery -c vzBrCP
    

    To check which EPGs are providers of a contract:

    moquery -c fvRsProv
    

    To check which EPGs are consumers of a contract:

    moquery -c fvRsCons
    

    These commands confirm whether the correct EPGs are actually providing and consuming the intended contracts.


    Validating Contract Subjects and Filters

    Many contract issues occur not because the contract is missing, but because the filter is wrong.

    To inspect contract subjects:

    moquery -c vzSubj
    

    To list filters:

    moquery -c vzFilter
    

    To validate filter entries (ports, protocol, and direction):

    moquery -c vzEntry
    

    These commands remove ambiguity and clearly show whether the contract allows the required traffic.


    Taboo Contract Verification

    Taboo Contracts explicitly deny traffic and override permit contracts. They should be used sparingly, as misconfiguration can cause outages.

    To list all Taboo Contracts:

    moquery -c vzTaboo
    

    To inspect Taboo contract subjects:

    moquery -c vzTSubj
    

    If traffic is unexpectedly denied, these commands should always be checked early in troubleshooting.


    Validating vzAny and VRF‑Level Policies

    vzAny represents all EPGs within a single VRF and is commonly used for shared services or broad policy application.

    To list all VRFs:

    moquery -c fvCtx
    

    To confirm vzAny configuration:

    moquery -c vzAny
    

    This is critical in environments using:

    • Shared‑services architectures
    • Permit‑all designs
    • Contract Preferred Groups

    Many production incidents occur because engineers are unaware of an existing vzAny contract.


    Bridge Domain Troubleshooting

    Bridge Domain issues can silently break connectivity.

    To list all bridge domains:

    moquery -c fvBD
    

    To display bridge domain subnets:

    moquery -c fvSubnet
    

    To validate Bridge Domain to VRF mapping:

    moquery -c fvRsCtx
    

    These commands help identify:

    • Missing gateways
    • Incorrect VRF bindings
    • Wrong subnet scope

    L3Out and External Connectivity Validation

    To list all Layer‑3 Outs:

    moquery -c l3extOut
    

    To view external EPGs:

    moquery -c l3extInstP
    

    To check external subnets:

    moquery -c l3extSubnet
    

    These are essential when troubleshooting:

    • North‑south traffic issues
    • Firewall integration
    • Route advertisement problems

    Fault and Fabric Health Troubleshooting

    To display all active faults:

    moquery -c faultInst
    

    To see only critical faults:

    moquery -c faultInst | grep critical
    

    To find operational faults:

    moquery -c faultInst | grep oper
    

    These commands are faster and often more actionable than navigating the APIC fault dashboard.


    Fabric and Node Health Validation

    To list all fabric nodes:

    moquery -c fabricNode
    

    To check fabric health scores:

    moquery -c fabricHealth
    

    These commands are commonly used before and after production changes to ensure stability.


    Interface and Path Troubleshooting

    To list physical interfaces:

    moquery -c ethpmPhysIf
    

    To check interface operational state:

    moquery -c ethpmPhysIf | grep operSt
    

    To validate static path bindings:

    moquery -c fvRsPathAtt
    

    These commands explain many partial connectivity issues, link‑state problems, and unexpected traffic drops.


    Best Practices for Daily MoQuery Usage

    • Use moquery during incidents, not after
    • Save outputs for RCA and audits
    • Combine moquery with grep for faster analysis
    • Learn common managed object classes such as fvCEp, fvAEPg, fvBD, fvCtx, and faultInst

    Why Every ACI Engineer Should Master MoQuery

    Moquery significantly reduces MTTR, increases confidence during incidents, and exposes the actual state of the fabric. Engineers who master moquery troubleshoot faster, avoid mistakes, and operate more effectively in large ACI environments.


    Conclusion

    Moquery is one of the most powerful yet underutilized tools in Cisco ACI. While the APIC GUI is excellent for visualization, moquery provides the facts. For serious ACI operations, moquery should be part of every engineer’s daily workflow.

  • VRF Enforced Mode – Cisco ACI

    VRF Enforced Mode – Cisco ACI

     Understanding Cisco ACI VRF Enforced Mode (Simple & Secure Explanation)

    In Cisco ACI, VRF Enforced Mode is the default and most secure policy model. It follows a strict white‑list approach, meaning EPGs cannot communicate with each other unless a contract explicitly allows that traffic. Even if two EPGs exist in the same VRF, they still need a contract for inter‑EPG communication.

    Why VRF Enforced Mode Matters

    • Secure by default: All inter‑EPG traffic is denied until permitted by a contract.
    • Controlled micro-segmentation: Only required communication paths are opened.
    • Intra‑EPG traffic allowed: Endpoints inside the same EPG can talk freely unless isolation is configured.

    Other Policy Modes

    • Unenforced Mode:
      All traffic inside the VRF is allowed without contracts. Used rarely—mainly for testing or troubleshooting.
    • Preferred Group:
      A flexible option where selected EPGs can communicate freely, while others still require contracts. Useful during migrations or gradual policy tightening.

    How to Configure VRF Enforced Mode

    Navigate to:
    Tenants → [Tenant Name] → Networking → VRFs

    Under Policy Control Enforcement Preference, choose:
    🔒 Enforced

    Once enabled, contracts become mandatory for any EPG-to-EPG communication.

    Switching from Unenforced to Enforced

    If you’re tightening security from an unenforced setup, you can enable Preferred Groups to avoid breaking existing traffic flows during the transition. This allows a smooth shift while still moving toward full policy enforcement.

  • A Beginner’s Guide to Ansible Roles for Network Automation

     Understanding Ansible Roles: The Smart Way to Organize Your Automation

    When your automation projects start growing, keeping playbooks clean and reusable becomes essential. That’s where Ansible roles step in—providing a structured, scalable way to organize your automation logic.

    An Ansible role bundles together everything your playbook needs, such as:

    • Variables
    • Tasks
    • Templates
    • Files
    • Handlers
    • Custom modules

    This modular approach not only keeps your work tidy but also makes it effortless to reuse and maintain automation across multiple projects.

    Creating an Ansible Role

    Ansible offers a built‑in utility called ansible-galaxy to generate a ready‑to-use role structure. This creates a fully structured directory containing all folders required for your role.

    Key Directories You’ll Use Most in Network Automation

    While a role contains multiple folders, a few are especially important for network engineers:

    1. defaults/

    This folder holds baseline default values for your variables. If your playbook does not pass a variable, Ansible uses the value defined here.

    2. tasks/

    The heart of any role.
    All reusable task logic lives here—allowing you to write shorter playbooks and maintain your automation in one central place.

    3. templates/

    Used to store Jinja2 templates that your tasks render dynamically during execution.

    4. vars/

    This is where you define variables used within tasks or templates.
    Defaults can be kept in the defaults/ directory, but if a variable has no fallback value, it must be defined here for the role to work properly.

    Why Use Roles?

    Ansible roles bring clarity, modularity, and reusability to your automation workflows. Whether you’re building network configs or managing large infrastructure deployments, roles ensure consistency while drastically reducing repetitive work.

  • Cisco ACI Service Graph Management Models Explained

    Cisco ACI provides three distinct approaches to manage service graphs, each offering different levels of control and integration:

    1. Network Policy Mode (Unmanaged)
      In this mode, ACI configures only the network aspects of the service graph within the fabric. No configuration changes are pushed to the L4-L7 device, making it suitable when device policies are managed externally.

    2. Service Policy Mode (Managed)
      Here, ACI not only handles the fabric configuration but also manages VLAN settings on the L4-L7 device. The APIC administrator can directly input device-specific configurations through the APIC interface, ensuring centralized control.

    3. Service Manager Mode
      This model allows the firewall or load balancer administrator to define L4-L7 policies. ACI takes care of the fabric and VLAN configurations, while the APIC administrator links these policies with the network policy, enabling a collaborative approach.

    Choosing the Right Cisco ACI Service Graph Mode

    When designing with Cisco ACI, selecting the right service graph mode depends on your operational needs:

    • Dynamic Configuration Needs?
      If firewalls and load balancers must be configured dynamically through APIC, choose Service Policy Mode. If a separate administrator handles device configuration, opt for Network Policy Mode or Service Manager Mode.

    • Frequent Commissioning Like Cloud Services?
      For environments where devices are frequently added or removed, Service Policy Mode or Service Manager Mode works best. If services remain static for long periods, Network Policy Mode or Service Manager Mode is more practical.

    • Complex Multi-Leg Designs?
      If your design requires multiple interfaces or DMZ configurations, manual service insertion using EPGs and bridge domains may be more convenient than using a service graph.

    Bottom Line:
    Your choice should align with automation needs, operational flexibility, and design complexity.

  • Top 20 Data Center Interview Questions for Network Engineers (2026 Guide)

    Introduction

    If you are preparing for Data Center, Cisco Nexus, or VMware interviews, this guide provides important MCQs along with detailed explanations.

    It helps you:

    • Understand real concepts
    • Prepare for interviews
    • Build strong fundamentals

    1. What is the role of the control plane in the Cisco Nexus switch?

    • Controls switch management
    • Controls access to the console
    • Controls access to the remote console
    • Runs network protocols like OSPF and Spanning Tree

    Answer: Runs network protocols like OSPF and Spanning Tree
    Explanation: The control plane is responsible for network decision-making. It runs routing protocols like OSPF and STP to determine how traffic should flow. It acts as the brain of the device, while the data plane forwards actual traffic.

    2. Which option creates a Layer 3 isolated segment?

    • Create a VRF instance
    • Create a VLAN
    • Create subnet in management VRF
    • Create subnet in default VRF

    Answer: Create a VRF instance
    Explanation: VRF allows multiple routing tables on the same device, providing full isolation. It is widely used in multi-tenant environments where separation is required.

    3. What are three components of vSphere? (Choose Three)

    • ESXi hypervisor
    • VMware Workstation
    • vCenter Server
    • Hyper-V Server
    • Active Directory Server
    • vSphere Web Client

    Answer: ESXi hypervisor, vCenter Server, vSphere Web Client
    Explanation: ESXi hosts the virtual machines, vCenter manages the infrastructure, and the Web Client provides GUI access for administration.

    4. VM disk images characteristics (Choose Two)

    • Files can be copied and moved
    • Changes are not saved
    • Works only on same hardware
    • Stored as .vmdk files
    • .vmdd extension used

    Answer: Files can be copied and moved, Stored as .vmdk files
    Explanation: VM disks are portable and stored as .vmdk files. This allows easy backup, cloning, and migration across environments.

    5. Which connects virtual machines inside a hypervisor?

    • VRF
    • Virtual router
    • Virtual center
    • Virtual switch
    • Virtual LAN

    Answer: Virtual switch
    Explanation: A virtual switch connects VMs internally and to external networks. It functions like a physical switch inside the hypervisor.

    6. VXLAN encapsulation uses:

    • Mac-in-TCP
    • Mac-in-UDP
    • Mac-in-Mac
    • IPsec
    • Mac-in-GRE

    Answer: Mac-in-UDP
    Explanation: VXLAN encapsulates Layer 2 frames into UDP packets, enabling Layer 2 communication over Layer 3 networks and supporting large-scale environments.

    7. VXLAN packet destination MAC?

    • Anycast gateway MAC
    • Local VTEP MAC
    • ESXi NIC MAC
    • Broadcast MAC

    Answer: Local VTEP MAC
    Explanation: Encapsulated packets are sent to the destination VTEP, which handles decapsulation and forwards traffic to the target host.

    8. OSPF Graceful Restart works in:

    • Switch reload
    • Supervisor switchover
    • OSPF failure
    • Misconfigured neighbor
    • Misconfigured OSPF

    Answer: Switch reload, Supervisor switchover
    Explanation: Graceful restart ensures uninterrupted forwarding during control plane restarts, improving network availability.

    9. What is a datastore?

    • Physical ESXi storage
    • Only VM storage
    • Logical container for VMs
    • Local storage only
    • File-sharing storage

    Answer: Logical container for VMs
    Explanation: A datastore abstracts physical storage and holds VMs, templates, and ISO files, simplifying storage management.

    10. When are multiple vNICs needed?

    • Improve stability
    • Multiple VMs
    • Connect to multiple networks
    • Reduce latency
    • Internet access

    Answer: Connect to multiple networks
    Explanation: Multiple vNICs allow a VM to connect to different networks, improving segmentation and flexibility.

    11. VXLAN forwarding statement:

    • L2 lookup when MAC not local
    • Anycast gateway always bridges
    • MP-BGP uses VTEP IP as next hop
    • Uses anycast VTEP as next hop

    Answer: MP-BGP uses VTEP IP as next hop
    Explanation: In VXLAN EVPN, MP-BGP distributes MAC/IP routes, and VTEP IP addresses are used as next hop for routing decisions.

    12. VMware standard switch features (Choose Two)

    • CDP support
    • Visibility
    • ACL support
    • VLAN tagging support
    • QoS
    • STP participation

    Answer: CDP support, VLAN tagging support
    Explanation: Standard switches support VLAN tagging and CDP, enabling basic networking features within ESXi.

    13. Purpose of CoPP:

    • Blocks control traffic
    • Drops attackers
    • Limits control-plane traffic
    • Monitors CPU only

    Answer: Limits control-plane traffic
    Explanation: CoPP protects the control plane by rate-limiting traffic, preventing CPU overload and improving device stability.

    14. Management VRF characteristics (Choose Two)

    • Not default
    • mgmt0 uses it
    • Default routing
    • EIGRP supported
    • Static routing supported
    • OSPF supported

    Answer: mgmt0 uses it, Static routing supported
    Explanation: Management VRF is used for out-of-band management. It isolates management traffic from data traffic and supports static routing.


    15. VRF-aware service command:

    • Manual routing needed
    • Auto detection
    • Must specify always
    • Uses default VRF
    • Defaults to default if not specified

    Answer: Defaults to default if not specified
    Explanation: If VRF is not specified, the command runs in the default VRF. Explicit VRF mention is needed for non-default contexts.

    16. Benefits of virtualization (Choose Three)

    • Resource efficiency
    • Better utilization
    • Hardware issues reduced
    • Licensing free
    • Easy hardware movement
    • VM portability
    • Hardware independence

    Answer: Resource efficiency, Better utilization, VM portability, Hardware independence
    Explanation: Virtualization optimizes resource usage, allows easy VM migration, and abstracts hardware dependencies.

    17. VM migration behavior:

    • VM downtime
    • Host shutdown
    • Isolation
    • No interruption

    Answer: No interruption
    Explanation: Features like vMotion enable live migration of VMs without downtime, ensuring service continuity.

    18. Overlay network:

    • Modify physical network
    • Virtual addressing
    • Uses physical infrastructure to carry virtual traffic
    • Only in VMware

    Answer: Uses physical infrastructure to carry virtual traffic
    Explanation: Overlay networks run on top of physical networks using tunneling protocols like VXLAN.

    19. Layer 3 encapsulation:

    • No changes
    • Change MAC
    • Adds new header
    • L2 tunnel
    • Overlay creation

    Answer: Adds new header
    Explanation: Layer 3 encapsulation adds an IP header, enabling packets to travel across routed networks.

    20. Anycast gateway:

    • Same IP different MAC
    • No mobility
    • Needs ARP again
    • Same IP and MAC

    Answer: Same IP and MAC
    Explanation: Anycast gateway uses the same IP and MAC across all VTEPs, allowing seamless host mobility without ARP changes.

    AI Related Articles

    Networklearner:
    Generative AI Fundamentals Explained for Beginners (With IT & Network
    Engineering Examples)

     

    https://netterrene.com/2026/06/generative-ai-quiz-beginners-mcq-answers.html

  • HSRP v1 vs v2, Preempt and Tracking Explained, HSRP Vs VRRP – (Cisco Interview Guide)

    Introduction

    In enterprise networks, default gateway redundancy is critical to ensure uninterrupted connectivity. If the gateway fails, users lose access to external networks.

    Cisco provides HSRP (Hot Standby Router Protocol) to eliminate this single point of failure by enabling multiple routers to act as a single virtual gateway.

    This blog covers:

    • HSRP fundamentals
    • HSRP v1 vs v2
    • HSRP preempt (with best practices)
    • HSRP preempt with tracking (real-world design)
    • HSRP vs VRRP comparison

    What is HSRP

    HSRP is a Cisco proprietary First Hop Redundancy Protocol (FHRP).

    How It Works

    • One router becomes Active → forwards traffic
    • One router becomes Standby → backup
    • Both share a Virtual IP
    • Hosts use the virtual IP as default gateway

    Key Parameters

    • Default Hello Timer: 3 sec
    • Default Hold Timer: 10 sec
    • Election based on priority + highest IP

    HSRP Version 1 vs Version 2

    Feature HSRP v1 HSRP v2
    Group Range 0–255 0–4095
    Multicast Address 224.0.0.2 224.0.0.102
    IPv6 Support No Yes
    MAC Address 0000.0c07.acXX 0000.0c9f.fXXX
    Scalability Limited High

    Recommendation

    Always use HSRP v2 in modern networks.

    HSRP Preempt Explained

    By default, if Active router fails and recovers, it does not reclaim Active role.

    Preempt Solves This

    • Allows higher priority router to regain Active role
    • Ensures traffic flows as per design

    Basic Configuration

    standby 10 priority 110
    standby 10 preempt
    

    Where Should Preempt Be Configured

    Best Practice

    • Configure preempt only on Primary Router

    Why

    • Prevents unnecessary flapping
    • Ensures stable failover
    • Maintains deterministic behavior

    Optional Delay

    standby 10 preempt delay minimum 60
    

    This allows routing protocols to converge before taking over.

    HSRP Preempt with Tracking (Real-World Scenario)

    Why Tracking is Needed

    HSRP only checks router status, not network reachability.

    Problem

    • R1 (Primary) has ISP uplink
    • Uplink fails → R1 still Active
    • Traffic gets blackholed

    Solution: Preempt + Tracking

    Topology

    • R1 → Primary (priority 110) → ISP uplink
    • R2 → Secondary (priority 100)

    Configuration

    R1 (Primary Router)

    interface Vlan10
     ip address 10.1.10.2 255.255.255.0
     standby version 2
     standby 10 ip 10.1.10.1
     standby 10 priority 110
     standby 10 preempt
     standby 10 preempt delay minimum 60
     standby 10 track GigabitEthernet0/0 20
    

    R2 (Secondary Router)

    interface Vlan10
     ip address 10.1.10.3 255.255.255.0
     standby version 2
     standby 10 ip 10.1.10.1
     standby 10 priority 100
    

    How It Works

    Normal Condition

    • R1 priority = 110 → Active
    • R2 priority = 100 → Standby

    Failure (R1 uplink down)

    • Tracking reduces R1 priority → 90
    • R2 becomes Active
    • Traffic continues normally

    Recovery

    • R1 priority restored → 110
    • Preempt enabled → R1 becomes Active again

    Why Preempt is Critical Here

    Without preempt:

    • R1 returns but stays Standby
    • Traffic follows suboptimal path

    With preempt:

    • Network returns to optimal design state

    Advanced Tracking Using IP SLA (Recommended)

    Instead of interface tracking, use real reachability:

    ip sla 1
     icmp-echo 8.8.8.8 source-interface GigabitEthernet0/0
     frequency 5
    ip sla schedule 1 life forever start-time now
    
    track 1 ip sla 1 reachability
    

    Apply:

    standby 10 track 1 decrement 20
    

    HSRP vs VRRP

    Feature HSRP VRRP
    Type Cisco Proprietary Open Standard
    Active Router Active Master
    Backup Router Standby Backup
    Preempt Disabled by default Enabled by default
    Multicast 224.0.0.2/102 224.0.0.18
    Vendor Support Cisco only Multi-vendor

    When to Use HSRP vs VRRP

    Use HSRP

    • Cisco environments
    • ACI / Data Center
    • Advanced tracking required

    Use VRRP

    • Multi-vendor networks
    • Simpler deployment

    Interview Questions

    Q1: Why use tracking in HSRP?
    To detect upstream failures and trigger failover.

    Q2: Why combine tracking with preempt?
    Tracking handles failover, preempt ensures recovery to primary router.

    Q3: Where should preempt be configured?
    On the higher priority router only.

    Design Best Practices

    • Use HSRP v2 always
    • Configure preempt only on primary
    • Combine preempt + tracking
    • Use IP SLA for accurate failover
    • Avoid equal priorities
    • Use preempt delay

    Key Takeaways

    • HSRP prevents gateway failure
    • Preempt ensures correct Active router
    • Tracking prevents traffic blackhole
    • IP SLA improves decision accuracy
    • VRRP is better for multi-vendor setups

    Conclusion

    HSRP remains a cornerstone for high availability in enterprise networks. However, combining preempt with tracking is what makes the design truly resilient and production-ready.

    In modern networks, always ensure:

    • Correct use of HSRP v2
    • Intelligent failover using tracking
    • Proper role restoration using preempt

    This guarantees both high availability and optimal traffic flow.

  • Breaking Down the NX-OS Image Filename

    Breaking Down the NX-OS Image Filename

    Let’s take a closer look at a sample image filename:

    nxos64-cs.10.5.1.F.bin

    Here’s what each part means:

    • nxos64-cs: Indicates a 64-bit NX-OS image for specific platforms (e.g., Nexus 9000-EX, -FX, -GX, -GX2).
    • 10: Major release version.
    • 5: Minor release version.
    • 1: Maintenance release.
    • F: Release designation.
    • bin: Binary file extension.

    This structured naming helps administrators quickly identify the right image for their hardware and software needs.

    Understanding Image Prefixes

    Cisco NX-OS images come in different formats based on platform architecture:

    • 32-bit images: Start with nxos (e.g., nxos.10.1.1.bin)
    • 64-bit images: Start with nxos64 (e.g., nxos64.10.1.1.bin)

    Starting with Release 10.2(2)F, Cisco introduced two distinct 64-bit image types:

    1. nxos64-cs: For Nexus 9000-EX, -FX, -GX, -GX2 modular switches and fixed switches.
    2. nxos64-msll: For Nexus 9000-R, -R2 modular switches, Nexus 3600 fixed switches, and Nexus 3500-XL switches.

    Release Designations Explained

    Cisco uses specific letters to indicate the nature of a release:

    • F (Feature Release): Includes new features, platform support, and bug fixes.
    • M (Maintenance Release): Focuses on bug fixes and security patches, including PSIRT updates.

    Each image ends with a .bin extension, confirming it’s a compressed binary file ready for deployment.

    Conclusion

    Understanding Cisco NX-OS coding is more than just decoding filenames—it’s about ensuring operational continuity, compatibility, and performance. As your infrastructure grows, especially in mission-critical environments like banking, being fluent in NX-OS versioning and image types will help you make informed decisions and maintain a resilient network.