# Networking

All Testground runners *except* for the `local:exec` runner have two networks: a **`control`** and a **`data`** network.

* Test plan instances communicate with each other over the `data`network.
* Test plan instances communicate with infrastructure services such as the [sync service](https://protocol-labs.gitbook.io/testground/master/table-of-contents/concepts-and-architecture/sync-service) and InfluxDB over the `control` network.

?> This separation allows test instances to simulate disconnected scenarios; intermittent, failing connectivity; or high-latency scenarios without affecting other infrastructural comms.

!> The `local:exec` runner will use your machine's local network interfaces. **For now, this runner doesn't support traffic shaping.**

### Control Network

The `control` network is used to communicate with Testground services, such as the [sync service](https://protocol-labs.gitbook.io/testground/master/table-of-contents/concepts-and-architecture/sync-service) or InfluxDB. You don't need to do anything special to configure or use this network: the [sidecar](https://protocol-labs.gitbook.io/testground/master/table-of-contents/concepts-and-architecture/sidecar) will do it for you automatically.

After the [sidecar](https://protocol-labs.gitbook.io/testground/master/table-of-contents/concepts-and-architecture/sidecar) is finished *initializing the network*, it should be impossible to use the `control` network to communicate with other test plan instances.

However, a good test plan should avoid listening on and/or announcing the `control` network *anyways* to ensure that it doesn't interfere with the test. **Your test plan should always communicate with other test instances via the data network.**

### Data Network

The `data` network, used for communication between test plan instances, will be assigned a `B` block in the IP range `16.0.0.0/4`. Given the B block `X.Y.0.0`, `X.Y.0.1` is always the gateway and shouldn't be used by the test.

The subnet used will be passed to the test instance via the runtime environment (as `TestSubnet`).

?> **Success** From the Go SDK, you can use the [`network.GetDataNetworkIP()`](https://pkg.go.dev/github.com/testground/sdk-go@v0.2.1/network?tab=doc#Client.GetDataNetworkIP) function to acquire your data network IP address.
