# network_split / iperf — Host
Wi-Fi runs on the coprocessor; the host runs its own LWIP / Linux-kernel
TCP/IP stack. The CP forwards 802.3 frames into the host netif (via the
network-split netif backend), so the host owns sockets in the
ephemeral port range (49152–61439) while the CP keeps low ports
(61440–65535) for its own services. This example throws iperf3 at that
split to measure throughput end-to-end.
## Supported Platforms and Transports
### Supported Coprocessors
| Coprocessor | ESP32 | ESP32-C Series | ESP32-S Series |
| :----------: | :---: | :------------: | :------------: |
| Support | Yes | Yes | Yes |
### Supported Host Devices
| Host Device | ESP32-P4 | ESP32-H2 | Other MCUs | Linux |
| :---------: | :------: | :------: | :--------: | :---: |
| Support | Yes | Yes | [Yes](https://github.com/espressif/esp-hosted/blob/master/docs/getting-started-mcu.md) | [Yes](https://github.com/espressif/esp-hosted/blob/master/docs/getting-started-linux.md) |
### Supported Connection buses
| Connection bus | SDIO | SPI Full-Duplex | SPI Half-Duplex | UART |
| :------------- | :--: | :-------------: | :-------------: | :--: |
| Linux host | Yes | Yes | No | No |
| MCU host | Yes | Yes | Yes | Yes |
Select the transport (must match the co-processor):
```bash
cd examples/network_split/iperf/mcu_host
idf.py set-target esp32p4
idf.py menuconfig
```
```text
Component config
└── ESP-Hosted
└── Configure host
└── Host transport
├── Communication bus (co-processor <== bus ==> host)
│ ├── ( ) SPI Full Duplex
│ ├── (X) SDIO <── default (match the co-processor)
│ ├── ( ) SPI Half Duplex
│ └── ( ) UART
└── SDIO Configuration ← slot, bus width, GPIOs (defaults OK)
```
Optionally spin up host-side traffic from the example's own menu (needs
Network Split enabled):
```text
ESP-Hosted Example Config
└── Example to run
├── [ ] MQTT client example <── default off
│ └── MQTT client config
│ └── MQTT Broker
│ ├── ( ) mqtt.eclipseprojects.io
│ └── (X) broker.hivemq.com <── default
└── [ ] HTTP client example <── default off
└── HTTP client config
├── (example.com) HTTP webserver to send req
├── (80) HTTP webserver port
├── (/) HTTP webserver path
└── (10) Delay after every http request (seconds)
```
The host Network-Split feature is enabled by `sdkconfig.defaults`; netif
ownership and host / CP port ranges live under **Features**:
```text
Component config
└── ESP-Hosted
└── Configure host
└── Features
└── [*] Network Split
├── [*] Auto-initialize Network-Split feature at boot
├── Host-side STA netif ownership + IP source
│ ├── (X) External: app owns the netif <── default
│ ├── ( ) Internal + DHCP: nw_split creates netif, host runs DHCP
│ └── ( ) Internal + static: nw_split creates netif, CP provides IP
└── LWIP port config
├── Host side (local) LWIP port config
│ ├── (49152) Host TCP start port
│ ├── (61439) Host TCP end port
│ ├── (49152) Host UDP start port
│ └── (61439) Host UDP end port
└── CP side (remote) LWIP port config
├── (61440) CP TCP start port
├── (65535) CP TCP end port
├── (61440) CP UDP start port
└── (65535) CP UDP end port
```
The Host dependency config is **pre-set in `sdkconfig.defaults`** (do not remove):
```text
CONFIG_ESP_HOSTED_HOST_FEAT_NW_SPLIT=y # host network-split netif backend
CONFIG_ESP_HOSTED_HOST_FEAT_WIFI=y # host Wi-Fi control
CONFIG_ESP_HOSTED_HOST_FEAT_RPC=y # RPC control path
CONFIG_ESP_HOSTED_HOST_FEAT_RPC_EXT_V2=y # required RPC ext-v2
CONFIG_ESP_HOSTED_HOST_FEAT_SYSTEM=y # system RPC calls
```
Then flash and monitor:
```bash
idf.py -p <host_usb_serial_port> flash monitor
```
<!-- generated from ../README.md — edit that file, not this one -->
To create a project from this example, run:
idf.py create-project-from-example "espressif/esp_hosted=3.0.2:network_split/iperf/mcu_host"