Skip to content

Virtual Networking Overview

PiVirt delivers versatile software-defined networking capabilities, enabling seamless layer-2 connectivity, isolated VLAN networks, multi-host VXLAN overlays, and line-rate hardware passthrough.

network:
bridges:
- name: "virbr0"
type: "bridge"
interface: "eth0"
network:
bridges:
- name: "vlan-bridge"
type: "bridge"
interface: "eth0"
vlan_aware: true
vlans:
- id: 10
name: "management"
- id: 20
name: "storage"
Terminal window
pvcli network vlan create \
--name vlan10 \
--bridge virbr0 \
--vlan-id 10
spec:
nics:
- name: eth0
network: virbr0
vlan: 10
Terminal window
pvcli network create \
--name vxlan-net \
--type vxlan \
--vni 1000 \
--local-ip 10.0.1.10 \
--remote-ips 10.0.1.11,10.0.1.12
network:
vxlans:
- name: "vxlan100"
vni: 100
local_ip: "10.0.1.10"
remote_ips:
- "10.0.1.11"
- "10.0.1.12"
port: 4789
network:
sriov:
- name: "sriov-net"
pf: "eth2"
vfs: 8
spec:
nics:
- name: eth0
network: sriov-net
model: vfio-pci
apiVersion: pivirt.pilab.hu/v1
kind: NetworkPolicy
metadata:
name: web-isolation
namespace: production
spec:
podSelector:
matchLabels:
app: web
ingress:
- from:
- namespaceSelector:
matchLabels:
name: monitoring
ports:
- protocol: TCP
port: 80
spec:
nics:
- name: eth0
network: virbr0
ipam:
mode: dhcp
spec:
nics:
- name: eth0
network: virbr0
ipam:
mode: static
address: "10.0.1.100/24"
gateway: "10.0.1.1"
spec:
nics:
- name: eth0
model: virtio # Best performance
spec:
nics:
- name: eth0
queues: 2 # Match vCPU count
spec:
nics:
- name: eth0
bandwidth:
ingress:
rate: "100Mbps"
egress:
rate: "50Mbps"
Terminal window
# Check bridge
brctl show virbr0
# Check iptables
nft list ruleset | grep virbr0
# Check VM interface
pvcli vm get web-01 -o json | jq '.spec.nics'
Terminal window
# Check VXLAN interface
ip link show vxlan100
# Check UDP connectivity
nc -zv 10.0.1.11 4789
Terminal window
# Check IOMMU
dmesg | grep -i iommu
# Check VF availability
ls /sys/class/net/eth2/device/virtfn*