Article

Table of Contents
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $300 by adding new articles!

Configure OpenBSD with Multiple IP Addresses

Last Updated: Wed, Jun 17, 2020
BSD Networking System Admin

Introduction

A basic network configuration at Vultr consists of a single IPv4 address, configured by DHCP. If you have advanced networking requirements, Vultr supports multiple public IPs and up to five private networks. You need to manually configure these advanced scenarios. Refer to the networking configuration page in the customer portal for your exact configuration. This example demonstrates three public IPv4 addresses, two private IPv4 networks, and two public IPv6 addresses.

IPv4 Info

MultipleIP

IPv6 Info

MultipleIP

Example for OpenBSD 6.3 - 6.7

  1. Configure the gateway.
    Populate /etc/mygate with:

    192.0.2.1
    
  2. Configure the public network with three static public IPv4 addresses. Configure IPv6 for one address via autoconfiguration and one additional static alias.
    Populate /etc/hostname.vio0 with:

    inet 192.0.2.101 255.255.254.0 NONE
    inet alias 192.0.2.102 255.255.255.255
    inet alias 192.0.2.103 255.255.255.255
    inet6 autoconf -autoconfprivacy -soii
    inet6 alias 2001:db8:1000::200 64
    
  3. Configure the first private network.
    Populate /etc/hostname.vio1 with:

    inet 10.1.1.100 255.255.240.0
    !ifconfig vio1 mtu 1450
    
  4. Configure the second private network.
    Populate /etc/hostname.vio2 with:

    inet 10.1.1.200 255.255.240.0
    !ifconfig vio2 mtu 1450
    
  5. Configure the nameservers.
    Populate /etc/resolv.conf with:

    nameserver 192.0.2.200
    nameserver 2001:db8:1000::1
    lookup file bind
    
  6. Reboot the system.

    # reboot
    

Example for OpenBSD 6.0 - 6.2

  1. Configure the gateway.
    Populate /etc/mygate with:

    192.0.2.1
    
  2. Configure the public network with three static public IPv4 addresses. Configure IPv6 for one address via autoconfiguration and one additional static alias.
    Populate /etc/hostname.vio0 with:

    inet 192.0.2.101 255.255.254.0 NONE
    inet alias 192.0.2.102 255.255.255.255
    inet alias 192.0.2.103 255.255.255.255
    inet6 autoconf -autoconfprivacy
    inet6 alias 2001:db8:1000::200 64
    
  3. Configure the first private network.
    Populate /etc/hostname.vio1 with:

    inet 10.1.1.100 255.255.240.0
    !ifconfig vio1 mtu 1450
    
  4. Configure the second private network.
    Populate /etc/hostname.vio2 with:

    inet 10.1.1.200 255.255.240.0
    !ifconfig vio2 mtu 1450
    
  5. Configure the nameservers.
    Populate /etc/resolv.conf with:

    nameserver 192.0.2.200
    nameserver 2001:db8:1000::1
    lookup file bind
    
  6. Reboot the system.

    # reboot
    

More Resources

Want to contribute?

You could earn up to $300 by adding new articles