> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/chaos-engineering/faults/chaos-fault-categories/windows/windows-network-duplication.md).

# Windows network duplication

Windows network duplication is a Windows chaos fault that duplicates `NETWORK_PACKET_DUPLICATION_PERCENTAGE` percent of egress packets from the target Windows VM to destinations listed in `DESTINATION_HOSTS`/`DESTINATION_IPS` on ports `DESTINATION_PORTS` and protocols `NETWORK_PROTOCOLS` for `DURATION`, then removes the filter. The fault runs through the Windows chaos agent installed as a service on the target VM. Use the `NETWORK_WHITELIST_*` tunables to spare specific destinations.

Use this fault to test how a workload on a Windows VM behaves when packets are duplicated: whether TCP de-duplication handles the load, whether UDP receivers handle duplicate packets at the application layer, whether monitoring detects bandwidth spikes, and whether on-call alerts fire correctly.

{% hint style="info" %}
**RUN YOUR FIRST EXPERIMENT**

If you have not configured the chaos infrastructure yet, go to [Quickstart](/resilience-testing/chaos-engineering/new-to-chaos-engineering/quickstart.md) to install the chaos infrastructure and run an experiment end to end.
{% endhint %}

***

### Use cases <a href="#use-cases" id="use-cases"></a>

* **Duplicate packets on the wire:** Does TCP de-duplicate correctly, or does the workload's TCP stack misbehave?
* **UDP idempotency:** Do UDP receivers handle duplicates correctly, or does the workload process the same event twice?
* **Bandwidth spike:** Does the bandwidth spike trigger alerts and/or violate rate limits?

***

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

* **Windows chaos infrastructure:** Install the chaos agent on the target VM. Go to [Windows requirements and security considerations](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/windows/windows-chaos-permissions.md).
* **Administrator privileges:** Network duplication is an Advanced fault and requires the agent to run as administrator.

***

### Supported environments <a href="#supported-environments" id="supported-environments"></a>

| Platform                                                  | Support status                                                                                                                                          |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Windows Server VMs with the Windows chaos agent installed | Supported                                                                                                                                               |
| Linux VMs                                                 | Not supported (use [Linux network duplication](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/linux/linux-network-duplication.md)) |

***

### Permissions required <a href="#permissions-required" id="permissions-required"></a>

This fault is classified as **Advanced** and requires the chaos agent to run as administrator on the target VM.

***

### Fault tunables <a href="#fault-tunables" id="fault-tunables"></a>

**Chaos parameters**

| Tunable                                 | Description                                                              | Default |
| --------------------------------------- | ------------------------------------------------------------------------ | ------- |
| `DURATION`                              | Total duration of the fault as a Go duration string (for example `30s`). | `30s`   |
| `NETWORK_PACKET_DUPLICATION_PERCENTAGE` | Percentage of egress packets to duplicate (0-100).                       | `100`   |
| `DESTINATION_HOSTS`                     | Comma-separated destination hostnames.                                   | `""`    |
| `DESTINATION_IPS`                       | Comma-separated destination IPs/CIDRs.                                   | `""`    |
| `DESTINATION_PORTS`                     | Comma-separated destination ports.                                       | `""`    |
| `NETWORK_PROTOCOLS`                     | Comma-separated protocols (`tcp`, `udp`, `icmp`).                        | `""`    |
| `NETWORK_WHITELIST_DESTINATION_HOSTS`   | Hostnames excluded from duplication.                                     | `""`    |
| `NETWORK_WHITELIST_DESTINATION_IPS`     | IPs/CIDRs excluded from duplication.                                     | `""`    |
| `NETWORK_WHITELIST_DESTINATION_PORTS`   | Ports excluded from duplication.                                         | `""`    |
| `RAMP_TIME`                             | Wait period in seconds before and after the fault.                       | `0`     |

Tunables that apply to every fault are documented in [common tunables for all faults](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/common-tunables-for-all-faults.md).

***

### Fault execution in brief <a href="#fault-execution-in-brief" id="fault-execution-in-brief"></a>

The Windows chaos agent on the target VM installs a network filter that duplicates `NETWORK_PACKET_DUPLICATION_PERCENTAGE` percent of egress packets matching the destination/port/protocol filters (minus the whitelist) for `DURATION`, then removes the filter.

***

### Expected behavior during fault execution <a href="#expected-behavior-during-fault-execution" id="expected-behavior-during-fault-execution"></a>

* A configurable share of egress packets are sent twice.
* TCP receivers de-duplicate; UDP receivers see duplicates.
* Egress bandwidth approximately doubles for affected flows.
* After the duration ends, the filter is removed and traffic returns to baseline.

{% hint style="info" %}
**WHEN THE FAULT ENDS**

The chaos agent removes the network filter. Egress bandwidth returns to baseline within seconds.
{% endhint %}

#### Signals to watch <a href="#signals-to-watch" id="signals-to-watch"></a>

* **Egress bandwidth:** Use a [Prometheus probe](/resilience-testing/chaos-engineering/use-chaos-engineering/probes/apm-probes.md) on Windows Exporter network counters.
* **Workload:** Use an [HTTP probe](/resilience-testing/chaos-engineering/use-chaos-engineering/probes/http-probe.md).

***

### Verify the fault execution effect <a href="#verify-the-fault-execution-effect" id="verify-the-fault-execution-effect"></a>

1. **Inspect egress bytes on the VM during the chaos window.**

   ```powershell
   Get-Counter '\Network Interface(*)\Bytes Sent/sec' -Continuous
   ```

   Bytes sent per second should rise during the window.

***

### Recovery and cleanup <a href="#recovery-and-cleanup" id="recovery-and-cleanup"></a>

* **End of duration:** The chaos agent removes the filter.
* **Abort:** Stopping the experiment also removes the filter.
* **Manual recovery:** Restart the chaos agent service if filters survive.

***

### Limitations <a href="#limitations" id="limitations"></a>

* **Egress only:** The rule affects egress packets only.
* **TCP often masks duplication:** TCP receivers de-duplicate, so the visible effect is bandwidth doubling, not duplicate processing at the app layer.
* **Administrator required:** This is an Advanced fault and requires the agent to run as administrator.

***

### Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>Windows network duplication has no observable effect in Harness Chaos Engineering</summary>

TCP de-duplicates transparently, so the most visible signal is egress-bandwidth doubling. For UDP workloads, the workload must check for duplicate messages itself.

</details>

***

### Related faults <a href="#related-faults" id="related-faults"></a>

* [Windows network loss](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/windows/windows-network-loss.md): Drop packets instead of duplicating them.
* [Windows network corruption](/resilience-testing/chaos-engineering/faults/chaos-fault-categories/windows/windows-network-corruption.md): Corrupt packets instead of duplicating them.
