nf network
The nf network command configures networks used for node provisioning and cluster communication.
Each network is bound to a specific NIC on the master node and defines a CIDR range, gateway, DNS servers, and optionally a DHCP range. When nodes PXE boot, they receive an IP from the configured DHCP range.
Use nf nics list to find available NIC IDs before creating a network.
Usage
$ nf network list $ nf network create --cidr <cidr> --gateway <ip> --nicId <nic-id>
Commands
nf network list
nf network listList all configured networks with CIDR, gateway, DHCP range, DNS servers, and bound NIC.
| Flag | Description |
|---|---|
--json | Output results as JSON |
nf network create
nf network createCreate a new network bound to a NIC on the master node.
| Flag | Description |
|---|---|
--cidr | Network CIDR, e.g. 10.0.0.0/24 (required) |
--gateway | Gateway IP address (required) |
--dns | DNS servers (repeatable) |
--rangeStart | DHCP range start IP |
--rangeEnd | DHCP range end IP |
--nicId | NIC ID to bind the network to (required) |
Examples
$ nf network list NETWORKS: 1 (1 network)ID CIDR GATEWAY RANGE DNS NIC a1b2c3d4 10.0.0.0/24 10.0.0.1 10.0.0.100 → 10.0.0.200 8.8.8.8, 8.8.4.4 eth0
$ nf network create \ --cidr 10.0.0.0/24 \ --gateway 10.0.0.1 \ --dns 8.8.8.8 --dns 8.8.4.4 \ --rangeStart 10.0.0.100 \ --rangeEnd 10.0.0.200 \ --nicId 6ba7b810-9dad-11d1-80b4-00c04fd430c8 Network created successfully.