Network Resource Kind
Kind: NetworkapiVersion: pivirt.hu/v1Aliases: net, nets, bridge
The Network resource manages host-level network connectivity, virtual switches, Linux bridges, DHCP servers, and firewall routing domains on the hypervisor.
Accepted Kind Aliases
Section titled “Accepted Kind Aliases”In pivirtctl commands, any of the following aliases are recognized:
Network, network, networks, net, nets, bridge, bridges, hostbridge, hostbridges.
Example Manifests
Section titled “Example Manifests”apiVersion: pivirt.hu/v1kind: Networkmetadata: name: physical-lan labels: scope: local-lanspec: mode: bridged bridge: br0 physicalPorts: - eth0 mtu: 1500apiVersion: pivirt.hu/v1kind: Networkmetadata: name: internal-nat labels: scope: privatespec: mode: nat bridge: virbr10 subnet: "192.168.100.0/24" gateway: "192.168.100.1" uplink: eth0 mtu: 1500apiVersion: pivirt.hu/v1kind: Networkmetadata: name: airgapped-dmzspec: mode: isolated bridge: virbr-dmz mtu: 1500apiVersion: pivirt.hu/v1kind: Networkmetadata: name: trunk-bridgespec: mode: bridged bridge: br-trunk physicalPorts: - eth1 vlanFiltering: true mtu: 9000 # Jumbo framesSpecification Reference (spec)
Section titled “Specification Reference (spec)”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
mode |
string |
Yes | bridged |
Network mode: isolated, nat, routed, bridged |
bridge |
string |
No | br-<name> |
Underlying Linux bridge device name in kernel |
subnet |
string |
No | CIDR subnet block for NAT or routed addresses (e.g. 10.0.0.0/24) |
|
gateway |
string |
No | Gateway IP address for the subnet | |
uplink |
string |
No | Physical parent interface for outbound NAT/routing | |
physicalPorts |
list[string] |
No | [] |
Physical NICs bound to this bridge |
vlanFiltering |
bool |
No | false |
Enable kernel 802.1Q VLAN filtering on bridge |
mtu |
int |
No | 1500 |
MTU frame size in bytes |
Network Modes Explained
Section titled “Network Modes Explained”bridged: Directly attaches guest virtual interfaces to the host’s physical network uplink. Guests obtain IP addresses from the external LAN’s DHCP server.nat: Creates an isolated private subnet behind host NAT (masquerade). Guests can reach outbound networks through the host’s uplink interface.routed: Connects guests to a private subnet that is routed without NAT (requires upstream routing tables).isolated: Complete host-only network with no outbound traffic forwarding.
CLI Management Examples
Section titled “CLI Management Examples”# Apply network manifestpivirtctl apply -f network-nat.yaml
# List all networkspivirtctl get networks
# List using short aliaspivirtctl get nets
# Inspect bridge status and assigned TAP portspivirtctl describe network internal-nat
# Delete network (safely tears down bridge, iptables chains, and routing)pivirtctl delete network internal-nat