Proxmox 4.4 Extreme Network Setup (Bring Network adapters in place)

For our solution we need.

  • eth0 (onboard here)
  • wlan (pcie card)
  • dummy0.

First let’s do the dummy interface(s):

root@cloud:~# echo dummy >> /etc/modules

root@cloud:~# echo options dummy numdummies=1 >> /etc/modprobe.d/dummy.conf

root@cloud:~# modprobe dummy

You can count the number of dummy interfaces by your self. Got in mind that the interface get automatical a hardware address, that can be in conflict with the virtual machine(s).

We reconfigure the interface in

root@cloud:~# nano /etc/network/interfaces

The configuration files has to look something like:

# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you’re doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the ‘source’ or ‘source-directory’ directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

allow-hotplug eth0
allow-hotplug dummy0

auto vmbr0
iface vmbr0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.127.1
netmask 255.255.255.0
broadcast 192.168.127.255
bridge_ports dummy0
bridge_stp off
bridge_fd 0

auto wlan0
iface wlan0 inet static
address 10.0.10.1
netmask 255.255.255.0
broadcast 10.0.10.255

If you do it up right here, proxmox will use it without problems;- there is no need for a graphical interface this time.

Time for reboot

Proxmox 4.4 Extreme Network Setup (Setup and fixes)

First we install needed software packages

Proxmox VE No-Subscription Repository

root@cloud:~# update -y
root@cloud:~# update dist-upgrade

Don’t hurt me about RFC RFC2606, because I subdomain everything to sweethome and “local.” is allowed in time of this post.

root@localhost:~# hostnamectl set-hostname cloud.sweethome.local

root@localhost:~# reboot

After reboot we login again as root

root@cloud:~# apt-get install install isc-dhcp-server bind9 ntpdate ntp

Fix bind9 with appamor

root@cloud:~# echo ‘/run/systemd/journal/dev-log rw,’ >> /etc/apparmor.d/local/usr.sbin.named

root@cloud:~# systemctl restart apparmor.service

Enable IP 4v forward in root@cloud:~# nano /etc/sysctl.conf
#net.ipv4.ip_forward=1 to
net.ipv4.ip_forward=1

We do not need to reboot now:

root@cloud:~# echo 1 > /proc/sys/net/ipv4/ip_forward

We sync local time is better for lxc containers.

root@cloud:~/systemctl stop ntp

Replace my local ntp server in

“root@cloud:~# vi /etc/ntp.conf”

to

server 0.de.pool.ntp.org iburst
server 1.de.pool.ntp.org iburst
server 2.de.pool.ntp.org iburst
server 3.de.pool.ntp.org iburst

Now we update our local time with time server.

root@cloud:~# ntpdate 0.de.pool.ntp.org

root@cloud:~# systemctl start ntp
root@cloud:~# systemctl enable ntp

What we got now:

  • Bind9 Ready for setup
  • isc-dhcpd ready for setup
  • ipforward v4
  • time sync

Proxmox 4.4 Extreme Network Setup (Prolog)

In this post i will declare how i configure:

  • Hypervisor as gate
  • Bind9 as nameserver
  • isc-dhcp as dhcp server
  • Provider WAN/LAN (192.168.0.0/24)
  • dummy networkadapter for virtual machines (192.168.127.0)
  • wlan hotspot (hostapd) (10.0.10.0/24) – not compatible with freebsd. Don’t wane buy another hardware.

Why i not use NAT from proxmox:

  • Got everything around: Windows, Macs (Macs & Timecapsule Iphone), Linux Distributions (Debian/Centos/Android).
  • I wane speak with my machines by name, not ip addresses.
  • Pick mac address from virtual adapter and configure network directly as an network administrator (half dhcp).
  • use pxe setup on qemu/kvm.
  • This are things that i often did in the past and use today. On local machine and server side. Perhaps I look for an
    software in the future, but network infastructur inside virtualisation? With a good primary backup not needed.

    A type of this setup is more complicated as use of “dnsmaq” toolkit. What is nicely
    for small networks infrastructure. What ever that means. I’ve tested it one day and it works.

    This can be used directly under debian and ubuntu without proxmox for sure.

    Maybe I’ll write this post to see for myself how I’ve solved it. 🙂