network-interface
The network-interface driver hands one of the bench's own network ports to
your tests. Depending on the mode, the bench serves addresses to the DUT, joins
the DUT's network, runs a WiFi access point, or takes the port down.
| Property | Value |
|---|---|
kind | network-interface |
| Interfaces | ethernet, wifi |
location | A bench port name: wired0, wifi0, and so on |
Example
This example gives one Ethernet port and one WiFi radio several configs each, and groups them into setups. See configs and setups for the syntax.
setups:
default: lab
lab:
- lan.dhcp_server
- radio.ap
field:
- lan.dhcp_client
- radio.sta
quiet:
- lan.off
- radio.off
lan:
kind: network-interface
name: "DUT LAN port"
location: wired0
configs:
dhcp_server:
name: "LAN DHCP server"
interfaces:
- type: ethernet
config:
mode: dhcp-server
address: 192.168.100.1/24
dhcp_range_start: 192.168.100.100
dhcp_range_end: 192.168.100.200
lease_time: 12h
dns: ["1.1.1.1", "8.8.8.8"]
nat_masq: true
dhcp_client:
name: "LAN DHCP client"
interfaces:
- type: ethernet
config:
mode: dhcp-client
static_addr:
name: "LAN static address"
interfaces:
- type: ethernet
config:
mode: static
address: 192.168.50.1/24
gateway: 192.168.50.254
off:
name: "LAN disabled"
interfaces:
- type: ethernet
config:
mode: disabled
radio:
kind: network-interface
name: "DUT WiFi radio"
location: wifi0
configs:
ap:
name: "WiFi access point"
interfaces:
- type: wifi
config:
mode: wifi-ap
ssid: mimick-dut
psk: "change-me-please"
wifi_channel: 6
address: 192.168.200.1/24
dhcp_range_start: 192.168.200.100
dhcp_range_end: 192.168.200.200
nat_masq: true
sta:
name: "WiFi station"
interfaces:
- type: wifi
config:
mode: wifi-sta
ssid: lab-network
psk: "lab-password"
off:
name: "WiFi disabled"
interfaces:
- type: wifi
config:
mode: disabled
Location
The bench names its Ethernet ports when it boots and its WiFi radios as they appear:
| Name | Port |
|---|---|
upstream | The bench's own connection to the Cloud. Reserved. |
wired0, wired1, ... | The other Ethernet ports. |
wifi0, wifi1, ... | WiFi radios. |
mimick peripheral list shows every port that no entry claims. You can't use
upstream as a location. To put a DUT on the bench's own network, use a
network-bridge instead.
A port can't be both a network-interface entry and a member of a
network-bridge.
Interface
Each peripheral, or each of its configs, declares exactly one interface:
ethernet for a wired port or wifi for a radio. Its mode decides everything
else.
| Mode | Type | What the bench does |
|---|---|---|
disabled | Either | Takes the port's link down. |
dhcp-server | ethernet | Takes a fixed address and serves DHCP and DNS to devices on the port. |
dhcp-client | ethernet | Takes an address from a DHCP server on the DUT's network. |
static | ethernet | Takes a fixed address you set. |
wifi-ap | wifi | Runs a WiFi access point and serves DHCP and DNS to devices that join it. |
wifi-sta | wifi | Joins an existing WiFi network. |
Use each mode only with its listed type. The bench doesn't check the pairing for you.
Settings by mode
| Key | Modes | Required | Default | Description |
|---|---|---|---|---|
mode | All | Yes | One of the modes above. | |
address | dhcp-server, wifi-ap, static | Yes | The bench's own address on the port, in CIDR form: 192.168.100.1/24. | |
dhcp_range_start | dhcp-server, wifi-ap | Yes | The first address to hand out. | |
dhcp_range_end | dhcp-server, wifi-ap | Yes | The last address to hand out. | |
lease_time | dhcp-server, wifi-ap | No | 12h | How long a lease lasts, such as 30m or 12h. |
dns | dhcp-server, wifi-ap | No | ["1.1.1.1", "8.8.8.8"] | The DNS servers the bench forwards DUT lookups to. |
nat_masq | dhcp-server, wifi-ap | No | true | Share the bench's own connection with the DUT, so the DUT can reach the internet. |
gateway | static | No | Adds a default route through this address. | |
route_table | dhcp-client | No | Assigned by the bench | The routing table number for routes learned on this port. Set it only if you need a fixed number. |
ssid | wifi-ap, wifi-sta | Yes | The network name to serve or join. | |
psk | wifi-ap, wifi-sta | Yes | The passphrase, 8 to 63 characters. A wifi-sta joins WPA2 and WPA3 (SAE) networks with it. | |
wifi_channel | wifi-ap | No | 6 | The 2.4 GHz channel to serve on. |
The bench checks address when the port opens, not when you deploy, so a
malformed address leaves the peripheral missing. It doesn't check that the DHCP
range falls inside the subnet, or the passphrase length. A passphrase outside 8
to 63 characters stops the access point from starting.
The access point serves 2.4 GHz WPA2-PSK only.
psk values sit in the file as plain text, and the Cloud keeps a copy of the
file. Don't reuse a passphrase that protects anything beyond the test network.
Routing
A dhcp-client or wifi-sta port doesn't replace the bench's default route,
so the bench keeps its own connection to the Cloud through upstream. The
routes it learns on the port stay separate from the bench's main routes.
Use it
Check a port's link, mode, addresses, and DHCP leases:
mimick peripheral info lan.dhcp_server.ethernet0
Reach a service on the DUT through the bench with mimick tunnel. For a DUT
network the bench joined in dhcp-client mode, pass the port's address with
--via:
mimick tunnel 192.168.100.50:22 2222
mimick tunnel 10.0.0.5:443 8443 --via lan.dhcp_client.ethernet0
Switch between configs from the Inventory tab of the bench page in the web UI.