Blog

  • AI Planning Strategies for Cisco ACI Engineers: From a Single APIC Query to Multi-Site Design Decisions

     If you run ACI in production, you already know the job isn’t really “networking” — it’s decision-making under a policy model. Every ticket forces the same question: is this a quick lookup, a known runbook, an investigation, a design choice, or something that needs a second pass before it goes live?

    AI agents face the exact same fork in the road. The strategy an agent picks — how much it plans before it acts — determines whether it’s useful or dangerous on your fabric. This post walks through the five planning patterns showing up in agentic AI tooling today, each mapped to a real ACI scenario instead of a generic networking example.


    Why This Matters More on ACI Than on Traditional Networks

    On a traditional CLI-driven network, a bad AI action is usually contained to one box. On ACI, everything is a shared, declarative policy model — an EPG, a contract, or a Bridge Domain change can ripple across every leaf in the fabric in seconds, and a Multi-Site change can ripple across data centers.

    That’s exactly why how an AI agent plans matters so much here. A tool that fires configuration pushes without a reviewable plan is a liability on APIC. A tool that reasons, drafts a plan, and lets you approve it before touching the MIT (Management Information Tree) is something you can actually trust near production.


    1. Single-Step ReAct — One Question, One Answer

    This is the simplest pattern: gather what’s needed, answer, done. No multi-turn planning required.

    ACI scenario: “What’s the health score of leaf switch Leaf-103?”

    The agent queries the APIC health score API for that node and returns the number — no further steps needed.

    Other single-step ACI use cases:

    • Pulling the fault count on a specific EPG
    • Checking whether a contract is currently applied between two EPGs
    • Looking up which leaf a given endpoint is learned on
    • Reporting APIC cluster health (avread state across controllers)
    • Checking the current firmware version on a switch node

    Fast, low-risk, read-only. This is where most engineers will first trust an AI agent — because there’s nothing to approve, only something to report.


    2. Multi-Step ReAct — Following a Known Runbook

    Some ACI tasks are a fixed, well-rehearsed sequence. The agent doesn’t need to design anything — it needs to execute the checklist correctly, step by step, reacting to what each step returns.

    ACI scenario: Onboarding a new leaf switch into the fabric.

    1. Confirm the leaf is discovered and registered in APIC
    2. Assign the node ID and confirm it joins the fabric membership policy
    3. Verify the leaf inherits the correct Pod policy group and interface policies
    4. Confirm VPC pairing (if applicable) comes up cleanly
    5. Validate the leaf’s health score stabilizes above threshold
    6. Push a test EPG/BD binding and confirm endpoint learning works

    If step 4 fails — say, the VPC doesn’t form — the agent reacts, checks the peer-link and policy-group config before moving to step 5, the same way you would.

    Other multi-step ACI use cases:

    • APIC cluster firmware upgrade sequence (validate → stage → upgrade controllers one at a time → validate cluster health before proceeding)
    • Tenant onboarding (create Tenant → VRF → Bridge Domains → EPGs → Contracts, in order)
    • Scheduled maintenance window pre-checks and post-checks
    • Rolling switch firmware upgrades across a pod without dropping VPCs

    3. Plan-and-Execute — For When the Fabric Is Telling You Conflicting Things

    This is the pattern that matters most for ACI troubleshooting, because ACI failures are rarely single-cause. A contract issue can look like an endpoint-learning issue. A Bridge Domain flooding setting can look like an application performance problem. Jumping straight into action wastes time and, worse, risks a config change based on a wrong guess.

    Plan-and-Execute forces the agent to draft the full investigation before touching anything — and critically, you get to review or edit that plan first.

    ACI scenario: Two EPGs that used to communicate fine are now silently dropping traffic after a contract update.

    Rather than guessing, the agent proposes a plan like:

    1. Diff the contract and subject/filter changes against the last known-good version
    2. Check for drop_pkts counters on ingress/egress leaf interfaces for the affected EPGs
    3. Confirm the contract scope (VRF vs Tenant vs Global) still matches the endpoints’ actual VRF placement
    4. Check zoning-rule programming on the affected leaves (show zoning-rule equivalent) to confirm the contract actually rendered in hardware
    5. Verify no overlapping deny contract or vzAny rule is taking precedence
    6. Correlate fault codes on the EPG and contract objects in APIC

    Only after you approve (or the agent completes) that plan does it move into fault correlation and root-causing — and because the plan is visible, you can spot immediately if it’s about to check the wrong VRF.

    Other Plan-and-Execute ACI use cases:

    • Multi-Site latency or convergence issue reported across three data centers
    • APIC cluster split-brain or quorum-loss investigation
    • Migrating a legacy VLAN-based network into ACI EPGs without an outage
    • Investigating intermittent BD flooding storms across a Pod

    4. Tree of Thoughts — For Architecture and Design Decisions

    Good ACI architects don’t commit to a design on the first idea — they weigh options against the actual requirements. Tree of Thoughts gives an AI agent that same discipline: generate multiple candidate approaches, evaluate trade-offs, then recommend.

    ACI scenario: A customer needs a second data center for DR and asks whether to extend the existing ACI fabric or stand up something new.

    The agent lays out and compares several branches:

    Option Strength Trade-off
    Stretched Fabric (single APIC cluster, no Multi-Pod) Simplest operationally Fragile — single failure domain, not resilient to WAN issues between sites
    ACI Multi-Pod Single APIC domain, fast failover, unified policy Requires low-latency IPN between sites, less DC-to-DC fault isolation
    ACI Multi-Site True fault-domain isolation, independent APIC clusters per site, policy orchestrated centrally via Nexus Dashboard Orchestrator More complex to operate, higher initial design and cost overhead
    Standalone fabric with VXLAN EVPN + external interconnect Maximum isolation, vendor-neutral if needed Loses ACI’s centralized policy model between sites; more manual policy reconciliation

    The agent weighs these against stated requirements — RTT between sites, whether independent APIC failure domains are a hard requirement, existing IPN bandwidth — and recommends the best fit, the same way you’d whiteboard it with a customer.

    Other Tree of Thoughts ACI use cases:

    • Choosing between contract-based (whitelist) vs. vzAny-based (preferred group) segmentation for a new tenant
    • Deciding EPG-per-VLAN vs. EPG-per-application microsegmentation strategy
    • L3Out design: shared L3Out in common Tenant vs. per-tenant L3Out
    • Evaluating Remote Leaf vs. Cloud ACI vs. Multi-Site for a hybrid-cloud expansion

    5. Self-Reflection — Catching Mistakes Before They Hit the Fabric

    This is arguably the most important pattern for anything that writes to APIC. Self-Reflection means the agent reviews its own output — a proposed contract, a migration plan, a config template — against a checklist before handing it to you.

    ACI scenario: An agent drafts a new contract and filter set to allow a application team’s new microservice to talk to a database EPG.

    Before presenting the contract, it reflects:

    • Does this filter scope traffic to only the required ports, or is it accidentally permit-any?
    • Is the contract scope set correctly (this VRF only, not Global, unless cross-VRF was actually intended)?
    • Does this contract accidentally shadow or conflict with an existing vzAny rule?
    • Does the direction (consumer/provider) match the actual traffic flow, or did roles get reversed?
    • Does this change match the customer’s segmentation standard (e.g., default-deny between tiers)?

    Catching a reversed consumer/provider relationship — a mistake every ACI engineer has made at least once — before it goes to APIC is exactly the kind of check Self-Reflection is built for.

    Other Self-Reflection ACI use cases:

    • Reviewing an auto-generated Bridge Domain configuration for correct flooding/ARP settings before applying
    • Validating a drafted Multi-Site schema template against the target sites’ existing object naming conventions
    • Auditing a generated compliance report against actual fault/audit logs before it’s sent to a customer
    • Second-pass review of an AI-suggested firmware upgrade plan for skipped compatibility checks

    Which Strategy Fits Your ACI Task?

    ACI Scenario Recommended Strategy
    Checking a leaf’s health score or fault count Single-Step ReAct
    Onboarding a switch or running a known upgrade runbook Multi-Step ReAct
    Troubleshooting a Multi-Site latency or contract-drop issue Plan-and-Execute
    Choosing Multi-Pod vs. Multi-Site vs. Remote Leaf Tree of Thoughts
    Drafting a contract, schema, or migration config for review Self-Reflection

    Final Thoughts

    None of these patterns replace ACI expertise — they formalize it. Single-Step ReAct is how you’d answer a quick Slack question. Multi-Step ReAct is your runbook discipline. Plan-and-Execute is how a senior engineer investigates a messy, multi-cause outage instead of guessing. Tree of Thoughts is the whiteboard session before a design gets signed off. Self-Reflection is the second pair of eyes on a change before it hits production.

    As AI agents get closer to actually touching APIC and pushing policy, the strategy behind how they plan matters as much as what they execute. An agent that can show you its plan — and reflect on its own output — is one you can actually let near a production fabric.


    FAQ

    Q: Which planning strategy should an AI agent use before pushing a config change to APIC?
    A: Self-Reflection at minimum, and ideally combined with Plan-and-Execute — the agent should draft the change, reflect on it against a checklist (scope, contract direction, filter correctness), and only then present it for approval before anything touches the fabric.

    Q: Is Plan-and-Execute overkill for a simple ACI health check?
    A: Yes. A single health-score lookup only needs Single-Step ReAct. Plan-and-Execute earns its overhead on multi-cause, cross-domain problems like a Multi-Site outage — not routine lookups.

    Q: Can Tree of Thoughts be used for troubleshooting, not just design?
    A: It can, when there are genuinely multiple plausible root causes with different fixes (for example, “is this a contract issue, a BD flooding issue, or an MTU mismatch on the L3Out?”) — but for most fault-finding, Plan-and-Execute’s linear investigation plan is the better fit.


    Related Reading on Networklearner:


    Need help with Cisco ACI, Nexus, data center networking, or network automation?

    I am a CCIE Data Center engineer with 18+ years of enterprise networking experience, working hands-on with production ACI fabrics.

    Contact me for consulting, troubleshooting, design reviews, and project support: rockingoa@gmail.com

  • AI Planning Strategies Explained for Network Engineers: From ReAct to Tree of Thoughts

     Artificial Intelligence is rapidly becoming a key part of modern network operations. Whether you are managing a Cisco ACI fabric, troubleshooting Nexus switches, automating configuration changes, or investigating performance issues across multiple sites, understanding how AI agents think and execute tasks can help you work more efficiently.

    In this article, we will explore some popular AI planning strategies and how they relate to real-world networking scenarios. These concepts are becoming increasingly important as AI-powered network automation tools continue to evolve.


    Why AI Planning Matters in Networking

    Network engineers often deal with complex tasks that require investigation, decision-making, and execution across multiple systems.

    Consider the following situations:

    • Investigating latency between data centers
    • Validating a network migration plan
    • Automating configuration deployment
    • Troubleshooting application connectivity issues
    • Reviewing security policy changes

    A simple AI response is often not enough. The AI needs a structured approach to analyze, plan, execute, and validate actions.

    This is where AI planning architectures come into play.


    Single-Step ReAct: Best for Simple Questions

    Single-Step ReAct is designed for straightforward tasks that require a single action or response.

    Example

    Question: What is the CPU utilization on Router R1?

    The AI simply gathers the required information and returns the answer.

    Networking Use Cases

    • Checking interface status
    • Displaying CPU utilization
    • Viewing BGP neighbor state
    • Finding VLAN information
    • Retrieving device inventory

    For routine operational checks, Single-Step ReAct provides quick and efficient results.


    Multi-Step ReAct: Structured Task Execution

    Some networking tasks involve multiple actions performed in a predefined sequence.

    Multi-Step ReAct breaks the task into several actions and executes them one after another.

    Example

    A network engineer needs to:

    1. Restart a network service
    2. Verify successful recovery
    3. Collect logs
    4. Document the change

    The AI follows each step until the complete workflow is finished.

    Networking Use Cases

    • Change validation procedures
    • Device onboarding workflows
    • Backup and restore operations
    • Configuration compliance checks
    • Regular maintenance activities

    This approach is particularly useful when procedures are well-defined and repeatable.


    Plan-and-Execute: Ideal for Complex Troubleshooting

    One of the most powerful AI architectures is the Plan-and-Execute model.

    Instead of jumping directly into action, the AI first creates a detailed execution plan.

    Only after the plan is reviewed and approved does it begin execution.

    Benefits of Plan-and-Execute

    Benefit Description
    Visibility Review the complete plan before execution
    Control Pause or modify actions when needed
    Reusability Save plans for future use
    Easier Troubleshooting Quickly identify failed steps

    Networking Example

    Imagine users across three global regions report application slowness.

    Rather than randomly checking devices, the AI may create a plan such as:

    1. Validate WAN connectivity
    2. Review routing changes
    3. Analyze interface errors
    4. Check data center fabric health
    5. Verify application path latency
    6. Correlate logs and events

    This approach reduces wasted effort and improves troubleshooting efficiency.


    Tree of Thoughts: Exploring Multiple Solutions

    Experienced network engineers rarely stop at the first possible solution.

    The Tree of Thoughts methodology follows the same principle.

    Instead of selecting a single path immediately, the AI evaluates several possible approaches before choosing the best one.

    Example

    A company wants to design a new data center network.

    Possible options include:

    • Cisco ACI
    • EVPN-VXLAN
    • Traditional Three-Tier Architecture
    • Spine-Leaf Architecture

    The AI analyzes each approach, compares advantages and disadvantages, and recommends the most suitable design.

    Networking Use Cases

    • Data center design decisions
    • Cloud migration planning
    • Security architecture reviews
    • SD-WAN deployment strategies
    • Technology evaluation exercises

    This method improves decision quality by considering multiple possibilities.


    Self-Reflection: Continuous Improvement

    Self-Reflection enables AI to review and evaluate its own progress.

    After completing a task, the AI asks questions such as:

    • Did the action solve the issue?
    • Is there enough evidence?
    • Are additional checks required?
    • Can the result be improved?

    Networking Example

    An AI agent generates a firewall security policy.

    Before presenting the final output, it reviews the policy for:

    • Missing rules
    • Security gaps
    • Business requirements
    • Compliance standards

    The result is often more accurate and reliable.

    Networking Use Cases

    • Security policy generation
    • Compliance reporting
    • Network design reviews
    • Migration planning
    • Automation script validation

    Which AI Strategy Should You Use?

    Scenario Recommended Approach
    Checking router CPU usage Single-Step ReAct
    Running operational workflow Multi-Step ReAct
    Investigating network-wide performance issues Plan-and-Execute
    Designing a new network architecture Tree of Thoughts
    Creating security policies or reports Self-Reflection

    Selecting the appropriate strategy improves efficiency, reduces errors, and delivers more reliable results.


    Final Thoughts

    AI is becoming an essential tool for network engineers. Understanding how AI agents plan, reason, and execute tasks can help organizations build smarter automation workflows and improve operational efficiency.

    Whether you are managing enterprise campuses, data centers, cloud networks, Cisco ACI fabrics, or network automation platforms, these AI planning strategies provide a framework for solving problems more effectively.

    The future of networking will not just involve automation. It will involve intelligent systems capable of planning, reasoning, and continuously improving their decisions.

  • AI Agent Reasoning Loop (ReAct) Explained for Network Engineers

    AI Agent Reasoning Loop (ReAct) Explained for Network Engineers

     In the last post we covered how an agent perceives — how webhooks feed it events and how the context window works like a limited routing table. Perception only gets an agent halfway there, though. The real question is what it does with that information once it has it. That’s where the ReAct pattern comes in, and if you’ve ever worked a ticket the “right” way instead of just guessing, you already understand it intuitively.

    The three-step loop you already use every day

    Picture a ticket landing on your desk: “Users are reporting slow network performance.” A junior engineer might restart something and hope for the best. An experienced one runs a mental loop instead:

    1. Think — “Users report slow performance. Before I touch anything, let me check the router status.”
    2. Act — Actually run show interface, check CPU, pull the logs.
    3. Observe — “Router R12 CPU usage is 97%.” New information is now on the table.
    4. Think again — “That CPU number explains the symptom. What’s driving CPU that high — a routing loop, a process leak, an attack?”

    That repeating cycle — reason, act, observe, reason again — is exactly what the ReAct pattern (Reason + Act) gives an AI agent. It isn’t a coincidence that it maps so cleanly onto troubleshooting methodology; ReAct was built to give language models the same discipline a good engineer already has: don’t act blindly, and don’t just theorize without checking your work.

    Here’s what that loop looks like laid out:

    Why this beats the two approaches that came before it

    Before ReAct, agent-style systems generally fell into one of two buckets, and if you’ve dealt with older automation tooling, you’ve probably run into both.

    Reasoning-only systems could analyze a problem and tell you what should be done — but they had no hands. Think of a chatbot that can explain that “high CPU is usually caused by a routing process or a control-plane flood” but can’t actually go check your router. Useful for a second opinion, useless for getting the job done.

    Acting-only systems could execute, but with zero judgment in the loop. This is your classic runbook script or blind automation: it fires a fixed sequence of commands whether or not the situation actually calls for them. It’s fast, but it can’t adapt when the ticket doesn’t match the script.

    ReAct fuses both halves. Reasoning decides which action makes sense given the current situation; the action then produces new, real information; and that new information reshapes the next round of reasoning. Each loop iteration is smarter than the last because it’s grounded in something that actually happened, not just a guess. That grounding is the entire point — it’s the difference between a script that blindly restarts a service and an agent that checks CPU first, correlates it with a config change timestamp, and only then decides what to do.

    Chain-of-Thought: the reasoning made visible

    You’ll often see ReAct mentioned alongside Chain-of-Thought (CoT) prompting, and it’s worth knowing the difference because they solve related but distinct problems.

    Without CoT, a model tends to jump straight to an answer — the AI equivalent of an engineer saying “just reboot it” with no explanation. With CoT, the model is nudged to lay out its reasoning step by step before acting, the same way a good engineer talks through their logic on a bridge call instead of just typing commands silently: “CPU is high, that could be a process or a flood, let me check show processes cpu before I decide anything.”

    The payoff is the same one you’d expect from any engineer who explains their thinking out loud: it’s easier to trust, easier to audit, and a lot easier to catch a bad assumption before it turns into a bad action.

    Reading agent traces: your new show-tech

    If you’re going to work with agents day to day, there’s one practical skill worth building early: reading a trace.

    A trace is simply a structured log of everything the agent did — every Think step, every Act step, every Observe step, nested in order. Tools like LangSmith display these as a tree: a parent run (the overall task) containing child runs, where each child is either an LLM call (reasoning happened here) or a tool call (an action happened here).

    If that sounds familiar, it should — it’s not far from reading a show tech-support bundle or unpacking a nested syslog trace to figure out what a device actually did and in what order. The skill transfers almost directly: find where the reasoning went wrong, or find where the tool call returned something unexpected, and you’ve found your root cause.

    One caution worth keeping in mind

    Reasoning traces make an agent more explainable, but explainable isn’t the same as infallible. A model can lay out confident, well-structured reasoning and still act on a flawed assumption — the AI version of an engineer who sounds certain but is troubleshooting the wrong VLAN. Treat agent reasoning the way you’d treat a junior engineer’s diagnosis: useful, often correct, but worth a second look before it touches anything production-critical.

    Quick recap

    • ReAct = Think → Act → Observe, repeated until the agent has a final answer — the same loop experienced engineers already run mentally when troubleshooting.
    • It replaces two older, weaker patterns: reasoning-only systems that can’t act, and acting-only systems that can’t think.
    • Chain-of-Thought prompting is what makes the “Think” step explicit and auditable, rather than a hidden jump to a conclusion.
    • Traces are your debugging tool for agent behavior — read them the way you’d read a nested log bundle.
    • Confident reasoning is not the same as correct reasoning — verify before letting an agent touch anything critical.

    FAQ

    Q1 – Which statement best
    explains what is happening in this agent interaction?
    • The agent is using Chain-of-Thought
      prompting to generate random responses and the tool output appears in the
      Action step.
    • The agent is using the ReAct pattern
      (Reason → Act → Observe), Chain-of-Thought prompting to explain its
      reasoning, and the tool’s output appears in the Observation step.
    • The agent is following a rule-based system
      and the Observation step contains the system prompt instructions.
    • The agent is using ReAct but
      Chain-of-Thought prevents the agent from calling tools.

    Ans – The agent is using the ReAct pattern (Reason →
    Act → Observe), Chain-of-Thought prompting to explain its reasoning, and the
    tool’s output appears in the Observation step.


    This post continues the series on how AI agents work. Catch up on the earlier piece on how agents gather information before they ever start reasoning:

    Related Reading on Networklearner:

    Need help with Cisco ACI, Nexus,
    data center networking, or network automation?


    I am a CCIE Data Center engineer
    with 18+ years of enterprise networking experience.

    Contact me for consulting,
    troubleshooting, design reviews, and project support.

  • AI Agent Perception and Context Windows Explained for Network Engineers

     If you’ve already read up on what an LLM is or how temperature and tokens affect an AI agent’s behavior, there’s a step that comes before all of that reasoning even starts: perception. Before an agent can decide anything, it has to gather information and make sense of it — the same way a monitoring platform has to actually receive and parse an SNMP trap before it can trigger an alert.

    Think about troubleshooting a flapping interface. You don’t just stare at the switch and guess — you pull show interface, check the logs, maybe run a packet capture. Only once you’ve gathered that data do you start reasoning about root cause. AI agents work the same way. Perception is stage one of what’s often called the Perceive → Reason → Act loop, and if that first stage is weak or incomplete, everything downstream — the reasoning, the recommendation, the action — suffers. Garbage in, garbage out is as true for an LLM as it is for a flow-based traffic report built on bad sampling.

    Webhooks: The Syslog Server of the AI World

    If you’ve ever configured a device to forward syslog or SNMP traps to a collector, you already understand webhooks conceptually — they’re the same pattern, just for applications instead of network gear.

    A webhook is how an external system pushes an event to an AI agent in real time, instead of the agent having to poll for it. The flow typically looks like this:

    1. Something happens. A ticket gets opened in a helpdesk tool, or a new record lands in a CRM — conceptually no different from a link going down and generating a trap.
    2. The event gets delivered. The originating system fires an HTTP POST containing a JSON payload to a URL the agent is listening on. This is your “trap destination,” just over HTTP instead of UDP/162.
    3. The agent processes it. It parses the payload, figures out what matters, and reasons about what to do — summarize a ticket, gauge urgency, draft a reply.
    4. The agent acts. Update a record, send a notification, post to a Slack or Webex channel — similar to a monitoring platform auto-remediating a known issue or paging on-call.

    The mental model translates cleanly: webhook = event notification into the agent, the same job your syslog/trap receiver does for your network.

    The Context Window: Think of It as a Routing Table With a Hard Limit on Prefixes

    This is the part worth slowing down on, because it explains a lot of “why did the AI just say something so off-base” moments.

    The context window is everything the agent can “see” in a single pass — its entire working memory for that request. It’s typically built from four pieces, assembled into one combined prompt:

    • System prompt — the agent’s role and boundaries, comparable to a device’s running-config defining what it’s allowed to do
    • Tool definitions — what actions the agent can actually take, like the command set available in a given privilege level
    • Conversation history — a running log of what’s already been said and done, similar to a session’s command history
    • Current input — the immediate request the agent has to respond to right now

    Here’s the catch: this window is finite. A router’s TCAM can only hold so many prefixes before something has to be summarized (aggregated) or dropped. An LLM’s context window works the same way — it has a hard token ceiling, and once that ceiling is hit, something has to give:

    Strategy Networking Analogy
    Truncation — oldest info gets dropped Aging out the oldest entries in a MAC address table
    Summarization — history gets compressed Route summarization/aggregation to save table space
    Retrieval (RAG) — only pull what’s relevant, on demand On-demand route lookup instead of holding every path in memory

    And just like TCAM size doesn’t automatically make a design better, a bigger context window isn’t automatically the right call either. Larger windows cost more, respond slower, and models tend to pay less attention to details buried in the middle of a long context — a phenomenon researchers call “lost in the middle.” Smaller windows force discipline: more frequent summarization, more deliberate retrieval, cleaner architecture. Sound familiar? It’s the same trade-off as deciding between a flat Layer 2 domain and a properly segmented, aggregated Layer 3 design — more “room” isn’t inherently better if it isn’t managed well.

    Not Just Text Anymore

    Just as your monitoring stack pulls in more than plain-text logs — interface counters, flow records, topology diagrams — modern AI agents aren’t limited to text either. Multimodal perception means an agent can take in images, code, and structured data (JSON, XML) alongside plain text, which matters if you’re feeding it a topology diagram, a config file, or an API response instead of a chat message.

    Worth noting for anyone budgeting token usage: not all input is equally “expensive.” Structured data like JSON/XML is notoriously token-hungry compared to plain prose, and code is denser than casual text. A large API response and a lengthy document can burn through a similar token budget even though one “reads” much longer than the other — the same way a small config with heavy ACL entries can outweigh a much longer, simpler one in terms of what it costs to process.

    Why Context Quality Is the Real Lever

    Here’s the one-line summary that matters most: the quality of what goes into the context window directly determines the quality of the agent’s reasoning. A monitoring system fed incomplete telemetry gives you an incomplete picture of the network, no matter how good the analysis engine behind it is. An AI agent working from a messy, disorganized, or overstuffed context will reason just as poorly — confidently, even, which is the more dangerous failure mode.

    FAQ

    Q- Which statement
    accurately describes an agent’s context window capacity?

    • Context windows retain full conversation
      history across multiple sessions.
    • Context windows expand automatically as
      conversations grow longer.
    • Context windows are limited by a maximum
      token count defined by the model.
    • Context windows increase in size when
      tools are removed from the agent’s configuration.

    Ans- Context windows are limited by a maximum token count defined by the
    model.

    Correct! Every model has a finite context
    window defined by a maximum token count, and once this limit is reached, the
    agent must manage its memory through strategies like summarization or
    truncation. Context windows do not expand dynamically as conversations grow,
    nor do they persist across multiple sessions. While removing tool definitions
    frees up tokens within the window, the overall maximum size remains unchanged
    as it is a fixed property of the model.

    Quick Recap

    • Perception is stage one — before an agent reasons or acts, it has to gather and structure information, just like you gather data before diagnosing a network issue.
    • Webhooks push real-time events into an agent, functioning like a syslog/trap receiver for applications instead of network hardware.
    • The context window is finite working memory, built from system prompt, tools, history, and current input — manage it like you’d manage a limited routing/MAC table, via truncation, summarization, or retrieval.
    • Bigger isn’t always better — larger context windows add cost, latency, and the “lost in the middle” risk of buried details getting ignored.
    • Multimodal perception extends agents beyond text into images, code, and structured data — but structured formats consume tokens fast.
    • Context quality drives output quality — this is the one principle worth remembering above all the rest.

    If you found this useful, you’ll probably want the companion piece that covers what happens after perception — how the LLM actually reasons, what temperature and tokens do, and how this maps to real NetOps use cases:

    Related Reading on Networklearner:

    Need help with Cisco ACI, Nexus, data center networking, or network automation?
    I am a CCIE Data Center engineer with 18+ years of enterprise networking experience.
    Contact me for consulting, troubleshooting, design reviews, and project support.

  • BGP Timers on a VRF in ACI Multi-Site — Why NDO Can’t Do It and What Cisco TAC Confirmed

     If you’ve gone looking for a VRF-level BGP Timer Policy in Nexus Dashboard Orchestrator and come up empty, you’re not missing a menu — it genuinely isn’t there yet. Here’s what we found while troubleshooting this on a live Multi-Site fabric with a mix of stretched and local VRFs, the workaround Cisco TAC confirmed as supported, and exactly how to verify the new timers actually took effect instead of just assuming they did.

    • The gap: NDO does not expose a BGP Timer Policy at the VRF level for ACI Multi-Site — only at the L3Out node level (via L3Out Node Routing Policy → BGP Node Settings).
    • The workaround: Create and apply the BGP Timer Policy directly on APIC, per site, against the target VRF (local or stretched). Cisco TAC confirmed this is the correct and supported method.
    • The catch: BGP timers are negotiated during the initial handshake. Changing the policy alone does nothing to an already-established session — you need a hard reset of the BGP session for the new keepalive/hold values to take effect.
    • Don’t trust the config alone. “Configured” timers and “negotiated” (active) timers are two different things in show bgp output — always verify the negotiated value after the reset, not just the configuration.

    The Problem: No VRF-Level BGP Timer Option in NDO

    In a single-site APIC deployment, applying a custom BGP Timer Policy to a VRF is straightforward — it’s a native object under Tenant → Networking → VRF → BGP Context Per Address Family. In Multi-Site environments managed through NDO, that granularity isn’t there. NDO’s L3Out configuration model lets you attach a BGP Node Routing Policy (with its own keepalive/hold timers) to a node group inside an L3Out template — but there’s no equivalent construct for applying timers at the VRF level, independent of a specific L3Out’s node groups.

    For environments running mixed local and stretched VRFs across sites, that’s a real gap: you may want consistent BGP timer behavior tied to the VRF itself, not scattered across every L3Out node group that happens to reference it.

    What We Asked Cisco TAC

    Rather than guess, we opened a case and asked directly. Here’s the exchange, included for anyone hitting the same wall:

    Our question:

    We need to deploy BGP timers on a VRF within our ACI Multi-Site fabric. Our environment contains both stretched and local VRFs. We do not see an option in NDO to apply BGP timers at the VRF level. Therefore, we are planning to use the following approach: 1) Create a BGP Timer Policy on the APIC. 2) Apply the BGP Timer Policy to the target VRF (local or stretched) via APIC only. Could you please confirm whether the above procedure is the correct and supported method for configuring BGP timers in an ACI Multi-Site environment? Additionally, after applying the policy, we do not see the updated timer values reflected on the BGP neighbour sessions. Is a BGP session reset (hard reset) required for the new timer values to take effect, or are there any additional steps that need to be performed?

    Cisco’s response:

    Configuration Method: Your proposed approach is correct. As NDO does not currently support configuring BGP Timer Policies at the VRF level, applying these policies directly via the APIC on each respective site is the standard and supported method. 

    Session Reset: Yes, a BGP session reset (hard reset) is required for the new timer values to take effect. Because these timers are negotiated during the initial BGP handshake, the existing sessions must be torn down and re-established to renegotiate the new keepalive and hold-down values with the neighbor.

    Two things worth underlining from that response: this is a per-site, APIC-side configuration — NDO is not the tool for VRF-level BGP timers today — and a hard reset is mandatory, not optional, for the values to actually apply.

    Step-by-Step: Applying the BGP Timer Policy to a VRF via APIC

    1. Log into the APIC GUI for the site containing the target VRF (do this per site for stretched VRFs — there’s no single-pane push for this from NDO).
    2. Navigate to Tenants → <tenant> → Networking → VRFs → <vrf-name>.
    3. Under the VRF, go to the BGP Context Per Address Family (create one for each address family in use — IPv4 and/or IPv6).
    4. Set the BGP Timers field to a custom BGP Timer Policy, or create a new one:
      • Go to Tenants → <tenant> → Policies → Protocol → BGP → BGP Timers, right-click and Create BGP Timers Policy.
      • Set Keepalive Interval (sec) and Hold Interval (sec) to your target values (keep the standard 1:3 ratio — e.g., 4/12 or 10/30 — most implementations expect hold time to be roughly 3x keepalive).
    5. Apply the policy to the VRF’s BGP Context Per Address Family and submit.
    6. Repeat per site for any stretched VRF — this is not propagated automatically across the Multi-Site domain since it’s an APIC-local object, not an NDO-managed one.
    7. Confirm the object landed correctly:
       GET https://<apic>/api/node/mo/uni/tn-<tenant>/ctx-<vrf>/bgpCtxAfP-ipv4-ucast.json

    Check for the tnBgpTimersPolName attribute pointing to your new policy.

    Why the Timers Won’t Show Up Until You Reset the Session

    This trips people up every time: BGP keepalive and hold timers are exchanged in the OPEN message during session establishment — they’re not a live, continuously-enforced parameter that updates on the fly. Changing the policy updates the configuration, but an already-established session keeps running on whatever timers it originally negotiated until it’s torn down and rebuilt.

    That means after step 7 above, show bgp will show your configured timers, but the negotiated/active timers on any existing session will still be the old values — until you force a reset.

    Verifying the Change Actually Took Effect

    Don’t just trust the APIC MO or the CLI’s “configured” line — verify the negotiated value, which is what’s actually governing the session.

    1. Check the configured value on the border leaf:

    show bgp <afi> unicast neighbors <peer-ip> vrf <tenant>:<vrf-name>

    Look for: Configured hold time is 12, keepalive interval is 4 seconds

    2. Check the negotiated (active) value in the same output:
    Look for: Hold time is X, keepalive interval is Y seconds
    If X/Y still show the old defaults, the session hasn’t renegotiated — move to step 3.

    3. Force the hard reset:

    clear bgp <afi> unicast <peer-ip> vrf <tenant>:<vrf-name>

    A soft clear will not renegotiate timers — timers only get exchanged at session establishment, so this has to be a hard clear.

    4. Re-check the negotiated value after the reset:

    show bgp <afi> unicast neighbors <peer-ip> vrf <tenant>:<vrf-name>

    The negotiated value will be the lower of what each side offers — if your peer’s own BGP timer configuration is set higher (or lower) than yours, that governs the final negotiated result, not your configured value alone.

    5. Confirm real-world keepalive cadence:

    show bgp <afi> unicast neighbors <peer-ip> vrf <tenant>:<vrf-name> | include "Last read"

    Run this two or three times a few seconds apart — “Last read” should reset roughly every N seconds, matching your new keepalive interval.

    6. Watch for flapping after the change, especially with aggressive timers like 4/12:

    show bgp <afi> unicast neighbors <peer-ip> vrf <tenant>:<vrf-name> | include "Last reset"
    show logging logfile | include BGP

    A Word of Caution on Aggressive Timers

    Tighter timers (like 4-second keepalive / 12-second hold) improve failure-detection speed, but they raise the risk of false-positive flaps on links with variable latency, high CPU load on the peer device, or congested control-plane paths. Before rolling this out broadly across a Multi-Site fabric, test it on a single non-critical VRF/L3Out first and monitor for a few days.

    FAQ

    Does NDO support VRF-level BGP timers at all?
    Not currently. The only BGP timer construct exposed in NDO is at the L3Out node group level (L3Out Node Routing Policy → BGP Node Settings). VRF-level BGP Timer Policies must be applied directly on APIC, per Cisco TAC’s confirmation.

    Will this survive an NDO template push or resync?
    Since the VRF-level BGP Timers Policy is applied directly on APIC and not modeled in the NDO template, it should not be overwritten by a standard template redeploy — but any workflow that deletes and recreates the VRF from NDO would remove it. Treat it as an out-of-band configuration and document it clearly for your team.

    Do I need to reset the session on both sides of the peering, or just my side?
    Just your side’s session needs a hard clear to force renegotiation — BGP will tear down and rebuild the full session, which inherently re-triggers the handshake and timer exchange on both ends.

    What’s a safe keepalive/hold ratio to use?
    Cisco and most vendors expect hold time to be roughly 3x keepalive (e.g., 4/12, 10/30, 20/60). Going below that ratio, or setting a very low hold time on a link with real latency or jitter, increases false-positive flap risk.

    Is this the same procedure for a stretched VRF across multiple sites?
    Yes, but it must be repeated per site — this is an APIC-local object, and NDO doesn’t propagate it across the Multi-Site domain automatically. For a stretched VRF, log into each site’s APIC and apply the same BGP Timer Policy independently.

    Related Reading on Networklearner


    Author note: 

    Need help with Cisco ACI, Nexus, data center networking, or network automation?
    I am a CCIE Data Center engineer with 18+ years of enterprise networking experience.
    Contact me for consulting, troubleshooting, design reviews, and project support.

  • Understanding AI Agents for Network Engineers: LLMs, Prompts, Tokens and Context Explained

    Artificial Intelligence is rapidly becoming part of modern network operations. From troubleshooting assistants to automated change management, AI agents are beginning to work alongside network engineers.

    But what exactly powers these agents?

    If you’ve configured routing protocols, built automation scripts, or managed network monitoring systems, understanding AI agents isn’t as complicated as it might seem. This guide walks through the core building blocks of AI agents using networking analogies that any network engineer will recognize.

    What Is an AI Agent?

    An AI agent is a software system that can understand a goal, make decisions, and take actions to achieve that goal.

    Compare it to a traditional network automation script. A Python script might be programmed to check interface status, detect a down link, and send an alert — it follows predefined instructions, nothing more.

    An AI agent works differently. Instead of following a fixed set of rules, it can:

    • Understand a request written in natural language
    • Analyze available information
    • Decide which action to perform
    • Adapt when unexpected situations occur

    That flexibility is what makes AI agents powerful.

    Traditional Automation vs. AI Agents

    Traditional automation follows rigid logic, such as IF Interface Down → Send Email. It’s predictable, easy to troubleshoot, and great for repetitive tasks — but it cannot handle unknown scenarios and lacks contextual understanding.

    AI-powered agents focus on outcomes rather than rigid instructions. Given a prompt like “Analyze this network outage and suggest possible root causes,” an agent can review logs, analyze symptoms, identify possible issues, and recommend troubleshooting steps. It understands natural language, adapts to new situations, and can handle partially known problems.

    The LLM: The Brain Behind Every AI Agent

    At the center of every AI agent is a Large Language Model (LLM) — think of it as the control plane of the system. Just as a network’s control plane makes routing decisions, the LLM makes reasoning decisions: understanding requests, processing information, choosing tools, and generating responses. Without the LLM, an AI agent is just a collection of disconnected tools.

    Why the System Prompt Matters

    The System Prompt is like a design document combined with operating procedures. It tells the AI who it is, what it should do, what to avoid, and which tools it can use — for example: “You are a Network Operations Assistant. Help engineers troubleshoot enterprise networks. Explain reasoning clearly. Use available monitoring tools when necessary.” Without a solid system prompt, an AI agent can produce inconsistent or irrelevant responses.

    Understanding Temperature: The Creativity Dial

    Temperature controls how predictable or creative an AI’s output is.

    • Temperature = 0 — the model always picks the most likely answer. Best for troubleshooting, configuration validation, and change management, where consistency and accuracy matter most.
    • Higher temperature — more creative and exploratory output, useful for brainstorming and content generation, but with a higher risk of inconsistent answers and hallucinations.

    For network operations, a range of 0 to 0.3 is generally preferred.

    What Are Tokens?

    A token is a small unit of text processed by an LLM. As a rough rule of thumb, one token is about 4 English characters, and 100 words is roughly 130 tokens. Tokens directly affect processing cost, response speed, and context limits.

    The Context Window: AI’s Working Memory

    The context window is effectively the RAM of an AI agent — it holds the system prompt, tool definitions, conversation history, and the current request. The larger the window, the more the AI can “remember” during a session.

    Just as troubleshooting gets harder if a monitoring system forgets earlier alerts mid-investigation, an AI agent’s performance can degrade once its context window fills up: older details get dropped, and accuracy can suffer. Efficient context management is essential for enterprise AI solutions.

    Other Important AI Agent Parameters

    • Max Tokens — the output limit for a single response, like a bandwidth cap.
    • Stop Sequences — signals that tell the model when to stop generating, often used when calling external tools or handing control back to a user or system.
    • Top-P — controls how many candidate next-words the model considers; lower values are more focused, higher values more diverse.
    • Frequency Penalty — reduces repetitive language, useful when generating reports, documentation, and troubleshooting guides.

    Real-World Network Engineering Use Cases

    • Network troubleshooting — log analysis, root cause identification, incident summaries
    • Configuration assistance — config review, error detection, best-practice recommendations
    • Documentation generation — design docs, change records, runbooks
    • Knowledge management — searching engineering documentation, answering technical questions, step-by-step procedures

    Key Takeaways

    • LLMs act as the reasoning engine of AI agents
    • System prompts define behavior and scope
    • Temperature controls creativity and consistency
    • Tokens are the building blocks of AI processing
    • Context windows determine what the agent can remember
    • Proper configuration leads to more reliable AI agents

    Final Thoughts

    Just as networking evolved from manual CLI configuration to automation, the industry is now entering an era of intelligent, AI-assisted operations. Understanding LLMs, prompts, temperature, and context windows gives network engineers the foundation to work with this next generation of tools — and you don’t need to become a data scientist to get there. If you already understand how networks make decisions, you’re closer to understanding AI than you might think.

    FAQ

    What is an AI agent?

    A software system that uses an LLM to understand goals, make decisions, and perform tasks — adapting to new situations rather than following fixed rules.

    How is it different from traditional network automation?

    Traditional automation follows fixed rules (“if interface down, alert”). An AI agent can handle open-ended requests (“investigate why Branch A is slow”) by analyzing logs and configs and reasoning about likely causes.

    Can AI agents replace network engineers? 

    No. They’re force multipliers for troubleshooting, documentation, and automation — but engineers remain responsible for design, security, governance, and business decisions.

    What is hallucination? 

    When an AI generates plausible-sounding but inaccurate or fabricated information (e.g., a command or error message that doesn’t exist). Always verify AI output before acting on it.

    Which AI skills should network engineers learn first? 

    Prompt engineering, AI agents, generative AI fundamentals, basic Python, REST APIs, network automation, retrieval-augmented generation (RAG), and agentic AI workflows.

    Related Reading on Networklearner

    Need help with Cisco ACI, Nexus, data center networking, or network automation?
    I am a CCIE Data Center engineer with 18+ years of enterprise networking experience.
    Contact me for consulting, troubleshooting, design reviews, and project support.

  • Why BGP Maximum-Paths Wasn’t the Problem: Fixing Uneven Port-Channel Traffic on Cisco Nexus and IOS

     If you’ve ever pulled up interface counters and seen one port-channel member carrying 70–80% of the traffic while its bundle-mate sits nearly idle, your first instinct is probably the same one we had: “BGP load balancing must be broken.”

    It usually isn’t. Here’s the case we worked through, why BGP was innocent from the start, and the actual fix.

    TL;DR

    • Symptom: One port-channel member interface was carrying the majority of traffic; the other was underutilized.
    • First suspect: BGP maximum-paths — already configured correctly, and confirmed working via ECMP.
    • Real cause: The port-channel load-balancing algorithm (src-dst-ip enhanced) was hashing large, persistent flows onto the same physical link every time.
    • Fix: Move to src-dst-mixed-ip-port (or the NX-OS equivalent src-dst ip-l4port) to add Layer 4 entropy to the hash.
    • Caveat: If the imbalance is caused by a single “elephant flow,” even L4 hashing won’t split it — that needs a different tool entirely.

    The Symptom

    The environment was already running router bgp with maximum-paths 8 configured, so multiple equal-cost paths were expected to be installed and used. But interface counters told a different story — one member of the port-channel was consistently running hot while the other stayed quiet, day after day, regardless of overall traffic volume.

    Router# show interface port-channel 10 | include rate
      5 minute input rate 812000000 bits/sec, 95000 packets/sec
      5 minute output rate 790000000 bits/sec, 92000 packets/sec
    
    Router# show interface gigabitethernet 1/1 | include rate
      5 minute input rate 780000000 bits/sec, 91000 packets/sec
    
    Router# show interface gigabitethernet 1/2 | include rate
      5 minute input rate 32000000 bits/sec, 4000 packets/sec

    That’s roughly a 96/4 split across two members of the same bundle — not something you’d expect from a healthy port-channel.

    Ruling Out BGP First

    Before touching anything on the switching side, we confirmed the routing layer was actually doing its job.

    Router# show ip bgp summary
    Router# show ip route 10.20.30.0
    Routing entry for 10.20.30.0/24
      Known via "bgp 65001", distance 20, metric 0
      Routing Descriptor Blocks:
      * 192.168.1.1, from 192.168.1.1
          192.168.1.2, from 192.168.1.2

    Two next-hops installed for the same prefix, exactly as maximum-paths 8 should produce when the paths are equal-cost. BGP ECMP was functioning correctly — routing decisions were being made across multiple paths, so it made no sense to keep chasing BGP config as the root cause.

    That’s the key thing to internalize: BGP ECMP and port-channel load balancing are two completely separate mechanisms operating at two different layers.

    Layer Mechanism Decides
    Layer 3 (Routing) BGP maximum-paths / ECMP Which path (next-hop) traffic takes
    Layer 2 (Switching) Port-channel hash algorithm Which physical member link within a bundle carries a given flow

    Even with BGP perfectly distributing traffic across paths, each of those paths might egress through a port-channel — and it’s entirely possible for the hashing algorithm on that port-channel to funnel most flows onto one member link regardless of what BGP is doing upstream.

    Checking the Current Hashing Algorithm

    Next step: find out what hash algorithm the port-channel was actually using.

    On IOS / IOS-XE:

    Router# show etherchannel load-balance
    EtherChannel Load-Balancing Configuration:
            src-dst-ip

    On Nexus (NX-OS):

    Switch# show port-channel load-balance
    Port Channel Load-Balancing Configuration:
    System: src-dst ip

    Both confirmed the same thing: the algorithm was using only Layer 3 information — source and destination IP address — to compute the hash and select a member link.

    Why src-dst-ip Pins Big Flows to One Link

    The hash is deterministic. Given the same source IP and destination IP, the algorithm produces the same result every single time, which means every packet in that flow is sent down the same physical link.

    That’s fine when you have many different flows between many different IP pairs — the hash spreads them out reasonably well. It falls apart when a small number of flows dominate the traffic, which is exactly what a database replication stream, a backup job, or a storage sync between two fixed IPs looks like: same source, same destination, forever — one hash result, one link, permanently.

    This isn’t a bug. Cisco’s port-channel load balancing is intentionally flow-based, not packet-based, specifically to avoid packet reordering within a TCP session. The trade-off is that a big, long-lived flow can dominate a single member link even when the bundle as a whole has spare capacity.

    The Fix: Add Layer 4 to the Hash

    Switching from src-dst-ip to src-dst-mixed-ip-port pulls TCP/UDP source and destination port numbers into the hash calculation alongside the IP addresses.

    IOS / IOS-XE:

    Router(config)# port-channel load-balance src-dst-mixed-ip-port

    NX-OS (Nexus):

    Switch(config)# port-channel load-balance src-dst ip-l4port

    Some Nexus platforms go a step further and support VLAN as an additional hash input for even more entropy:

    Switch(config)# port-channel load-balance src-dst ip-l4port-vlan

    With source/destination ports added, two different application sessions between the same pair of servers (say, a web server and a database server running several concurrent connections) will now very likely produce different hash results — and land on different physical links — instead of all piling onto whichever link the IP-only hash happened to pick.

    In environments with many concurrent sessions between the same endpoints (application servers, load balancers, hypervisor clusters), this alone often meaningfully improves the balance.

    Before You Make the Change

    A few things worth knowing before you touch a production bundle:

    • It’s generally non-disruptive on most Cisco platforms — you don’t need to shut the port-channel.
    • Every existing flow gets re-hashed immediately. Expect a brief window of packet reordering as flows redistribute across members. It’s usually transparent to TCP, but schedule the change for a maintenance window or low-traffic period if the environment is sensitive (VoIP, storage replication, etc.).
    • This is still flow-based hashing, just with more inputs. A single elephant flow — one enormous, sustained stream between one IP:port pair — will still be pinned to one physical link even after adding L4 information. Layer 4 hashing splits up multiple flows between the same hosts; it does not split a single flow.

    If It’s an Elephant Flow, Hashing Alone Won’t Fix It

    If, after the change, one link is still running noticeably hotter than the others, don’t keep tweaking the hash algorithm — look for a dominant flow instead:

    Router# show interface port-channel 10 | include rate
    Switch# show flow monitor <name> cache

    or pull top talkers from NetFlow/sFlow/telemetry. If you find one flow consuming most of the bandwidth, your real options are traffic engineering (splitting the application across multiple sessions/IPs if possible), platform-specific dynamic load balancing features (several Nexus platforms support Dynamic Load Balancing, which rebalances flows based on real-time link utilization rather than a static hash), or simply accepting that a single-flow workload isn’t a great fit for port-channel-based scaling in the first place.

    Verification Checklist

    After changing the algorithm, give it a few hours under real traffic and check:

    • Port-channel member interface utilization (show interface … | include rate on each member)
    • Top bandwidth-consuming flows (NetFlow/sFlow/telemetry)
    • Interface error/discard counters (rule out anything unrelated masquerading as imbalance)
    • Application-level traffic distribution if you have flow visibility tools

    If the split moves from something like 96/4 toward 55/45 or 60/40, the change did its job. If it barely moves, you’re very likely looking at an elephant-flow scenario rather than a hashing-algorithm problem.

    FAQ

    Does changing the port-channel load-balancing algorithm cause an outage?
    No — on most Cisco IOS, IOS-XE, and NX-OS platforms this is a non-disruptive change. Existing flows get re-hashed and may briefly reorder, but the port-channel itself stays up.

    Will src-dst-mixed-ip-port always produce perfectly even traffic distribution?
    No. It improves distribution when multiple flows exist between the same endpoints, but a single very large flow will still be pinned to one member link, since hashing is flow-based, not packet-based.

    How do I check the current load-balancing algorithm on a Nexus switch?
    show port-channel load-balance on NX-OS. On IOS/IOS-XE, use show etherchannel load-balance.

    Is BGP maximum-paths related to port-channel hashing at all?
    No — they operate at different layers. maximum-paths controls how many equal-cost paths BGP installs at Layer 3. Port-channel hashing controls which physical member link, at Layer 2, carries a given flow once it’s already been routed onto that path.

    What’s the best load-balancing algorithm for Cisco port-channels in general?
    There isn’t a universal “best” — it depends on traffic patterns. src-dst-mixed-ip-port (or NX-OS’s ip-l4port) is a strong general-purpose default for environments with many concurrent sessions between the same hosts, since it adds the most useful entropy without added complexity.

    Conclusion

    BGP maximum-paths was never the issue in this case — it was correctly installing and using multiple equal-cost paths exactly as designed. The imbalance lived one layer down, in the port-channel’s src-dst-ip hashing algorithm, which pins any given source/destination IP pair to a single physical link. Moving to src-dst-mixed-ip-port added Layer 4 awareness to the hash and meaningfully improved distribution — with the caveat that a genuine elephant flow needs a different fix entirely.

    The broader lesson: when you see uneven link utilization on a bundle, don’t assume the routing protocol is at fault. Check where the imbalance actually lives — Layer 3 path selection or Layer 2 hash distribution — before you start changing BGP configuration that may already be working exactly as intended.


    Related Articles

    If this was useful, these go deeper on the BGP and Cisco fundamentals that sit underneath this issue:

  • Why BGP Maximum-Paths Wasn’t the Problem: Understanding Port-Channel Load Balancing and Traffic Imbalance

    Recently, we investigated a case where traffic utilization across port-channel member interfaces was significantly unbalanced. One of the links was carrying the majority of the traffic while the other link remained underutilized. Since the environment was already configured with BGP maximum-paths 8, the initial assumption was that BGP load balancing might not be functioning correctly.

    After reviewing the configuration, we confirmed that BGP ECMP was operating as expected and that multiple equal-cost paths were available. This shifted our focus from the routing layer to the port-channel load-balancing mechanism.

    Why BGP Was Not the Problem

    The configuration already included BGP maximum-paths 8, which allows the router to install and use multiple equal-cost paths. This means the network was capable of leveraging several routes simultaneously, eliminating BGP as the primary suspect.

    It is important to understand that BGP ECMP and port-channel load balancing serve different purposes. BGP decides which routing path should be used, while the port-channel hashing algorithm determines which physical member link will carry the traffic.

    Even when ECMP is working perfectly, traffic can still become concentrated on a single port-channel member if the hashing algorithm maps large flows to the same interface.

    Current Hashing Algorithm Analysis

    The port-channel was configured with the src-dst-ip enhanced load-balancing algorithm.

    This algorithm uses only the source and destination IP addresses to calculate the hash. If a traffic flow continuously uses the same source and destination IP addresses, all packets belonging to that flow will be forwarded through the same member interface.

    For example, a database replication stream between two servers will always generate the same hash result. As a result, the entire flow remains pinned to a single physical link regardless of how much unused bandwidth exists on other members of the port-channel.

    This behavior is normal because Cisco port-channel load balancing is flow-based rather than packet-based. The objective is to avoid packet reordering and maintain application performance.

    Considering src-dst-mixed-ip-port

    To improve traffic distribution, we evaluated changing the load-balancing algorithm from src-dst-ip enhanced to src-dst-mixed-ip-port.

    Unlike the current configuration, this method includes both Layer 3 and Layer 4 information in the hash calculation. In addition to source and destination IP addresses, it also considers source and destination TCP or UDP port numbers.

    This creates a larger number of unique hash combinations and increases the likelihood that different application sessions between the same endpoints will be distributed across multiple member links.

    In environments where users, applications, or servers establish numerous simultaneous connections, this approach often results in significantly improved bandwidth utilization across the port-channel.

    Important Considerations Before Making the Change

    Changing the load-balancing algorithm is generally considered a non-disruptive operation on most Cisco platforms. However, all existing traffic flows will be immediately re-hashed.

    As traffic gets redistributed across available links, there may be a brief period of packet reordering. While this is typically minor and transparent to most applications, implementing the change during a maintenance window or low-utilization period is recommended.

    Another important consideration is that even with Layer 4 information included, the load-balancing mechanism remains flow-based. If the imbalance is caused by a single high-bandwidth elephant flow, the entire flow will still be assigned to one member link.

    In such cases, changing the hashing algorithm may provide only limited improvement.

    Recommended Validation After the Change

    After implementing the new load-balancing method, monitor interface utilization and traffic patterns for several hours.

    Review the following:

    Port-channel member utilization

    Top bandwidth-consuming flows

    NetFlow or telemetry statistics

    Application traffic distribution

    Interface counters

    If traffic becomes more evenly balanced across the member interfaces, the change has achieved its objective. If the imbalance continues, further investigation should focus on identifying large elephant flows or application-specific traffic patterns.

    Conclusion

    Based on our analysis, BGP maximum-paths was not contributing to the bandwidth imbalance. The routing layer was functioning correctly and supporting multiple equal-cost paths as designed.

    The more likely cause was the src-dst-ip enhanced hashing algorithm, which uses only Layer 3 information and can result in traffic concentration when a small number of large flows dominate bandwidth consumption.

    Moving to src-dst-mixed-ip-port is a logical and widely adopted optimization because it introduces Layer 4 awareness into the hashing calculation and generally improves traffic distribution when multiple flows exist between the same source and destination hosts.

    While it may not solve scenarios involving a single elephant flow, it represents the most appropriate next step before exploring more advanced traffic-engineering options

  • Complete Firewalls Port Reference for Cisco ACI, Nexus Dashboard, NDO and NDI

    Complete Firewalls Port Reference for Cisco ACI, Nexus Dashboard, NDO and NDI

     

    If you’ve ever tried to onboard an APIC site into Nexus Dashboard Orchestrator (NDO) or Nexus Dashboard Insights (NDI) only to watch the connection sit at “Not Reachable,” the cause is almost always the same: a firewall or ACL between Nexus Dashboard and the ACI fabric is blocking a port nobody told you about.

    This guide consolidates every port you need — APIC to leaf/spine, APIC to Nexus Dashboard, NDO-specific ports, NDI-specific ports, and the internal ports a multi-node ND cluster needs between its own nodes — into one reference you can hand straight to your firewall team.

    Quick jump:


    Why this trips people up

    Nexus Dashboard isn’t one service — it’s a platform that runs NDO, NDI, and NDFC as apps on top of a shared cluster. Each app has its own port requirements on top of the base cluster ports, and each app can reach the fabric through a different interface (management network vs. data network, in-band vs. out-of-band APIC). Miss that distinction and you’ll open the right port on the wrong interface — the connection still fails, and it looks identical to a wrong-port problem.


    Management vs. data network — pick correctly {#management-vs-data-network}

    Nexus Dashboard interface What it’s for Reaches APIC via
    Management (mgmt) network UI access, NTP, DNS, firmware upgrades, Intersight, DC proxy Can reach APIC OOB or in-band, if routed
    Data network Node-to-node cluster traffic, and all app traffic — NDO, NDI, NDFC APIC in-band or OOB for NDO; in-band only for NDI

    Rule of thumb: if you’re only running NDI, or NDI alongside other services, the ND data interface must have IP reachability to the in-band management network of the APIC and every switch in the fabric — NDI pulls switch-level telemetry that OOB simply doesn’t carry. NDO is more flexible and can use either OOB or in-band APIC reachability.


    Port table: ND cluster ↔ outside world {#nd-cluster-ports}

    These are baseline ports every Nexus Dashboard cluster needs, regardless of which app (NDO/NDI/NDFC) you run on top.

    Also allow outbound to your NTP, DNS, and (if used) TACACS+/LDAP/RADIUS servers, plus internet/proxy access if the cluster needs firmware downloads or Intersight connectivity.


    Port table: NDO ↔ APIC {#ndo-apic-ports}

    NDO’s actual data-plane traffic to sites is just the APIC REST API over TCP 443. If you’re only building day-0/day-1 policy through NDO (no NDI), this is the shortest port list of the three.


    Port table: NDI ↔ APIC / fabric {#ndi-apic-ports}

    NDI is the most sensitive to the in-band requirement — before onboarding a fabric, confirm the in-band management EPG, bridge domain, and subnet are already built and that every leaf, spine, and APIC has a reachable in-band address. This is the step people skip and then spend hours troubleshooting “site unreachable” errors that are actually EPG/BD issues, not firewall issues.


    Port table: APIC ↔ Leaf/Spine (fabric internal) {#apic-fabric-ports}

    This traffic stays inside the ACI infra VRF and normally isn’t firewalled, but it’s worth documenting for anyone running APIC connectivity through an external device (e.g., a device sitting between APIC and a remote-leaf pair):

    If you’re extending remote leaf switches over a routed IPN, also confirm OSPF, DHCP relay, and multicast (PIM Bidir) are permitted, with a minimum MTU of 9150 bytes end to end.


    Troubleshooting checklist {#troubleshooting}

    Work through these in order before opening a TAC case:

    1. Ping test first. Confirm basic IP reachability from the ND data interface to the APIC in-band (for NDI) or in-band/OOB (for NDO) address. No ping = no point checking ports yet.
    2. Confirm which interface ND is actually using. Nexus Dashboard > Infrastructure > Cluster Configuration shows whether the data or management network is used for fabric connectivity.
    3. Verify APIC in-band is actually built (mgmt tenant, in-band BD, in-band EPG, node management addresses) — this is the single most common NDI onboarding blocker, not the firewall itself.
    4. Test port 443 directly from an ND node to the APIC IP with curl -vk https://<apic-ip> or openssl s_client -connect <apic-ip>:443.
    5. Check for SSL inspection/proxy devices sitting in the path — APIC’s certificate handling doesn’t play well with transparent SSL interception.
    6. Re-check site status after any firewall change — NDO/NDI cache connectivity state and may need a manual “Refresh” or re-registration, not just a rule change.

    FAQ {#faq}

    Does NDO need port 80, or just 443?
    In current releases, TCP 443 alone is sufficient for APIC REST API communication. Port 80 was referenced in older MSO documentation and is generally not required if 443 is reachable.

    Can NDI use the APIC out-of-band address?
    No. NDI depends on in-band reachability to both APIC and the switches for telemetry collection; OOB-only connectivity will not work for NDI.

    Do NDO and NDI need different firewall rules if both run on the same ND cluster?
    Yes — treat them as separate rule sets. NDO needs 443 to APIC. NDI additionally needs 443 (and sometimes 22) to every switch in the fabric over the in-band network.

    What’s the minimum MTU I need between Nexus Dashboard and the fabric?
    1500 bytes minimum on the ND data interface; higher MTU is supported if your infrastructure already runs jumbo frames.

    My rules look correct but the site still shows “Not Reachable.” What next?
    Check for SSL-inspecting firewalls/proxies in the path, confirm the APIC certificate hasn’t expired, and verify NTP is in sync across APIC and ND — clock skew alone can break TLS session establishment.


    Related reading on Networklearner

  • Reactive Automation vs Generative AI vs Agentic AI: A Decision Framework for Network Engineers

     I am a network professional with over 18 years of experience in enterprise and data‑center networking. I am a CCIE Data Center certified engineer with strong hands‑on expertise in Cisco Nexus and Cisco ACI design, deployment, troubleshooting, and operations. I work on production ACI fabrics and am available for Cisco ACI and Nexus freelancing or consulting work. 

    Most teams don’t have a shortage of “intelligent” tooling anymore — they have three different kinds running simultaneously, often without anyone having deliberately chosen which one belongs where. An EEM applet restarts a process. An engineer pastes a syslog snippet into ChatGPT at 2 a.m. A vendor’s new “AI-powered” NOC dashboard promises to investigate incidents on its own. These are not the same technology wearing different logos — they’re three genuinely different intelligence models, and picking the wrong one for a given job either wastes the tool’s potential or creates real operational risk.

    This post isn’t another “here’s what Agentic AI means” explainer. It’s a working decision framework: how to tell which of the three you actually need for a specific network operations problem, with a scoring checklist you can run against your own use cases.

    Table of Contents

    1. The Three Models, in Networking Terms
    2. The Same Incident, Handled Three Ways
    3. Decision Framework: Which One Do You Actually Need?
    4. Scoring Checklist for Your Own Use Case
    5. Where Governance and Cost Actually Change
    6. A Common Mistake: Over-Automating Too Early
    7. FAQ

    1. The Three Models, in Networking Terms {#three-models}

    Reactive Automation — EEM applets, SNMP trap handlers, cron-scheduled scripts, Ansible playbooks triggered on a webhook. Fixed IF-THEN logic, no memory of past events, same input always produces the same output. This has run enterprise networks reliably for decades and isn’t going anywhere.

    Generative AI — ChatGPT, Copilot, Claude, or a vendor’s embedded assistant, used the way you’d use a very well-read colleague: you ask, it explains, you decide what to do. It understands natural language and context within a session but takes no action on its own and has no persistent memory of your fabric across conversations unless you explicitly feed it that context each time.

    Agentic AI — given a goal rather than a question (“resolve this packet loss,” “bring this BGP session back up”), it independently gathers telemetry, reasons through multiple hypotheses, takes or recommends action, checks whether the action worked, and either closes the loop or escalates with evidence attached.

    2. The Same Incident, Handled Three Ways {#same-incident}

    Take an OSPF adjacency stuck in EXSTART between two data center routers.

    Reactive automation’s role: a monitoring script notices the neighbor state hasn’t reached FULL within an expected window and pages the on-call engineer. It has no opinion on why — it just knows the state is wrong.

    Generative AI’s role: the paged engineer asks an assistant “why would OSPF get stuck in EXSTART,” and gets a solid explanation — MTU mismatch, duplicate router ID, or an interface flapping mid-negotiation — along with the show commands to check each. The engineer still has to run those commands and decide.

    Agentic AI’s role: given the goal “restore OSPF adjacency between these two routers,” the agent pulls the interface MTU on both sides, checks router IDs, reviews recent interface error counters, forms a ranked hypothesis, and either proposes a specific fix or — if authorized for read-only + low-risk actions only — clears the interface counters and re-triggers negotiation, then verifies the adjacency actually reached FULL before closing the loop.

    None of these three replaces the other two. The monitoring script still needs to exist to trigger the whole chain. The assistant is still useful when a human wants to understand why, not just get a fix. The agent is valuable specifically when the investigation itself is the time-consuming part.

    3. Decision Framework: Which One Do You Actually Need? {#decision-framework}

    Ask these questions about the specific task in front of you, in order:

    Is the correct response always identical, regardless of context?
    If yes — stick with reactive automation. Interface down → generate a ticket. There’s no ambiguity to reason through, so paying for reasoning is waste.

    Does a human need to understand the “why” before acting, and is there time for that?
    If yes — generative AI is the right layer. Documentation review, config audits before a change window, explaining an unfamiliar error message — these benefit from an assistant, not autonomous action.

    Does resolving this require pulling data from multiple sources, forming a hypothesis, and iterating — and is speed more valuable than having a human drive each step?
    If yes — this is where an agent earns its keep. Multi-source root cause analysis, correlating a config change with a metrics regression, is exactly the kind of “read a lot, reason a bit, then act” work reactive scripts can’t do and manual assistant use is too slow for.

    4. Scoring Checklist for Your Own Use Case {#scoring-checklist}

    Score each statement 1 (no) to 3 (strongly yes) for the task you’re evaluating:

    • The correct action is identical every single time this trigger fires
    • A human explanation of root cause has real standalone value here, separate from fixing it
    • Multiple data sources need to be correlated before you’d even know what to try
    • Getting it wrong has low blast radius (a restarted service, not a routing change on a core switch)
    • Speed of resolution matters more than having a human in the loop for every step

    Mostly 1s on correlation/speed, high on “always identical” → reactive automation is enough; don’t over-build.
    High on “human explanation has value,” low on “always identical” → generative AI, used interactively, is the right fit.
    High on correlation and speed, and you’ve separately confirmed blast radius is controlled → agentic AI is worth piloting, with tight scoping on write access.

    5. Where Governance and Cost Actually Change {#governance-cost}

    This is the part most comparison posts skip. As you move from left to right across the three models, three things change together, not independently:

    Blast radius. A misconfigured EEM applet affects one device. A generative AI assistant giving bad advice affects whatever the human chooses to act on — there’s still a human check. An agent with write access across multiple devices, acting on its own reasoning, has a blast radius as large as the scope of its credentials — which is exactly why that scope has to be deliberately narrow.

    Auditability requirements. Nobody demands to know “why” a cron job restarted a service — the rule is the explanation. An agent’s action needs the reasoning chain logged alongside the command, because “why did it do that” has to be answerable after the fact, especially for anything customer-facing.

    Cost per incident. Reactive automation costs almost nothing per trigger. Generative AI costs a bit more per query but is bounded by how much a human chooses to ask. An agent that calls out to a model repeatedly across a busy fabric, on every event, can accumulate real compute cost — scope which events actually warrant agentic investigation rather than routing everything through it by default.

    6. A Common Mistake: Over-Automating Too Early {#common-mistake}

    The most common failure pattern isn’t under-using AI — it’s reaching for an agent before the underlying reactive automation and monitoring are solid. An agent reasoning over noisy, incomplete telemetry will produce confident, plausible-sounding conclusions that are wrong just as often as a junior engineer working from bad data would. Get the boring Level 1 monitoring accurate and complete first; the agent is only as good as the data it’s reasoning over.

    Quick Comparison Table {#quick-comparison}

    For anyone skimming, here’s the whole post in one table:

    Approach What Happens Pros Cons
    Reactive Alert → Page on-call Reliable, fast No diagnosis
    Generative ChatGPT explains possible causes Helpful context Human must act
    Agentic Agent investigates, diagnoses, proposes fix End-to-end handling Requires trust and guardrails

    FAQ {#faq}

    Q: Do these three models replace each other, or work together?
    They work together — reactive automation still generates the initial trigger, generative AI still supports human-driven investigation and documentation, and agentic AI adds a new layer on top for multi-step autonomous work. None of them eliminates the need for the other two.

    Q: Which one should a small network team with no AI experience try first?
    Generative AI, used interactively for documentation and troubleshooting explanations — it requires no new infrastructure, no write access to devices, and lets the team build intuition for what these models are good at before considering anything autonomous.

    Q: Is Agentic AI overkill for a small enterprise network?
    Often, yes, at least initially — the operational overhead of governance and access scoping only pays off once you have enough recurring, multi-source troubleshooting volume to make the investigation-time savings meaningful.

    Q: How do you decide how much autonomy to give an agent?
    Start read-only. Let it diagnose and recommend for a defined period, compare its conclusions against what your engineers found independently, and only extend action-taking permissions for the specific, narrow set of actions it has proven reliable on.

    Q: What’s the single biggest risk in this whole progression?
    Granting write access before trust has actually been earned through a track record — the risk isn’t that the AI is unintelligent, it’s that broad credentials plus a confidently wrong conclusion is a worse outcome than a slower, correct one.


    Related Articles

    Need help with Cisco ACI, Nexus, data center networking, or network automation?
    I am a CCIE Data Center engineer with 18+ years of enterprise networking experience.
    Contact me for consulting, troubleshooting, design reviews, and project support.