Skip to main content

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.

PropertyValue
kindnetwork-interface
Interfacesethernet, wifi
locationA 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:

NamePort
upstreamThe 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.

ModeTypeWhat the bench does
disabledEitherTakes the port's link down.
dhcp-serverethernetTakes a fixed address and serves DHCP and DNS to devices on the port.
dhcp-clientethernetTakes an address from a DHCP server on the DUT's network.
staticethernetTakes a fixed address you set.
wifi-apwifiRuns a WiFi access point and serves DHCP and DNS to devices that join it.
wifi-stawifiJoins an existing WiFi network.

Use each mode only with its listed type. The bench doesn't check the pairing for you.

Settings by mode​

KeyModesRequiredDefaultDescription
modeAllYesOne of the modes above.
addressdhcp-server, wifi-ap, staticYesThe bench's own address on the port, in CIDR form: 192.168.100.1/24.
dhcp_range_startdhcp-server, wifi-apYesThe first address to hand out.
dhcp_range_enddhcp-server, wifi-apYesThe last address to hand out.
lease_timedhcp-server, wifi-apNo12hHow long a lease lasts, such as 30m or 12h.
dnsdhcp-server, wifi-apNo["1.1.1.1", "8.8.8.8"]The DNS servers the bench forwards DUT lookups to.
nat_masqdhcp-server, wifi-apNotrueShare the bench's own connection with the DUT, so the DUT can reach the internet.
gatewaystaticNoAdds a default route through this address.
route_tabledhcp-clientNoAssigned by the benchThe routing table number for routes learned on this port. Set it only if you need a fixed number.
ssidwifi-ap, wifi-staYesThe network name to serve or join.
pskwifi-ap, wifi-staYesThe passphrase, 8 to 63 characters. A wifi-sta joins WPA2 and WPA3 (SAE) networks with it.
wifi_channelwifi-apNo6The 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.

caution

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.