Skip to main content

Networking

HYPR provides Docker-compatible networking for VMs with support for custom networks, DNS resolution, and port forwarding.

Overview

Each VM is assigned an IP address on a virtual network. VMs can communicate with each other by IP or by name (via built-in DNS). Port forwarding exposes VM services to the host.

Default Network

HYPR creates a default network automatically. Platform-specific configuration: Linux uses a custom subnet to avoid conflicts with Docker (172.17.0.0/16) and Tailscale (100.64.0.0/10). macOS uses the vmnet framework’s default range.

Creating Networks

Create a custom network:
With custom subnet:
With custom subnet and gateway:

Listing Networks

Output:

Inspecting Networks

Output:

Removing Networks

Force remove (even if VMs are attached):
Remove all unused networks:

Networks in Compose

Define networks in your compose file:
Services on the same network can communicate by service name:

Custom Subnets in Compose

DNS Resolution

HYPR runs a DNS server for .hypr domain resolution on port 41003.

VM Name Resolution

VMs are accessible by name with the .hypr suffix:

Service Name Resolution

Within compose stacks, services resolve by name:

Linux DNS Setup

On Linux with systemd-resolved, HYPR configures DNS automatically:
Manual configuration:

macOS DNS Setup

On macOS, HYPR creates a resolver file:

Port Forwarding

Expose VM ports to the host:
Multiple ports:
In compose:

Network Architecture

Linux

Components:
  • vbr0: Linux bridge device
  • tapN: TAP device per VM
  • IPAM: IP address allocation (SQLite-backed)
  • DNS: Built-in DNS server on the bridge IP

macOS

Components:
  • vmnet: Apple’s Virtualization framework network
  • DHCP: IP allocation via vmnet
  • DNS: Built-in DNS server

Troubleshooting

VM Cannot Reach Internet

Linux:
  1. Check IP forwarding:
    Enable:
  2. Check NAT:
  3. Check bridge exists:
macOS:
  1. Check vmnet service is running
  2. Verify libkrun permissions in Security & Privacy

DNS Not Resolving

  1. Check DNS server is running:
  2. Check /etc/resolv.conf in VM:
  3. Test with explicit nameserver:

VMs Cannot Communicate

  1. Verify both VMs are on the same network
  2. Check IP addresses:
  3. Test connectivity:

Port Forwarding Not Working

  1. Verify port mapping:
  2. Check service is listening in VM:
  3. Check host firewall:

Advanced Configuration

Custom Bridge Name

Networks create bridge devices with names like vbr0, vbr1, etc. The bridge name is shown in network inspect output.

IP Range Exhaustion

The default Linux subnet (10.88.0.0/16) provides ~65,000 addresses. macOS (192.168.64.0/24) provides ~250 addresses. Check current allocations:

Multiple Networks

A VM can connect to multiple networks in compose: